aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.cpp
AgeCommit message (Collapse)Author
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-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-23Give SHA256 functions C bindingsRichard van der Hoff
2016-05-20crypto.cpp: Fix commentsRichard van der Hoff
These seem to be the wrong way around.
2016-05-20Remove functions which return stringsRichard van der Hoff
We don't want anything which does dynamic memory allocation in the library.
2016-04-26Add some logging to help understand what's going onRichard van der Hoff
2015-12-03Use header files where possibleRichard van der Hoff
This fixes an incorrect re-declaration of ed25519_sign. Implement header files for some of the other library bits so that we don't need to declare functions in crypto.cpp.
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-18Make the internal functions static, remove some unused internal functionsMark Haines
2015-07-07Add functions for creating and verifying ed25519 signaturesMark Haines
2015-07-07Rename generate_key to curve25519_generate_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
2015-06-16Add a test for the axolotl APIMark Haines
2015-03-03Add functions for signing and verifying messages using curve25519 keysMark Haines
2015-02-27Try to ensure the compiler cannot optimise away attempts to erase secrets ↵Mark Haines
from memory
2015-02-26Copyright notices and a licenseMark Haines
2015-02-26Implement the axlotl ratchetMark Haines
2015-02-25Tweak AES cbc to add pcks7 padding bytesMark Haines
2015-02-21Finish and test crypto primitivesMark Haines
2015-02-20initial commit: start implementing the crypto primitivesMark Haines