Age | Commit message (Collapse) | Author |
|
|
|
|
|
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).
|
|
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.
|
|
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.
|
|
|
|
These seem to be the wrong way around.
|
|
We don't want anything which does dynamic memory allocation in the library.
|
|
|
|
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.
|
|
utilities for copying data to and from fixed sized arrays
|
|
|
|
|
|
|
|
Axolotl-the-OWS-libraries at moxie's request
|
|
|
|
|
|
from memory
|
|
|
|
|
|
|
|
|
|
|