Commit Graph

258 Commits

Author SHA1 Message Date
akwizgran
4da7a685cd Minor code cleanups. 2011-11-16 18:15:32 +00:00
akwizgran
01dd658200 Keep the connection windows in memory. 2011-11-16 17:57:56 +00:00
akwizgran
f10512d787 Erase keys after using them. (Copies created by ciphers, etc, may
still exist.)
2011-11-16 16:22:35 +00:00
akwizgran
ece03038f4 Unit test for key derivation. 2011-11-16 15:56:54 +00:00
akwizgran
a13a1769e5 Unit test for key derivation. 2011-11-16 15:54:17 +00:00
akwizgran
f6ae4734ce Forward secrecy.
Each connection's keys are derived from a secret that is erased after
deriving the keys and the secret for the next connection.
2011-11-16 15:35:16 +00:00
akwizgran
d02a68edfc Return a connection context for outgoing connections (the secret will
be included in this context in the near future).
2011-11-15 17:47:30 +00:00
akwizgran
fabdaf5957 Remove transport ID from connection context. 2011-11-15 17:32:31 +00:00
akwizgran
9220bb3426 Key derivation function based on NIST SP 800-108. 2011-11-15 17:19:11 +00:00
akwizgran
6a15c03e81 Store the incoming and outgoing secrets separately. 2011-11-15 16:07:14 +00:00
akwizgran
f41d48eb9f Made secret keys erasable from memory. 2011-11-15 14:43:06 +00:00
akwizgran
23be7fd876 Removed double-encryption of shared secrets. 2011-11-15 14:09:28 +00:00
akwizgran
df054b1743 Store each connection window slot as a database row.
This is less memory-efficient but necessary for the coming forward
secrecy changes.
2011-11-15 13:08:20 +00:00
akwizgran
cf49a28c95 Replaced SHA-256 with SHAd-256 to prevent length extension attacks. 2011-11-15 11:11:31 +00:00
akwizgran
effa5c9d8e Throw checked exception if concurrent attempts are made to remove a
contact.
2011-11-15 09:51:51 +00:00
akwizgran
6fd8493d3d Singleton lists and singleton sets aren't equal, so use lists
consistently.
2011-11-15 09:42:21 +00:00
akwizgran
2ad15518a5 Return transports that have no properties. 2011-11-15 09:00:51 +00:00
akwizgran
72be34768b Minor refactoring. 2011-11-14 22:14:52 +00:00
akwizgran
73aa7d14d7 Split transport identifiers into two: TransportId (globally unique)
and TransportIndex (locally unique).

This is the first step towards forward secrecy. Also removed the
Writable interface and unnecessary user-defined types, moved various
constants to ProtocolConstants and renamed some classes.
2011-11-14 21:40:05 +00:00
akwizgran
85e327035c Fixed some comments. 2011-11-08 12:44:42 +00:00
akwizgran
29eb900822 Non-JUnit tests for LAN socket plugin. 2011-10-30 22:39:20 +00:00
akwizgran
d1676781f0 Fixed test expectations. 2011-10-30 21:42:55 +00:00
akwizgran
70c7a9c077 Factored out non-Bluetooth-specific code. 2011-10-29 09:47:19 +01:00
akwizgran
712d9b7698 Updated test to match changes to plugin. 2011-10-28 13:37:52 +01:00
akwizgran
40689b7e6e Avoid NoSuchElementException if the connection stalls. 2011-10-28 13:13:05 +01:00
akwizgran
48d638746c Invitation API and two (untested) implementations. 2011-10-27 17:52:03 +01:00
akwizgran
7d73f9604d Added a method for getting unread message counts for all groups. 2011-10-26 17:56:35 +01:00
akwizgran
6d91603bf7 Moved MessageHeader into DB component and added read/starred flags. 2011-10-26 17:07:09 +01:00
akwizgran
0f6b0e88c1 Added message flags: read/unread and starred/unstarred. 2011-10-26 16:32:30 +01:00
akwizgran
94722a9f2a Broadcast an event when an author's rating changes. 2011-10-26 15:40:38 +01:00
akwizgran
097d11f471 Exposed getMessageHeaders() through DatabaseComponent interface. 2011-10-26 15:18:02 +01:00
akwizgran
d2bac9a4f8 Test and bugfix for getMessageHeaders(). 2011-10-26 14:52:18 +01:00
akwizgran
2628823db7 Added a method to get all message headers in a given group (untested). 2011-10-25 17:12:37 +01:00
akwizgran
9ec8feec78 Added a method for retrieving the message body from the DB. 2011-10-21 20:42:43 +01:00
akwizgran
1173e0a563 Increased sleep intervals to avoid a race. 2011-10-21 20:42:09 +01:00
akwizgran
ef61eaa804 Separated MessageHeader interface from Message interface. 2011-10-21 18:42:27 +01:00
akwizgran
f2d80825bc Separated the subject line from the message body. 2011-10-21 18:25:25 +01:00
akwizgran
4d23e14d89 Unit tests for subscription and transport timestamps. 2011-10-19 16:41:32 +01:00
akwizgran
c828db2e95 Don't send subscription or transport updates unless an update is due.
An update is due if the information has changed since the last update,
or if no update has been sent for 12 hours (to ensure that lost
updates are eventually replaced).
2011-10-19 16:34:58 +01:00
akwizgran
93cd31fa2d Simplify Database methods, move logic to DatabaseComponent. 2011-10-19 15:54:56 +01:00
akwizgran
dbdbb1d8d4 Never reuse contact IDs. 2011-10-19 12:43:44 +01:00
akwizgran
c8b2cc38de Record when the transports and subscriptions visible to each contact
were last modified.

In future this will be used to determine when to send updates.
2011-10-18 17:32:32 +01:00
akwizgran
d7a417f36d Validate the decrypted IV before creating a reader/writer. 2011-10-18 15:58:10 +01:00
akwizgran
2f457162a5 Attach the affected contact IDs to subscription update events. 2011-10-17 23:24:23 +01:00
akwizgran
ec56b12384 Converted database events from an enum to classes to allow them to
carry data.
2011-10-17 22:47:38 +01:00
akwizgran
0ef1fcb686 De-uglified some code and moved two API classes. 2011-10-14 21:49:58 +01:00
akwizgran
d48c7b6900 Converted {Incoming,Outgoing}BatchConnection into Runnables.
Also changed the dispose() method of readers/writers/connections to
swallow any exceptions that occur, since the caller can't do anything
except log them.
2011-10-14 16:14:29 +01:00
akwizgran
55182528cf Q: What does the plugin manager do? A: It manages plugins. 2011-10-14 14:49:29 +01:00
akwizgran
64e2d7bca9 Refactoring: shorter class names. 2011-10-12 17:25:37 +01:00
akwizgran
3a07d1b882 Plugins don't need their own copies of configs and properties. 2011-10-12 16:52:39 +01:00