diff options
author | Andrei Pozolotin <andrei.pozolotin@gmail.com> | 2015-09-25 20:55:32 +0000 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2015-10-18 23:22:56 +0200 |
commit | 504e23b7a5fb78b2b267737f5b7ada35358701c9 (patch) | |
tree | 958a4f8d867ba06e9e6e5a7b4c2434055daf5f80 /org.eclipse.jgit.test/tst-rsrc | |
parent | 81810aff298ffb3e871b4dbab76be2c8b9a46ea8 (diff) | |
download | jgit-504e23b7a5fb78b2b267737f5b7ada35358701c9.tar.gz jgit-504e23b7a5fb78b2b267737f5b7ada35358701c9.zip |
Adding JGitV1 and JGitV2 Walk Encryption
Building on top of https://git.eclipse.org/r/#/c/56391/
Here we preserve compatibility with JetS3t
and add 2 new native JGit encryption implementations.
For reference, see connection configuration files:
* Version 0: jgit-s3-connection-v-0.properties
* Version 1: jgit-s3-connection-v-1.properties
* Version 2: jgit-s3-connection-v-2.properties
Change-Id: I713290bcacbe92d88e5ef28ce137de73dd1abe2f
Signed-off-by: Andrei Pozolotin <andrei.pozolotin@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst-rsrc')
3 files changed, 73 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-0.properties b/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-0.properties new file mode 100644 index 0000000000..2402a4985a --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-0.properties @@ -0,0 +1,11 @@ +# +# Sample Amazon S3 connection configuration file, Version 0. +# Version 0 (or lack of version) will produce JetS3tV2 compatible encryption. +# JetS3tV2 supports only PBE algorithms, with partially compromised AES mode. +# + +accesskey = AKIAIYWXB4ETREBRM123 +secretkey = ozCuIsqxsARoPe3FFyv3F/jiMSc3Yqay7B9UF234 + +crypto.algorithm = PBEWithMD5AndDES +password = secret diff --git a/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-1.properties b/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-1.properties new file mode 100644 index 0000000000..d0d16118e9 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-1.properties @@ -0,0 +1,14 @@ +# +# Sample Amazon S3 connection configuration file, Version 1. +# Version 1 will produce JGitV1 compatible encryption. +# It is JetS3tV2-like mode with proper AES support. +# JGitV1 uses hard coded encryption parameters. +# JGitV1 supports only PBE algorithms. +# + +accesskey = AKIAIYWXB4ETREBRM123 +secretkey = ozCuIsqxsARoPe3FFyv3F/jiMSc3Yqay7B9UF234 + +crypto.algorithm = PBEWithHmacSHA1AndAES_128 +crypto.version = 1 +password = secret diff --git a/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-2.properties b/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-2.properties new file mode 100644 index 0000000000..731b3247d2 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/jgit-s3-connection-v-2.properties @@ -0,0 +1,48 @@ +# +# Sample Amazon S3 connection configuration file, Version 2. +# Version 2 will produce JGitV2 compatible encryption. +# JGitV2 introduces more flexible control over cipher and key factory parameters. +# JGitV2 hides actual cipher/key algorithms inside the encryption profile. +# JGitV2 does not use any hard coded encryption parameters. +# JGitV2 supports both PBE and Non-PBE algorithms. + +accesskey = AKIAIYWXB4ETREBRM123 +secretkey = ozCuIsqxsARoPe3FFyv3F/jiMSc3Yqay7B9UF234 + +# In Version 2 "crypto.algorithm" is a reference to the encryption "profile". +crypto.algorithm = custom +crypto.version = 2 +password = secret + +# +# Encryption profile is a collection of related properties, +# all having common property root name, or prefix: +# +# Cipher algorithm. +custom.algo = AES/CBC/PKCS5Padding +# Key factory algorithm. +custom.key.algo = PBKDF2WithHmacSHA512 +# Key size, bits. +custom.key.size = 256 +# Number of key generation iterations. +custom.key.iter = 50000 +# Salt used in key generation (hex value, white space OK). +custom.key.salt = e2 55 89 67 8e 8d e8 4c + +# Same file can store multiple profiles. +# Only one profile can be active at a time. +# Active profile is selected via "crypto.algorithm" + +# +# Here is how to create V1 encryption in V2 format: +# +# Cipher algorithm. +legacy.algo = PBEWithHmacSHA1AndAES_128 +# Key factory algorithm. +legacy.key.algo = PBEWithHmacSHA1AndAES_128 +# Key size, bits. +legacy.key.size = 32 +# Number of key generation iterations. +legacy.key.iter = 5000 +# Salt used in key generation (hex value, white space OK). +legacy.key.salt = A40BC834D695F313 |