-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Use readFully()
to read exactly the number of bytes we expect from the Stream
#28515
Merged
Commits on Feb 2, 2018
-
Changes the encryption/decryption method
Calls explicitly `doFinal()` on the byte array of plaintext and ciphertext, instead of making use of Cipher{Input,Output}Stream. While functionally equivelant, CipherInputStream merhod does not work well with BouncyCastle (FIPS) Security Provider's implementation of AES GCM as the byte array that is read from the `CipherInputStream` backed `DataInputStream` is always some bytes short (17 vs 20 for the case of `keystore.seed` value).
Configuration menu - View commit details
-
Copy full SHA for 2ea6d2a - Browse repository at this point
Copy the full SHA 2ea6d2aView commit details
Commits on Feb 4, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 8241318 - Browse repository at this point
Copy the full SHA 8241318View commit details
Commits on Feb 8, 2018
-
Changed how data is read from the stream
After receiving feedback from the discussion in the upstream [1], reverted back to using CipherInputStream. Instead of using `read()` and checking that the bytes read are what we expect, use `readFully()` which will read exactly the number of bytes while keep reading until the end of the stream or throw an `EOFException` if not all bytes can be read. This approach keeps the simplicity of using CipherInputStream while working as expected with both Security Providers [1] https://www.bouncycastle.org/devmailarchive/msg15559.html
Configuration menu - View commit details
-
Copy full SHA for 63a4fcd - Browse repository at this point
Copy the full SHA 63a4fcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cc56cf - Browse repository at this point
Copy the full SHA 4cc56cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 13ae59b - Browse repository at this point
Copy the full SHA 13ae59bView commit details
Commits on Mar 9, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 248c73d - Browse repository at this point
Copy the full SHA 248c73dView commit details
Commits on Mar 13, 2018
-
Configuration menu - View commit details
-
Copy full SHA for a31ab4f - Browse repository at this point
Copy the full SHA a31ab4fView commit details
Commits on Mar 14, 2018
-
Adds test that ensures readFully() does not read garbage after the encrypted data.
Configuration menu - View commit details
-
Copy full SHA for e3d79a5 - Browse repository at this point
Copy the full SHA e3d79a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3274bb - Browse repository at this point
Copy the full SHA f3274bbView commit details
Commits on Apr 16, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 0526e03 - Browse repository at this point
Copy the full SHA 0526e03View commit details -
Configuration menu - View commit details
-
Copy full SHA for f93e9bf - Browse repository at this point
Copy the full SHA f93e9bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 460ee62 - Browse repository at this point
Copy the full SHA 460ee62View commit details -
Adds test for trailing garbage
Ensures we fail if for some reason readFully can't consume the entire stream (for instance if stream contains trailing garbage)
Configuration menu - View commit details
-
Copy full SHA for e853a6a - Browse repository at this point
Copy the full SHA e853a6aView commit details
Commits on Apr 17, 2018
-
Adds aditional explicit check for full stream consumption Adds tests
Configuration menu - View commit details
-
Copy full SHA for 3c56cfd - Browse repository at this point
Copy the full SHA 3c56cfdView commit details
Commits on May 3, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 1539793 - Browse repository at this point
Copy the full SHA 1539793View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b90e9b - Browse repository at this point
Copy the full SHA 9b90e9bView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.