-
Notifications
You must be signed in to change notification settings - Fork 71
Feature merge #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature merge #47
Conversation
@@ -371,6 +380,10 @@ private void actualDecryption(Map<String, AttributeValue> itemAttributes, | |||
} | |||
} | |||
|
|||
protected int getBlockSize(final String encryptionMode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be static.
cipherText.put(iv); | ||
cipher.init(Cipher.ENCRYPT_MODE, encryptionKey, Utils.getRng()); | ||
cipherText = ByteBuffer.allocate(blockSize + cipher.getOutputSize(plainText.remaining())); | ||
cipherText.position(blockSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Block size may not equal IV size, depending on the mode (e.g. AES-GCM would use a 12 byte IV with a 16 byte block size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this data-format version of the client they must be the same. It's a limitation of the format which we cannot change until we do a more significant version rev.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave a comment to this effect, and a runtime check to confirm that the returned iv
array is the correct size.
src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/DynamoDBEncryptor.java
Show resolved
Hide resolved
src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/internal/LRUCache.java
Show resolved
Hide resolved
Fix FrameEncryptionHandlerVeryLongTest so that last frame is final.
This pull-request is a roll-up to synchronize functionality and release several minor features.
Together these changes are sufficiently important that a minor version bump to 1.12.0 is included in this PR.
Changes:
MetaStore.replicate
to make it easier to copy data-keys from one MetaStore to anotherBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.