Commit Graph

11 Commits

Author SHA1 Message Date
akwizgran
07f8607c04 Initial support for tagging every segment (untested). 2012-01-13 15:50:43 +00:00
akwizgran
ac136d3732 Pass segments rather than frames to/from segmented plugins. 2012-01-13 15:05:42 +00:00
akwizgran
90e54d94e6 Encrypter and decrypter for segmented transports (untested). 2012-01-13 11:54:55 +00:00
akwizgran
f6cad10868 Frame-at-a-time decryption. 2012-01-12 18:41:43 +00:00
akwizgran
f55f98f506 Frame-at-a-time encryption. 2012-01-11 17:50:24 +00:00
akwizgran
ab722f9371 Minor refactoring. 2011-12-02 16:32:50 +00:00
akwizgran
a1b664b639 More refactoring to connect ConnectionRecogniser to ConnectionReader.
Added TestDatabaseModule so tests can specify their own DB
configuration. The modules are currently too tightly coupled - see
whether any dependencies can be removed.
2011-09-28 14:21:38 +01:00
akwizgran
4aff0c4f88 Refactored transport component and renamed WritersModule.
The goal of the refactoring was to clean up the dependencies of
IncomingBatchConnection and OutgoingBatchConnection.
2011-09-27 19:21:44 +01:00
akwizgran
eba6884281 Javadocs. 2011-09-21 18:09:56 +01:00
akwizgran
10c3b21726 Expose the encryption and authentication overhead without breaking
encapsulation.

This should allow callers to calculate maximum packet sizes without
knowing the details of the transport protocol.
2011-09-21 15:22:25 +01:00
akwizgran
2411e2008b Frame the encrypted data independently of inter-packet boundaries and
authenticate each frame before parsing its contents. Each connection
starts with a tag, followed by any number of frames, each starting
with the frame number (32 bits) and payload length (16 bits), and
ending with a MAC (256 bits).

Tags have the following format: 32 bits reserved, 16 bits for the
transport ID, 32 bits for the connection number, 32 bits (set to zero
in the tag) for the frame number, and 16 bits (set to zero in the tag)
for the block number. The tag is encrypted with the tag key in
ECB mode.

Frame numbers for each connection must start from zero and must be
contiguous and strictly increasing. Each frame is encrypted with the
frame key in CTR mode, using the plaintext tag with the appropriate
frame number to initialise the counter.

The maximum frame size is 64 KiB, including header and footer. The
maximum amount of data that can be sent over a connection is 2^32
frames - roughly 2^48 bytes, or 8 terabytes, with the maximum frame
size of 64 KiB. If that isn't sufficient we can add another 16 bits to
the frame counter.
2011-08-19 01:46:51 +02:00