Commit Graph

234 Commits

Author SHA1 Message Date
akwizgran
c316ebcf7a Partial implementation of the invitation protocol (untested). 2012-02-23 23:18:25 +00:00
akwizgran
34cd8cddc3 Upgraded hash function to SHA-384 and MAC to HMAC-SHA-384.
This matches the security level of AES-256 according to NSA Suite B. To
better comply with Suite B we should replace the combination of CTR mode
and HMAC with GCM, which would reduce the MAC size from 48 to 16 bytes.
2012-02-22 13:17:07 +00:00
akwizgran
4ca5be7c06 Added a flag to indicate the last frame of the connection. 2012-02-07 10:46:01 +00:00
akwizgran
6da30ca486 Plan B: Remove error correction and reliability layers and the
consequent distinction between segments and frames.
2012-02-06 16:03:09 +00:00
akwizgran
3d4b5e6282 Make room for the ack header. 2012-01-24 09:28:28 +00:00
akwizgran
3a77ba9aaf Allow the transport to specify the maximum segment length. 2012-01-20 23:06:51 +00:00
akwizgran
e43ffe1ab4 Frame reordering window. 2012-01-19 23:26:26 +00:00
akwizgran
02c516492f Moved connection window size to TransportConstants. 2012-01-19 22:13:26 +00:00
akwizgran
12393581f9 Split the functionality of ConnectionReaderImpl into layers. 2012-01-19 19:52:15 +00:00
akwizgran
1f39bfef78 Distinguish between recoverable and unrecoverable errors. 2012-01-19 19:27:04 +00:00
akwizgran
249c82d30e Renamed frame cipher -> segment cipher, frame key -> segment key. 2012-01-17 21:44:28 +00:00
akwizgran
6085b70b85 Factory methods for segmented connection writers. 2012-01-17 20:29:30 +00:00
akwizgran
dbeb7a207e Added factory methods for segmented connection readers. 2012-01-17 20:21:26 +00:00
akwizgran
f6ed6dd60b Converted incoming encryption layer from frames to segments. 2012-01-17 16:45:25 +00:00
akwizgran
8c0020873c Updated transport constants and renamed some test classes. 2012-01-17 14:56:30 +00:00
akwizgran
79814bd406 Segmented plugin interfaces should extend general plugin interfaces. 2012-01-17 13:02:20 +00:00
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
d0e402062a Unit tests for segmented encrypter and decrypter. 2012-01-13 13:06:43 +00:00
akwizgran
90e54d94e6 Encrypter and decrypter for segmented transports (untested). 2012-01-13 11:54:55 +00:00
akwizgran
ab9b05448d APIs for segmented transports. 2012-01-13 10:53:23 +00:00
akwizgran
99caec9448 Refactoring.
Unidirectional transports and connections are now called
simplex rather than batch. Bidirectional transports and connections
are now called duplex rather than stream.
2012-01-11 17:00:47 +00:00
akwizgran
f2de23854e Added BoundedExecutor and documented executor policies. 2011-12-10 00:59:29 +00:00
akwizgran
5ba5887565 Debugging Bluetooth threading issues. 2011-12-09 22:20:32 +00:00
akwizgran
8af7e72943 Cancel outstanding tasks and shut down the executor. 2011-12-09 21:13:53 +00:00
akwizgran
cd068e89c0 Converted plugin executor to ScheduledExecutorService.
No Thread.sleep() till Brooklyn.
2011-12-09 21:02:36 +00:00
akwizgran
f9f41acde9 Added a connection registry to avoid creating redundant connections. 2011-12-09 17:34:58 +00:00
akwizgran
2494ff1a1e Let the plugin determine whether to flush the output stream after each
packet.
2011-12-08 22:13:35 +00:00
akwizgran
844ae8f0a7 Plugins may dispose of resources differently depending on whether a
connection was recognised.
2011-12-08 18:56:53 +00:00
akwizgran
6962814eec Log the exception class when logging exceptions. 2011-12-08 17:28:05 +00:00
akwizgran
e3242ebb06 Read the tag on a connection recogniser thread, don't block the
plugin.
2011-12-08 16:33:48 +00:00
akwizgran
6e080bb35d Dedicated executors for plugins and the connection recogniser. 2011-12-08 16:11:24 +00:00
akwizgran
caf5f34828 Refactoring: moved high-level connection classes to protocol package. 2011-12-08 15:06:50 +00:00
akwizgran
e2cb1027af Moved message verification into a separate thread pool. 2011-12-07 21:33:14 +00:00
akwizgran
5099979b9d Encapsulate the database thread pool and task queue. 2011-12-07 14:34:16 +00:00
akwizgran
495baf8c70 BATCH_ID and MESSAGE_ID don't need to be structs. 2011-12-07 00:38:14 +00:00
akwizgran
b7c3224618 Decouple the database from IO.
This will enable asynchronous access to the database for IO threads.
2011-12-07 00:23:35 +00:00
akwizgran
45a51b4926 ExceptionHandler interface. 2011-12-06 10:58:26 +00:00
akwizgran
0b749ca9e5 Javadoc. 2011-12-06 10:53:09 +00:00
akwizgran
e24a3218ca Moved message verification and DB writes off the IO thread. 2011-12-05 22:52:00 +00:00
akwizgran
c8338f9866 Connection readers and writers don't need the connection context. 2011-12-02 14:23:45 +00:00
akwizgran
51d58fadad Include the frame number in the header.
This ensures the frame number is covered by the MAC, cleanly
separating encryption from authentication (previously we depended on
the encryption layer to garble frames if they were reordered).
2011-12-02 13:37:44 +00:00
akwizgran
f3fdd85996 Renamed "encrypted IVs" as "tags" (actual crypto changes to follow). 2011-12-02 12:02:55 +00:00
akwizgran
f7360cddde Renamed "user-defined types" as "structs" in the serialisation format. 2011-12-02 11:36:45 +00:00
akwizgran
e23f646181 Cache the return value of Arrays.hashCode(). 2011-11-28 15:44:19 +00:00
akwizgran
ebd6ebf902 Made TransportConfig and TransportProperties thread-safe. 2011-11-28 15:36:36 +00:00
akwizgran
9345b5c71b Avoid DB lookups where possible. 2011-11-24 22:09:04 +00:00
akwizgran
046becd388 Shutdown manager (untested on Windows). 2011-11-18 17:13:55 +00:00
akwizgran
859ece6328 Erase connection windows before discarding them.
And I rewrote the locking in ConnectionRecogniserImpl again. I hate
that class so much.
2011-11-18 15:25:30 +00:00
akwizgran
dacaa4566d Minor protocol refactoring. 2011-11-18 11:27:34 +00:00