Commit graph

955 commits

Author SHA1 Message Date
manuroe
3609227c6e Fix arg name in comments
(cherry picked from commit c0a53ebaeda420f636698b99c393868d2bf8f905)
2019-04-10 23:26:02 +02:00
Damir Jelić
086133f39a Merge branch 'python-sas' 2019-04-10 15:18:07 +02:00
Valere
c79d9282dc
Merge pull request #83 from matrix-org/BillCarsonFr/java_sas
Java binding for SAS
2019-04-10 14:03:49 +02:00
Valere
eb7347bb52 Return string instead of byte array for b64 encoded data 2019-04-10 12:24:00 +02:00
Valere
16a28f297c Added macLongKdf support 2019-04-10 12:24:00 +02:00
Valere
c9369a4383 E2E: SAS Verification (olm)
Fix / missing free() on some errors


Added doc regarding string encoding for keys


cleaning
2019-04-10 12:24:00 +02:00
Damir Jelić
54cb52e05e python: Add the SAS header to the manifest.
The SAS header is required to build the package therefore it needs to be
shipped with the source distribution of the package.

Adding it to the manifest achieves this.
2019-04-09 11:41:44 +02:00
Damir Jelić
32b99b7935 python: Add support for the long KDF MAC calculation. 2019-04-09 10:57:36 +02:00
Damir Jelić
659eb34fa4 python: Remove an unneeded and old copyright header. 2019-04-09 10:47:26 +02:00
Hubert Chathi
74e9300daf add python bindings for PK signing 2019-04-08 17:19:47 -04:00
Hubert Chathi
ebc156e7c2 re-add null termination in javascript
because older versions of emscripten don't support the length argument to
UTF8ToString.
2019-04-08 15:54:02 -04:00
Damir Jelić
071029c201 javascript: Switch from deprecated Pointer_stringify() to UTF8toString().
The Pointer_stringify() function is deprecated and has a couple of
issues because it tries to guess the encoding of the buffer. In some
cases it can ignore the length parameter which could end up in
inconsistencies.

Switch to UTF8toString() that takes a length parameter and respects,
that way we don't need to allocate an additional byte for a NULL byte.
2019-04-08 15:18:28 -04:00
Hubert Chathi
2a6400716c
Merge branch 'master' into poljar/python-sas 2019-04-08 15:08:17 -04:00
Damir Jelić
709687a7b5 python: Build the build headers with setup.py.
This allows downstream users to install this python module with pip as
well as allowing people to declare it as a dependency in their setup.py.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-08 15:04:32 -04:00
Damir Jelić
f1d45c2cd3 python: Fix the MANIFEST file.
This patch adds the Olm header files to the manifest, this results in
the header files being added to source distributions of the python-olm
module.

The headers are required to build the module. Including them in the
source distribution is the easiest way to make sure that builds from the
source distribution will succeed provided that the Olm C library is
already installed.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-08 15:04:32 -04:00
Damir Jelić
f160d693b6 python: Add PK bindings.
This patch adds bindings to the PK part of the Olm library contained in
the pk.h header file.

Encryption, decryption as well as pickling/unpickling of the decryption
object is supported.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-08 15:04:32 -04:00
Damir Jelić
0883a922ff python: Make the typing module a requirement only for old python versions.
Typing is part of standard library from python 3.5 and from python 3.7
onwards trying to install it results in an error.

