aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2018-06-28improve public key encryption unit testHubert Chathi
2018-06-27add initial implementation of basic private key encryption functionalityHubert Chathi
2017-01-10Add some tests for inbound session import/exportRichard van der Hoff
2016-10-25Document the return values for olm_matches_inbound_sessionMark Haines
2016-10-24Return the base64-encoded length of picklesRichard van der Hoff
make olm_pickle_* return the lengths of the base64-encoded pickles, rather than the raw pickle. (From the application's POV, the format of the pickle is opaque: it doesn't even know that it is base64-encoded. So returning the length of the raw pickle is particularly unhelpful.)
2016-10-20Check the message index in the testsMark Haines
2016-10-20Return the message index when decrypting group messages.Mark Haines
Applications can use the index to detect replays of the same message.
2016-09-13Merge pull request #23 from matrix-org/markjh/remove_message_indexMark Haines
Remove the messsage index from olm_init_inbound_group_session
2016-09-13Remove the messsage index from olm_init_inbound_group_session since it is ↵Mark Haines
read from the session_key
2016-09-13Add a test to check the equivalence of session ids for inbound and outbound ↵Mark Haines
sessions
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-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-05Convert AES functions to plain CRichard van der Hoff
2016-09-05Convert Ed25519 and Curve25519 functions to plain CRichard van der Hoff
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-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-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-25Remove session_id from group messagesRichard van der Hoff
Putting the session_id inside the packed message body makes it hard to extract so that we can decide which session to use. We don't think there is any advantage to having thes sesion_id protected by the HMACs, so we're going to move it to the JSON framing.
2016-05-25Fix an integer wrap around bug and add a couple more testsMark Haines
2016-05-24Fix handling of integer wraparound in megolm.cRichard van der Hoff
2016-05-24Fix up some names, and protobuf tagsRichard van der Hoff
Make names (of session_key and message_index) more consistent. Use our own protobuf tags rather than trying to piggyback on the one-to-one structure.
2016-05-24Support for pickling inbound group sessionsRichard van der Hoff
2016-05-24Implement decrypting inbound group messagesRichard van der Hoff
Includes creation of inbound sessions, etc
2016-05-24Implement pickling/unpickling for outbound group sessionsRichard van der Hoff
2016-05-24Implementation of an outbound group sessionRichard van der Hoff
2016-05-24Implementation of the megolm ratchetRichard van der Hoff
2016-05-24Rewrite _olm_cipher_aes_sha_256 initialisationRichard van der Hoff
Replace the init-static-var dance with some preprocessor macros
2016-05-23Prefix for internal symbolsRichard van der Hoff
Give a load of internal symbols "_olm_" prefixes. This better delineates the public and private interfaces in the module, and helps avoid internal symbols leaking out and possibly being abused.
2016-05-23C bindings for base64 functionsRichard van der Hoff
2016-05-23Convert cipher.hh to plain CRichard van der Hoff
2016-05-23Give SHA256 functions C bindingsRichard van der Hoff
2016-05-23Rename olm.hh to olm.hRichard van der Hoff
2016-05-23Fix warnings and set -WerrorRichard van der Hoff
2015-08-19Replace hard coded references to the 32-byte key length with a constant, add ↵Mark Haines
utilities for copying data to and from fixed sized arrays
2015-08-07Fix crash where the message length was shorter than the length of the macMark Haines
2015-08-07Initialise the length fields of the reader struct in decode_message, even if ↵Mark Haines
the message is invalid, fixes a crash where the message was too short
2015-08-07Fix a crash when decoding messages that are too shortMark Haines
2015-07-24Add methods for computing sha256 hashes and validating ed25519 signaturesMark Haines
2015-07-16Add method getting a session id. Update the python and javascript bindingsMark Haines
2015-07-15Add a test of olm which uses malloc to create it's buffers so that it is ↵Mark Haines
possible to check of out of bounds reads and writes using valgrind
2015-07-15Fix bug in list where the wrong value was copied if an item was inserted at ↵Mark Haines
the beinging of the list
2015-07-14Add a test for pickling and unpickling sessions, fix off by one error when ↵Mark Haines
unpickling sessions
2015-07-10Output simpler JSON for the account keys, don't sign the JSON but instead ↵Mark Haines
provide a olm_account_sign method so that the user of the library can sign the JSON themselves
2015-07-09Add c bindings for the methods for managing one time keysMark Haines
2015-07-08Change the JSON format for one time keys to include what algorithm they are forMark Haines
2015-07-08Send the public part of the one time key rather than passing an identifierMark Haines
2015-07-07Encode the account keys as a signed JSON objectMark Haines
2015-07-07Add functions for creating and verifying ed25519 signaturesMark Haines