aboutsummaryrefslogtreecommitdiff
path: root/include/olm/crypto.hh
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-23Give SHA256 functions C bindingsRichard van der Hoff
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-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-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