This patch disables typing installation on python versions that are
newer than 3.5.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-08 15:04:32 -04:00
Hubert Chathi
ad024b3347 add missing OlmPkSigning class 2019-04-04 23:11:56 -04:00
Hubert Chathi
3148157ea4 add support for an incorrect KDF that snuck into Riot 1.0 2019-04-02 23:39:05 -04:00
Damir Jelić
fcfa5f12a4 python: Expose the sha256() function in the utilities.
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-02 12:56:59 +02:00
Damir Jelić
446628753b python: Add Short Authentication String bindings.
This patch adds bindings to the SAS part of the Olm library contained in
the sas.h header file.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-02 12:56:53 +02:00
Hubert Chathi
d5c0eb9d20 update unit test to match function name change 2019-03-28 13:38:08 -04:00
Hubert Chathi
2f2a19f2e7 add Android bindings for PK signing 2019-03-20 10:32:53 -04:00
Hubert Chathi
0348f06a56 rename functions to be more consistent 2019-03-13 22:39:21 -04:00
Hubert Chathi
2589d1b17b I don't know what an "oml" is 2019-02-15 17:13:07 -05:00
Hubert Chathi
fcbedf191f
Merge pull request #81 from matrix-org/dbkr/pk_sign
Add signing class to the pk module
2019-02-01 11:43:09 -05:00
Hubert Chathi
48dda7922d call the right function and remove unnecessary include 2019-02-01 11:39:06 -05:00
David Baker
621097f62b Yay for incorrect comments breaking the build... 2019-01-30 18:18:55 +00:00
David Baker
c31ab73704 Drop support for old emscripten
because emscripted has dropped support for the old flag and us
setting it is now breaking the build.
2019-01-30 18:16:48 +00:00
David Baker
8df2ab7c07 Add signing class to the pk module 2019-01-29 20:47:41 +00:00
Damir Jelić
45091c158d python: Turn the signature buffer into a bytearray.
This is a workaround for a bug where signature verification would
overwrite the variable holding the signature.

This only happens on python2.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-01-23 17:10:44 -05:00
Hubert Chathi
94f664e725
initial implementation of short authentication string generation 2019-01-21 23:21:41 -05:00
Hubert Chathi
ec2695b9c9 bump OLMKit version too 2018-10-24 09:32:21 -04:00
Hubert Chathi
ff24af601a prepare release 3.0.0 2018-10-23 12:58:10 -04:00
Hubert Chathi
9acfd1791e expose the private key length in the Android sdk 2018-10-23 12:24:49 -04:00
Hubert Chathi
b79590e490 document how to build with cmake, and how to build the Python bindings 2018-10-23 12:24:49 -04:00
Hubert Chathi
3ebb3b69de fix capitalization and update Python binding version on release 2018-10-23 12:24:49 -04:00
Hubert Chathi
340a4965c9 include the non-wasm version in the package 2018-10-23 12:24:49 -04:00
Hubert Chathi
efbe061153 default to building as a shared library 2018-10-23 12:24:49 -04:00
Hubert Chathi
238c512d20
Merge pull request #75 from matrix-org/manuroe/objc_pk_private_key_length
OLMKit: Expose PK private key length
2018-10-23 10:56:52 -04:00
manuroe
c0d118f407 OLMKit: Fix typo in license header 2018-10-23 16:07:34 +02:00
manuroe
4e120a0eeb OLMKit: Fix file name case 2018-10-23 15:55:52 +02:00
manuroe
739f3c0391 OLMKit: Maintenance: Update Podfile.lock 2018-10-23 15:48:53 +02:00
manuroe
59076a6bda OLMKit: Expose PK private key length 2018-10-23 15:47:46 +02:00
Hubert Chathi
1aafac2874
Merge pull request #67 from matrix-org/cmake
CMake support
2018-10-22 11:32:33 -04:00
manuroe
2784e49595
Merge pull request #70 from matrix-org/manuroe/objc_pk
OLMKit: Add objc wrappers for pk encryption/decryption
2018-10-22 08:25:41 +02:00
Hubert Chathi
2cace25fba add functions for dealing with private keys directly 2018-10-19 12:10:36 -04:00
Hubert Chathi
1c7ff7f48d more and improved buffer sanitising for Android bindings 2018-10-19 12:10:11 -04:00
Hubert Chathi
c4c3055f83
Merge pull request #71 from matrix-org/js_sanitising
zero buffers in the JavaScript bindings
2018-10-19 11:34:55 -04:00
Hubert Chathi
1d880f9711
Merge pull request #68 from matrix-org/poljar-python
Poljar's improved python bindings
2018-10-19 11:34:11 -04:00