aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-13Add a olm_inbound_group_session_id methodMark Haines
2016-09-13Merge pull request #21 from matrix-org/markjh/fix_session_idsMark Haines
Use the ed25519 public key as the group session id.
2016-09-13``if`` is not the same as ``for``Mark Haines
2016-09-13Comment on the encoding of the message counter.Mark Haines
2016-09-13Use the ed22519 public key as the group session id.Mark Haines
Some clients expect the session id to be globally unique, so allowing the end devices to pick the session id will cause problems. Include the current ratchet index with the initial keys, this decreases the risk that the client will supply the wrong index causing problems. Sign the initial keys with the ratchet ed25519 key, this reduces the risk of a client claiming a session that they didn't create.
2016-09-06call double ratchet what it isMatthew Hodgson
2016-09-06Bump version numbers to 1.2.01.2.0Richard van der Hoff
2016-09-06Merge pull request #20 from matrix-org/rav/prep_v1.2.0Richard van der Hoff
Prepare changelog for v1.2.0
2016-09-06Prepare changelog for v1.2.0Richard van der Hoff
2016-09-06Merge pull request #19 from matrix-org/rav/megolm_signingRichard van der Hoff
Sign megolm messages
2016-09-06Sign megolm messagesRichard van der Hoff
Add ed25519 keys to the inbound and outbound sessions, and use them to sign and verify megolm messages. We just stuff the ed25519 public key in alongside the megolm session key (and add a version byte), to save adding more boilerplate to the JS/python/etc layers.
2016-09-06Clean up some typosRichard van der Hoff
Remove redundant args from some js funcs, and fix a comment typo
2016-09-06Merge pull request #18 from matrix-org/rav/pickle_ed25519_in_cRichard van der Hoff
Convert ed25519 pickling functions to C
2016-09-06Merge pull request #17 from matrix-org/rav/group_session_error_handlingRichard van der Hoff
Fix error handling for group sessions
2016-09-05Fix error handling for group sessionsRichard van der Hoff
Fix a couple of places where we were using the wrong method to get the last error.
2016-09-05remove js package before buildingRichard van der Hoff
2016-09-05pack the js after buildingRichard van der Hoff
2016-09-05Build the JS wrappers on jenkinsRichard van der Hoff
2016-09-05Convert ed25519 pickling functions to CRichard van der Hoff
... so that I can use them from the group session bits.
2016-09-05Avoid ldconfig in the MakefileRichard van der Hoff
... because OSX doesn't support it.
2016-09-05Merge pull request #14 from matrix-org/rav/convert_crypto_to_cRichard van der Hoff
Convert crypto.hh into C-compatible interface
2016-09-05Convert AES functions to plain CRichard van der Hoff
2016-09-05Convert Ed25519 and Curve25519 functions to plain CRichard van der Hoff
2016-09-05Merge pull request #15 from matrix-org/rav/has_received_messageRichard van der Hoff
OlmSession.has_received_message
2016-09-05Merge pull request #16 from matrix-org/rav/fix_megolm_utf8Richard van der Hoff
Fix megolm decryption of UTF-8
2016-09-05Merge pull request #13 from matrix-org/rav/split_out_key_lengthsRichard van der Hoff
Create new constants for key lengths, etc
2016-09-05Fix megolm decryption of UTF-8Richard van der Hoff
Repeat the fix from b10f90d for megolm messages. It turns out that the 'length' argument to 'Pointer_stringify' doesn't work if the input includes characters >= 128. Rather than try to figure out which methods can return UTF-8, and which always return plain ascii, replace all uses of Pointer_stringify with a 'length' argument with the version that expects a NULL-terminated input, and extend the buffer by a byte to allow space for a null-terminator. In the case of decrypt, we need to add the null ourself. Fixes https://github.com/vector-im/vector-web/issues/2078.
2016-09-04OlmSession.has_received_messageRichard van der Hoff
I find myself wanting to know if an OlmSession is in the pre-key state or not, to help debugging at the application level.
2016-09-02Create new constants for key lengths, etcRichard van der Hoff
We were using olm::KEY_LENGTH for everything under the sun which happened to be 32 bytes long, and making a bunch of assumptions in the process. Create a bunch of new constants (as C #defines rather than C++ consts so that I can use them in another forthcoming refactor).
2016-09-01Bump version in package.json1.1.0Richard van der Hoff
... to match the Makefile
2016-09-01Merge branch 'rav/ed25519_fix'Richard van der Hoff
2016-09-01Merge branch 'rav/ed25519_fix'Richard van der Hoff
2016-09-01update changelogRichard van der Hoff
pre-1.0.0 was broken too
2016-09-01Fix Ed25519 keypair generationRichard van der Hoff
Ed25519 private keys, it turns out, have 64 bytes, not 32. We were previously generating only 32 bytes (which is all that is required to generate the public key), and then using the public key as the upper 32 bytes when generating the per-message session key. This meant that everything appeared to work, but the security of the private key was severely compromised. By way of fixes: * Use the correct algorithm for generating the Ed25519 private key, and store all 512 bits of it. * Update the account pickle format and refuse to load the old format (since we should consider it compromised). * Bump the library version, and add a function to retrieve the library version, so that applications can verify that they are linked against a fixed version of the library. * Remove the curve25519_{sign, verify} functions which were unused and of dubious quality.
2016-07-16refer to Double Ratchet in readmeMatthew Hodgson
2016-07-11Document the release processRichard van der Hoff
2016-07-11Makefile rules to build the rst into htmlRichard van der Hoff
2016-07-11Prepare 1.0.0 release1.0.0Richard van der Hoff
2016-07-06Merge branch 'rav/fix_decrypt_utf8'Richard van der Hoff
2016-07-06JS: make sure returned strings are null-terminatedRichard van der Hoff
It turns out that the 'length' argument to 'Pointer_stringify' doesn't work if the input includes characters >= 128. Rather than try to figure out which methods can return UTF-8, and which always return plain ascii, replace all uses of Pointer_stringify with a 'length' argument with the version that expects a NULL-terminated input, and extend the buffer by a byte to allow space for a null-terminator. In the case of decrypt, we need to add the null ourself. Fixes https://github.com/vector-im/vector-web/issues/1719.
2016-07-05Add an install and an install-debug targetsEmmanuel Gil Peyrot
This makes the user able to use the familiar `make install` syntax, and allows overriding of the default directories using the DESTDIR and PREFIX variables, for example: make DESTDIR=packaging PREFIX=/usr install
2016-07-05Specify the soname in the library and its nameEmmanuel Gil Peyrot
This provides users of this library the guarantee that the ABI will stay stable when MAJOR will reach 1, and will stay backwards compatible for the entire duration of the 1.x.y branch. It does require the maintainers to always update the version in the Makefile at every ABI change.
2016-06-30PR feedbackRichard van der Hoff
* write V1 pickles on the master branch * the logging branch is going to write v0x80000001
2016-06-30Make space in the session pickle for chain indexRichard van der Hoff
Keeping track of the chain index is a useful thing to do, but is only required if we've enabled diagnostics. Extend the session pickle format to make a space for it, so that pickles can be transferred between the logging_enabled branch and the master branch without loss of information. Also add some tests for session pickling which explicitly check that we can unpickle both formats of pickle.
2016-06-30Remove unused 'chain_index' from RatchetRichard van der Hoff
This was introduced when I was experimenting with support for logging progress in Olm. That is now relegated to the logging_enabled branch, so this should probably be removed. This also fixes the incompatibility of session pickles from the current master branch with those from olm 0.1.0.
2016-05-26Put a signature on sent group messagesRichard van der Hoff
It's important that group messages be signed by the sender, rather than by a secret derived from the shared secret.
2016-05-26js group demo: use a remoteOps objectRichard van der Hoff
To make sure that we don't sneakily use methods which we wouldn't be able to for remote users, expose an interface object which contains the remote interface.
2016-05-26Merge branch 'rav/group_chat_js_bindings'Richard van der Hoff
2016-05-26javascript/olm_inbound_group_session.js: fix length argRichard van der Hoff
message.length counts codepoints; we need bytes.
2016-05-26Merge remote-tracking branch 'matrix/master'Mark Haines