Commit graph

1014 commits

Author SHA1 Message Date
Hubert Chathi
0d0169c839
Merge pull request #86 from matrix-org/add_python_pk_signing
add python bindings for PK signing
2019-04-12 19:21:17 -04:00
Hubert Chathi
ab6e8d5086 more isort 2019-04-12 19:17:06 -04:00
Hubert Chathi
b12fe0aeb3
Merge pull request #88 from matrix-org/manuroe/sas_pksigning
OLMKit: add Short Authentication String verification
2019-04-12 19:04:09 -04:00
Hubert Chathi
107adba241 isort python/olm/pk.py 2019-04-12 13:02:57 -04:00
manuroe
5147349fea OLMKit: OMLPkSigning: Zero mutableSeed 2019-04-12 11:17:53 +02:00
manuroe
89357b6a49 OLMKit: OlmPkEncryption: Fix typos in sanity checks
(cherry picked from commit add1bd6e4250012dcfa30a40d763dba82f53c254)
2019-04-10 23:27:27 +02:00
manuroe
809793c9ba OLMKit: SAS: Add PK signing
(cherry picked from commit ff31d489c68d5d9e597bd55a6f6a64f3fe4c7ecc)
2019-04-10 23:27:14 +02:00
manuroe
4057f59453 OLMKit: SAS: Added macLongKdf support
(cherry picked from commit 934d516eb35c488ee197e1bab78a4c81e3c8241d)
2019-04-10 23:27:00 +02:00
manuroe
5de295da3e OLMKit: add Short Authentication String verification
(cherry picked from commit 3e954ca2729d3333ea853c878602d1696f616573)
2019-04-10 23:26:02 +02:00
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