eclipse/jgit — pull request #10 by srinathhs (2013-09-21 19:23:45+00:00)
Title: Adding AES Walk Encryption support

This change is targetted specifically for storing repositories securely in
Amazon S3.
The basic code has been implemented according to this stackoverflow
answer http://stackoverflow.com/q/992019 with few modifications.
AES cipher used : AES/CBC/PKCS5Padding
This code expects the user to set these properties in the file.
accesskey:
secretkey:
acl:
crypto.algorithm:
password:
crypto.keylength: #For AES Encryption only. Default 128.

Note: For using strong encryptions Java Cryptography Extension (JCE)
Unlimited Strength Jurisdiction Policy Files needs to be installed
properly.

List of changes:
1. Adding class AesEncryption in WalkEncryption.java
Constructor:
* Create SecretKey given password and salt using PBKDF2WithHmacSHA1
Encrypt:
* Embedd IV in output stream to be stored along with the file.
* Encrypt and store the rest of message
Decrypt:
* Extract IV and initialize the cipher
* Decrypt the rest of the file
2. Modified AmazonS3.java to handle AES encryption

Signed-off-by: Srinath H S