Richard van der Hoff
af45901f76
Merge commit '8036729' into logging_enabled
2016-06-28 14:33:34 +01:00
Richard van der Hoff
61072c640c
Merge commit '27b57c8' into logging_enabled
2016-06-28 14:33:19 +01:00
Richard van der Hoff
c7a2359639
Merge commit '54d4301' into logging_enabled
2016-06-28 14:33:09 +01:00
Richard van der Hoff
02bc4ccad9
Merge commit '024685f' into logging_enabled
2016-06-28 14:32:55 +01:00
Richard van der Hoff
cd942f32c1
Merge commit '2e7800c' into logging_enabled
2016-06-28 14:32:32 +01:00
Richard van der Hoff
2f8d7ba80e
Merge commit 'b1c5732' into logging_enabled
2016-06-28 14:29:17 +01:00
Richard van der Hoff
070390e180
Merge commit 'ea130ca' into logging_enabled
2016-06-28 14:28:50 +01:00
Richard van der Hoff
ef05676dcb
Merge commit 'ff4d210' into logging_enabled
2016-06-28 14:27:56 +01:00
Richard van der Hoff
0d041f08fe
Revert "Remove functions which return strings"
...
We need these functions for the logging_enabled branch.
This reverts commit acae4e8438
.
2016-06-28 14:27:08 +01:00
Richard van der Hoff
4a74fd9297
Revert "Remove vestiges of logging"
...
Re-enable the logging stuff on the logging_enabled branch.
This reverts commit 2a09ccbd63
.
2016-06-28 14:26:07 +01:00
Richard van der Hoff
eb3bad7718
Merge commit 'acae4e8' into logging_enabled
2016-06-28 14:16:56 +01:00
Richard van der Hoff
2b7c7eef8c
Merge commit 'd37edae' into logging_enabled
2016-06-28 14:16:28 +01:00
Richard van der Hoff
803672931a
Put a signature on sent group messages
...
It's important that group messages be signed by the sender, rather than by a
secret derived from the shared secret.
2016-05-26 18:01:02 +01:00
Richard van der Hoff
7c5ab63fd8
js group demo: use a remoteOps object
...
To make sure that we don't sneakily use methods which we wouldn't be able to
for remote users, expose an interface object which contains the remote
interface.
2016-05-26 17:14:33 +01:00
Richard van der Hoff
952a3e15cf
Merge branch 'rav/group_chat_js_bindings'
2016-05-26 13:58:14 +01:00
Richard van der Hoff
389a181ea8
javascript/olm_inbound_group_session.js: fix length arg
...
message.length counts codepoints; we need bytes.
2016-05-26 13:57:09 +01:00
Mark Haines
09b8c3d7bc
Merge remote-tracking branch 'matrix/master'
2016-05-26 13:27:23 +01:00
Mark Haines
bfeb554e86
Add a fuzzer for olm_group_decrypt
2016-05-26 13:25:34 +01:00
Richard van der Hoff
315fbfc921
Add a demo for group messaging via the JS bindings
2016-05-25 17:48:01 +01:00
Richard van der Hoff
013f27f3dc
Javascript bindings for group sessions
2016-05-25 17:48:01 +01:00
Richard van der Hoff
708fddd747
Remove session_id from group messages
...
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.
2016-05-25 17:42:32 +01:00
Richard van der Hoff
ee8172d882
Compile some of the crypto libs directly
...
sha256.c and aes.c contain conflicting declarations, so we need to compile them
as separate units. This requires a bit more Makefile-shuffling; the build
directory now includes 'src' or 'lib' as appropriate, and we just mkdir -p
before each compilation.
2016-05-25 17:08:44 +01:00
Richard van der Hoff
27b57c8d88
Merge branch 'rav/more_group_chat/1'
2016-05-25 15:46:50 +01:00
Richard van der Hoff
fae8dacab5
Add a comment explaining Mark's latest fix
2016-05-25 15:44:39 +01:00
Richard van der Hoff
54d43010c8
Merge branch 'rav/jenkins_build'
2016-05-25 15:33:33 +01:00
Mark Haines
19a7fb5df5
Fix an integer wrap around bug and add a couple more tests
2016-05-25 15:00:05 +01:00
Mark Haines
024685f3db
Merge branch 'markjh/fuzzingII'
2016-05-25 14:32:03 +01:00
Richard van der Hoff
01ea3d4b9a
Fix handling of integer wraparound in megolm.c
2016-05-24 17:52:35 +01:00
Richard van der Hoff
1f31427139
megolm_advance_to: Remove excessive optimisation
...
There was some slightly overcomplex logic designed to save a couple of hash
operations when R(0) and R(1) were advanced, but the extra code was hard to
understand and didn't save much.
2016-05-24 17:38:43 +01:00
Richard van der Hoff
ef8d24f483
megolm.c: rewrite counter update
...
We no longer need to keep track of intermediate values of the counter, which
means we can update it much more easily.
2016-05-24 17:33:41 +01:00
Richard van der Hoff
f3c0dd76d7
megolm.c: Remove spurious arguments to rehash_part
...
These were left over from when rehash_part did a bunch of logging.
2016-05-24 17:03:42 +01:00
Richard van der Hoff
8d55954ce1
Avoid use of jq in test_olm
...
I want to use test_olm.sh on jenkins, which lacks jq. Hence, add support to
olm.main to get id and one-time keys individually.
2016-05-24 16:50:26 +01:00
Richard van der Hoff
ed039d331c
Merge branch 'master' into rav/jenkins_build
2016-05-24 16:30:23 +01:00
Richard van der Hoff
8d31f42b1e
Build the tests with -g
...
think this got lost when mark added separate release/debug builds
2016-05-24 16:28:14 +01:00
Richard van der Hoff
1b15465c42
Separate base64ing from the rest of msg encoding
...
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.
2016-05-24 16:23:19 +01:00
Richard van der Hoff
a919a149fb
Update megolm_cipher as a global struct
...
Initialise megolm_cipher via the preprocessor macro, instead of with a
function.
2016-05-24 14:54:01 +01:00
Richard van der Hoff
a49d7284f3
add a script for jenkins to run
2016-05-24 14:45:32 +01:00
Richard van der Hoff
15cb4ec0c0
Build the crypto libs as C99
...
Some of the crypto libs rely on UINT64_C, which in glibc 2.17 and earlier was
not defined for C++ code (see
https://sourceware.org/bugzilla/show_bug.cgi?id=15366 ).
2016-05-24 14:41:49 +01:00
Richard van der Hoff
fa1e9446ac
Use _olm_unset instead of memset
...
memset is at risk of being optimised away, so use _olm_unset instead.
2016-05-24 13:40:21 +01:00
Richard van der Hoff
173cbe112c
Avoid relying on uint -> int casting behaviour
...
The behaviour when casting from a uint32_t which has overflowed (so has the top
bit set) to int32_t is implementation-defined, so let's avoid relying on it.
2016-05-24 13:40:21 +01:00
Richard van der Hoff
846ab858a6
Python wrapper: support for inbound group sessions
2016-05-24 13:40:21 +01:00
Richard van der Hoff
fc4756ddf1
Fix up some names, and protobuf tags
...
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.
2016-05-24 13:40:21 +01:00
Richard van der Hoff
a073d12d83
Support for pickling inbound group sessions
2016-05-24 13:40:21 +01:00
Richard van der Hoff
39ad75314b
Implement decrypting inbound group messages
...
Includes creation of inbound sessions, etc
2016-05-24 13:39:34 +01:00
Richard van der Hoff
8b1514c0a6
Implement functions to get the state of outbound session
...
We need to be able to inspect an outbound session so that we can tell our peer
how to set up an inbound session.
2016-05-24 13:39:34 +01:00
Richard van der Hoff
e545ad7eaf
Outbound group session support in the python wrappers
2016-05-24 13:39:34 +01:00
Richard van der Hoff
c058554132
Implement pickling/unpickling for outbound group sessions
2016-05-24 13:39:34 +01:00
Richard van der Hoff
caaed796ad
Implementation of an outbound group session
2016-05-24 13:39:34 +01:00
Richard van der Hoff
68d3c7bfa9
Implementation of the megolm ratchet
2016-05-24 13:39:34 +01:00
Richard van der Hoff
42a300fc62
Factor out pickle_encoding from olm.cpp
...
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-24 13:39:32 +01:00