Commit Graph

37 Commits

Author SHA1 Message Date
akwizgran
b8e37a5421 Renamed serial component to data, moved consumers to briar-core. 2015-05-02 20:39:24 +01:00
akwizgran
358166bc12 Don't try to erase secrets from memory.
1. The things we're really trying to protect - contact identities,
message contents, etc - can't be erased from memory because they're
encapsulated inside objects we don't control.

2. Long-term secrets can't be protected by erasing them from memory
because they're stored in the database and the database key has to be
held in memory whenever the app's running.

3. If the runtime uses a compacting garbage collector then we have no
way to ensure an object is erased from memory.

4. Trying to erase secrets from memory makes the code more complex.

Conclusion: Let's not try to protect secrets from an attacker who can
read arbitrary memory locations.
2014-12-29 21:08:27 +00:00
akwizgran
f316d64afa Moved stream crypto to crypto component. 2014-12-29 19:55:05 +00:00
akwizgran
852a618cb3 Interrupt messaging session if contact or transport is removed. 2014-11-06 08:10:29 +00:00
akwizgran
4ca83842d1 Moved ConnectionDispatcher and ConnectionRegistry to plugins package. 2014-11-05 19:40:07 +00:00
akwizgran
7b8181e309 Massive refactoring to merge handling of simplex and duplex connections. 2014-11-04 16:51:25 +00:00
akwizgran
b24f153704 Renamed a load of things from 'connection' to 'stream'. 2014-10-08 16:21:55 +01:00
akwizgran
ab76b4a9e3 Print stdout and stderr of unit tests to track down test failures. 2014-04-10 13:21:26 +01:00
akwizgran
007ddac880 Use the Montgomery ladder multiplier to avoid side-channel attacks. 2014-03-19 22:52:53 +00:00
akwizgran
d53c07cb35 Don't halt on failure, run all tests. 2014-02-09 15:56:36 +00:00
akwizgran
92d5fb4f1d Compact encodings for integers, strings and byte arrays.
This adds complexity but will save a lot of bandwidth, as most of the
strings and byte arrays we want to send are less than 128 bytes.

The extra complexity isn't exposed outside of the serial component.
2014-02-07 18:50:28 +00:00
Ximin Luo
2bdccef705 upgrade to jnotify 0.94 (patched) for 64-bit support, and improve error reporting in tests
- add a UnixRemovableDriveMonitor.checkEnabled to pre-emptively check if it's loaded
- os.arch is always x86,x86_64 on windows, i386,amd64 on linux
- source: http://www.java-gaming.org/index.php/topic,14110
- we'll deal with freebsd support when we come to it, jnotify doesn't even do this atm
2014-01-30 12:37:18 +00:00
akwizgran
8886d954d7 Reorganised Guice modules. Contribute entropy to pool on Linux/Android. 2014-01-14 19:33:17 +00:00
akwizgran
c9928348ef Use the Fortuna generator instead of the JVM's SecureRandom. Bug #4.
Note that this is only the generator part of Fortuna, not the
accumulator. The generator requires a seed, which is provided by a
platform-specific implementation of SeedProvider. On Linux the
implementation reads the seed from /dev/urandom.
2014-01-13 19:16:33 +00:00
akwizgran
a565e0c749 Removed unused ZipUtils and unit tests. 2014-01-13 19:04:25 +00:00
akwizgran
ea47420e99 Add a password strength meter to SetupActivity. Dev task #42. 2014-01-09 01:29:00 +00:00
akwizgran
832476412c Changed the root package from net.sf.briar to org.briarproject. 2014-01-08 16:18:30 +00:00
akwizgran
3b5769cf8a Use Java 1.6 instead of 1.5. We no longer aim to support OS X 10.4. 2013-11-22 12:00:00 +00:00
akwizgran
1a351535be The response to a BMP Offer is now an Ack and/or a Request.
The Request packet now contains a list of message IDs, rather than a
bitmap referring to the list of messages IDs in the Offer. This allows
the Request to be understood out of context, e.g. if the Offer and
Request are sent over separate connections or a connection is replayed.
2013-11-19 22:13:26 +00:00
akwizgran
c868764244 Separate FileUtils implementations for Android and desktop builds.
The method used by Commons IO to get the available disk space fails on
Android devices that lack a df binary - use the Android API instead.
2013-07-27 20:50:05 +01:00
akwizgran
473cec8735 Moved desktop-specific code into a separate project (other task #34). 2013-06-27 16:05:31 +01:00
akwizgran
3e0c16b59a Removed all uses of JCE so we can use full-strength crypto on all JVMs. 2013-06-17 16:29:46 +01:00
akwizgran
3054605a79 Set javac's target version to Java 1.5 in the ant buildfiles. 2013-06-13 18:38:54 +01:00
akwizgran
630cfde81e Executors and Services register themselves with the LifecycleManager.
Fixes issue #3612607.
2013-05-15 12:26:56 +01:00
akwizgran
dddd15cd10 Fixed a race conditon when adding a transport and then an endpoint.
To fix issue #3611966, KeyManagerImpl's handling of TransportAddedEvent
was made asynchronous. This made it possible for a thread to call
KeyManager.endpointAdded() before the KeyManager had asynchronously
handled the TransportAddedEvent from a previous call to
DatabaseComponent.addTransport().
2013-05-14 20:54:23 +01:00
akwizgran
e343c9f4bb Added PBKDF2 to crypto component. 2013-04-16 12:04:23 +01:00
akwizgran
72fae48aef Tests for key rotation. 2013-04-10 17:31:22 +01:00
akwizgran
5b37ff3a0e Simpler key rotation: rotation period R = C + L, retention period = 3R. 2013-04-05 21:15:24 +01:00
akwizgran
3309938467 Massive refactoring to use pseudonyms instead of nicknames for contacts.
The invitation and private messaging UIs are currently broken. Some key
rotation bugs were fixed; others may have been created (unit tests
needed). An encoding for private keys was added. Pseudonyms were moved
out of the messaging package and ratings were moved in.
2013-03-29 19:48:23 +00:00
akwizgran
4a40de957c Removed Silvertunnel-based Tor plugin.
The Tor plugin tests are consistently failing with the latest versions
of Silvertunnel and Spongy Castle; we may need to ship native Tor
binaries for Windows/Mac/Linux and use Orbot on Android.
2013-03-26 13:47:24 +00:00
akwizgran
3af077a4d8 Refactored exponential backoff code out of JdbcDatabase and added tests. 2013-02-06 23:51:23 +00:00
akwizgran
9a78071bde Refactoring: renamed package 'protocol' -> 'messaging'. 2013-01-30 17:48:43 +00:00
akwizgran
b4818228c4 Fixed remaining unit tests, refactored tests for refactored classes. 2013-01-30 14:56:28 +00:00
akwizgran
50ad1f486e Removed batches from BMP. Messages are now sent and acked individually. 2013-01-16 22:56:03 +00:00
akwizgran
2d6a9fa310 Unit tests for ModemPlugin. 2012-12-16 02:05:39 +00:00
akwizgran
ac0420d276 Unit tests and bug fixes for international dialling. 2012-12-15 16:36:37 +00:00
akwizgran
dca9470c28 Updated ant build files for multi-project structure. 2012-12-05 23:15:35 +00:00