Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Factor the actual message encoding/decoding and encrypting/decrypting out to
separate functions from the top-level functions which do the base64-wrangling.
This is particularly helpful in the 'outbound' code-path where the offsets
required to allow room to base64-encode make the flow hard to see when it's all inline.
|
|
Initialise megolm_cipher via the preprocessor macro, instead of with a
function.
|
|
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.
|
|
Includes creation of inbound sessions, etc
|
|
We need to be able to inspect an outbound session so that we can tell our peer
how to set up an inbound session.
|
|
|
|
|
|
|
|
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).
|
|
I want to be able to use this functionality from elsewhere, so factor it out to
its own file.
|
|
Replace the init-static-var dance with some preprocessor macros
|
|
We never delete a cipher, and the destruct op is empty, so it's a bit pointless
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We don't want anything which does dynamic memory allocation in the library.
|
|
Remove the (now non-functional) declarations of olm_set_log_level in the C and
js wrappers.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
utilities for copying data to and from fixed sized arrays
|
|
encrypting and decrypting
|
|
|
|
|
|
|
|
|
|
which take the curve25519 identity key of the remote device we think the message is from as an additional argument
|
|
the beinging of the list
|
|
Session
|
|
the account and session object once they've been used
|
|
|
|
provide a olm_account_sign method so that the user of the library can sign the JSON themselves
|
|
|
|
keys have been published
|
|
|
|
|