Skip to content

Safe JCE Cipher input/output streams and AEAD support for LW Cipher input/output streams #32

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

Closed
wants to merge 1 commit into from

Conversation

timw
Copy link
Contributor

@timw timw commented Jul 28, 2013

Some of the new tests here will fail on issues fixed by #31

Two parts to this:

  1. rewrites of JCE javax.crypto.CipherInputStream and CipherOutputStream that don't silently eat invalid ciphertext exceptions and don't call doFinal() twice (i.e. can be used and used safely with AEAD ciphers). See links below for issues with javax.crypto versions.
  2. improvement to LW API CipherInputStream and CipherOutputStream to support AEADBlockCiphers and simplify internal logic.

Full testing of JCE and LW Cipher streams with common ciphers is included, including tampering of AEAD ciphertexts.

Oracle bug refs for broken Cipher stream behaviour:

@ghost ghost assigned bcgit Sep 7, 2013
Rewrites of JCE javax.crypto.CipherInputStream and CipherOutputStream that don't silently eat invalid ciphertext exceptions and don't call doFinal() twice (i.e. can be used and used safely with AEAD ciphers).
Improvement to LW API CipherInputStream and CipherOutputStream to support AEADBlockCiphers and simplify internal logic.
Full testing of JCE and LW Cipher streams with common ciphers, including tampering of AEAD ciphertexts.

Oracle bug refs for broken Cipher stream behaviour:
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8016171 (CipherInputStream masks ciphertext tampering with AEAD ciphers in decrypt mode)
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8016249 (CipherInputStream in decrypt mode fails on close with AEAD ciphers)
- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8012900 (CICO ignores AAD in GCM mode)
@bcgit
Copy link
Collaborator

bcgit commented Nov 1, 2013

Merged with minor mods - jce.io became jcajce.io.

@bcgit bcgit closed this Nov 1, 2013
franziskuskiefer pushed a commit to franziskuskiefer/bc-java that referenced this pull request Feb 2, 2014
@timw timw deleted the feature/cipher-input-stream branch May 26, 2014 19:59
@bcgit bcgit removed their assignment May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants