akwizgran
a3a5ebc14f
Removed unused exceptions. Also disabled output for ant tests.
2011-10-08 12:27:13 +01:00
akwizgran
1ee765a052
Resolve the address before binding.
2011-10-06 11:31:09 +01:00
akwizgran
3a321b0f0e
Unit tests for PollingRemovableDriveMonitor.
2011-10-05 14:51:24 +01:00
akwizgran
2ce8d2a418
Fixed a race condition: start the monitor before creating files.
2011-10-05 14:09:43 +01:00
akwizgran
a773bbc320
Unit tests for UnixRemovableDriveMonitor.
2011-10-05 13:47:38 +02:00
akwizgran
d49ab73d81
Unit tests and bug fixes for removable drive finders.
2011-10-04 22:36:00 +01:00
akwizgran
18723a56ae
Unit tests for the removable drive plugin.
2011-10-04 22:04:10 +01:00
akwizgran
5aa7da2048
ProtocolIntegrationTest (formerly FileReadWriteTest) doesn't need to
...
use a file.
2011-09-28 18:58:45 +01:00
akwizgran
9c2e3917bf
Added an integration test for batch transports.
2011-09-28 14:43:23 +01:00
akwizgran
fadd95ae49
Added a test for MAX_PACKET_LENGTH.
2011-09-21 15:56:50 +01:00
akwizgran
bf01dd4f96
Folded ReadWriteLockDatabaseComponentTest into its parent.
2011-09-19 14:58:32 +01:00
akwizgran
22b8321376
Removed SynchronizedDatabaseComponent.
...
LockFairnessTest passes on Windows, Mac and Linux, so it's safe to use
ReadWriteLockDatabaseComponent on all those platforms. We can revisit
this issue for Android if necessary, but for now it's a waste of
effort to have two parallel implementations.
2011-09-19 14:54:29 +01:00
akwizgran
331e7e0547
Increased the maximum packet size to 1 MiB.
...
This should provide acceptable memory usage and database locking
granularity, while making subscription and transport updates large
enough for the incremental update issue to be kicked into the long
grass.
Removed awareness of the serialisation format from the protocol
component wherever possible, and added tests to ensure that the
constants defined in the protocol package's API are compatible with
the serialisation format.
2011-09-07 13:51:30 +01:00
akwizgran
7e4ff343ea
Added PaddedConnectionWriterTest to the ant buildfile.
2011-08-19 19:48:48 +02:00
akwizgran
3084a6b058
Added optional padding to the frame format, so transports that are
...
vulnerable to traffic analysis can frame their data independently of
packet boundaries.
2011-08-19 14:47:16 +02: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
akwizgran
4497774311
Derive separate keys for each direction.
2011-08-14 12:18:16 +02:00
akwizgran
e1b9ee247c
Integration test for the protocol component.
2011-08-13 16:56:00 +02:00
akwizgran
36fc34993d
Lock fairness test: check that fair ReentrantReadWriteLocks don't
...
allow writers to starve. If this test passes on Java 5 and 6, we can
get rid of SynchronizedDatabaseComponent and merge
ReadWriteLockDatabaseComponent with DatabaseComponentImpl.
2011-08-13 15:39:09 +02:00
akwizgran
9d25a819d1
Decoupled ProtocolReader (which belongs in the protocol component)
...
from PacketReader (which belongs in the transport component).
2011-08-13 14:18:16 +02:00
akwizgran
5b6fecfb43
Updated FileReadWriteTest to use the transport component for
...
encrypting and decrypting packets. Moved the test to the main package
since it's an integration test for several components.
2011-08-12 23:24:24 +02:00
akwizgran
0504a2d6fd
Implemented PacketReader, renamed Packet{Reader,Writer}Factory in the
...
protocol component to Protocol{Reader,Writer}Factory.
2011-08-12 21:55:22 +02:00
akwizgran
2c387f80b1
Packet decrypter with unit tests. Decryption is complicated by the
...
fact that the cipher wants to operate a block at a time even though
it's in CTR mode.
2011-08-12 17:14:58 +02:00
akwizgran
e896b2d86d
Unit tests for ConnectionRecogniserImpl.
2011-08-12 12:26:47 +02:00
akwizgran
a789f49a39
Separated tag encoding from PacketWriterImpl, since it's also needed
...
by the code that recognises tags. Implemented ConnectionRecogniser
(untested).
2011-08-11 19:55:22 +01:00
akwizgran
ac4521152f
Unit tests for ConnectionWindowImpl.
2011-08-11 13:37:18 +01:00
akwizgran
f3f0c223c4
PacketWriter is implemented by two classes: PacketWriterImpl and
...
PacketEncrypter. The separation allows authentication and encryption
to be tested separately.
2011-08-09 17:50:54 +01:00
akwizgran
e9d0021f56
Added interfaces for reading and writing packets and recognising which
...
contact originated an incoming connection, and an implementation of
the PacketWriter interface.
2011-08-09 16:15:25 +01:00
akwizgran
02c4d9197c
Added CounterModeTest to ant buildfile.
2011-08-01 14:36:19 +01:00
akwizgran
4311b1a224
Added RequestReaderTest to ant buildfile.
2011-07-27 11:08:17 +01:00
akwizgran
0933092295
Added RequestWriterImplTest to ant buildfile.
2011-07-26 22:02:51 +01:00
akwizgran
13f18d9e40
Found the bug, it was just a SQL syntax error.
2011-07-23 11:29:23 +01:00
akwizgran
de648daca5
Bundles are gone - the batch-mode and stream-mode protocols now
...
consist of independently encrypted and authenticated packets (Ack,
Batch, Subscriptions and Transports so far).
2011-07-22 22:19:24 +01:00
akwizgran
b4bf662b3e
Unit tests for HeaderReader.
2011-07-21 10:58:42 +01:00
akwizgran
5843f38803
Unit tests for BatchReader.
2011-07-21 10:14:23 +01:00
akwizgran
f727420838
Removed signatures from headers and bundles, since the transport's
...
authentication will make them redundant.
2011-07-20 18:33:06 +01:00
akwizgran
fb528a85ad
Nested user-defined objects (and collections of them) can now be read
...
by registering ObjectReaders with the Reader.
2011-07-19 17:17:45 +01:00
akwizgran
0bc8a31749
Cleaned up serial and protocol packages in preparation for user-defined types.
2011-07-18 14:33:41 +01:00
akwizgran
48359ec478
Updated buildfile for unit tests.
2011-07-13 16:46:21 +01:00
akwizgran
3d549ea6ac
Builders for incoming and outgoing headers and batches. The protocol and serial components can now be used to serialise, sign, deserialise and verify real bundles (except for message parsing).
2011-07-12 16:50:20 +01:00
akwizgran
e0509db45d
Protocol refactoring. Each bundle now consists of a signed header and zero or more signed batches. There is no overall signature on the bundle, since the bundle's contents may need to be processed before the entire bundle has been read. The protocol does not prevent an adversary from removing batches from a bundle, reordering batches, moving them from one bundle to another, etc. However, since each batch is signed and acknowledged independently, no such guarantees are required. Bundle IDs will go away when the retransmission mechanism is changed.
2011-07-12 12:55:46 +01:00
akwizgran
4f5eb21180
Builders for batches and bundles.
2011-07-11 12:25:04 +01:00
akwizgran
5d768a5718
DatabaseComponent throws an exception instead of returning silently if a contact is removed during an operation involving that contact. More unit tests.
2011-07-05 18:15:44 +01:00
akwizgran
eb752ada62
Factored out the database cleaner.
2011-07-04 18:11:27 +01:00
akwizgran
390b316724
Unit tests for H2Database.
2011-07-04 16:06:10 +01:00
akwizgran
6384256c06
Unit tests for i18n component.
2011-07-01 13:11:59 +01:00
akwizgran
a5bb959635
Enabled assertions in junit tests.
2011-07-01 12:19:02 +01:00
akwizgran
0ed2a7c9e7
Javadocs and unit tests.
2011-07-01 12:07:00 +01:00
akwizgran
dad1b4fcb9
More unit tests.
2011-06-22 16:58:03 +01:00
akwizgran
eb1c855278
Javadocs and unit tests. Woo!
2011-06-22 11:42:33 +01:00