Skip to content
Snippets Groups Projects
Commit 5d68cda4 authored by Thai Duong's avatar Thai Duong
Browse files

Using streams instead of channels for streaming encryption.

Structure of the streaming encryption:

StreamingAead.java  the interface for the streaming primitive. Instances
of this
  contain a key and can construct streams for encryption and decryption.
NonceBasedStreamingAead an abstract implementation of StreamAead based
on the paper
  https://eprint.iacr.org/2015/189.pdf
  This class is abstract since it defines for example no cipher.
StreamingAeadSegmentEncrypter.java An interface for a class that
encrypts segments in
  NonceBasedStreamingAead.
StreamingAeadSegmentDecrypter.java The same for decrypting segments.

AesCtrHmacStreaming.java A subclass of NonceBasedStreamingAead that uses
Aes in CTR mode
  with HMAC to implement the cipher.
AesGcmHkdfStreaming.java Another subclass of NonceBasedStreamingAead
that uses Aes-Gcm
  as underlying cipher.

StreamingAeadDecryptingChannel.java
  A ReadableByteChannel based on NonceBasedStreamingAead

State of this CL:
- Encryption and Decryption with Streams did pass all tests.
- Tests with files and streams are still missing.
- Tests with writers and streams are still missing.
- thread safety.

This CL is the result of merging Daniel's cr/169684739.

Change-Id: Id64336a2f538fee2b15a2a9f01e9e24dfa6c35b3
ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com>
GitOrigin-RevId: 9802e0ee9bae44f4247975873ee1143e8a34b620
parent 96eb5b9d
No related branches found
No related tags found
No related merge requests found
Showing
with 699 additions and 238 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment