aboutsummaryrefslogtreecommitdiff
path: root/src/olm.cpp
AgeCommit message (Collapse)Author
2018-06-27Fix warnings reported by LLVMmanuroe
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-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-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-05-24Factor out pickle_encoding from olm.cppRichard van der Hoff
We don't need to have all of the top-level pickling functions in olm.cpp; factor out the utilities to support it to pickle_encoding.cpp (and make sure that they have plain-C bindings).
2016-05-24Factor out olm_error_to_string to a separate fileRichard van der Hoff
I want to be able to use this functionality from elsewhere, so factor it out to its own file.
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-23Convert cipher.hh to plain CRichard van der Hoff
2016-05-23Convert error.hh to plain CRichard van der Hoff
2016-05-23Rename olm.hh to olm.hRichard van der Hoff
2016-05-23Complete fixes for olm_*_last_errorRichard van der Hoff
Should have been in the previous commit :/
2016-05-23fix range check in olm_*_last_errrorRichard van der Hoff
2016-05-16Remove logging functionalityRichard van der Hoff
Concerns have been raised that including logging functionality makes it harder to audit the implementation to ensure that no secret information is leaked. We are therefore removing it from the master branch.
2016-05-16translate logging.cpp to CRichard van der Hoff
2016-04-26Add a basic logging implementationRichard 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-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-16Add versions of olm_session_create_inbound and olm_session_matches_inbound ↵Mark Haines
which take the curve25519 identity key of the remote device we think the message is from as an additional argument
2015-07-15olm_account_last_error and olm_clear_account should take an Account not a ↵Mark Haines
Session
2015-07-14Add a test for pickling and unpickling sessions, fix off by one error when ↵Mark Haines
unpickling sessions
2015-07-10Clear the random buffers once they've been used. Add methods for clearing ↵Mark Haines
the account and session object once they've been used
2015-07-10Version the pickled objects and check for errors when unpickling themMark Haines
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-08Don't pass a key id when creating a new outbound sessionMark Haines
2015-07-08Change the JSON format for one time keys to include what algorithm they are forMark Haines
2015-07-08Remove the RemoteKey type since it wasn't being usedMark 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-07Remove the last resort one time keyMark Haines
2015-06-27Rename axolotlpp as olm to avoid confusion with Axolotl-the-spec and ↵Matthew Hodgson
Axolotl-the-OWS-libraries at moxie's request