Hubert Chathi
107adba241
isort python/olm/pk.py
2019-04-12 13:02:57 -04: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
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
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
Hubert Chathi
6e6facba3b
fix c+p error: don't clobber the decryption object on error
2018-10-17 22:25:10 -04:00
manuroe
cc9a97f0cb
OLMKit: Zero buffers out in all pickle & unpickle methods
2018-10-17 11:29:34 +02:00
manuroe
90bbdec8ad
OLMKit: Zero only critical buffers out
2018-10-17 11:25:20 +02:00
Hubert Chathi
93f764200e
zero buffers in the JavaScript bindings
2018-10-16 17:50:34 -04:00
Hubert Chathi
09dc3b6025
document a couple more places where olm clobbers things
2018-10-16 16:13:09 -04:00
Hubert Chathi
22f8649c10
also ignore the non-wasm JS file
2018-10-16 16:11:22 -04:00
Hubert Chathi
0ec6a65858
add more buffer clearing
2018-10-16 15:59:32 -04:00
manuroe
2ea2bc8ebc
Fix compilation warning for olm_pk_private_key_length(void);
2018-10-16 15:52:41 +02:00
manuroe
03e0d1909b
Remove .DS_Store for git
2018-10-16 15:52:14 +02:00
manuroe
9fd50c8eb5
OLMKit: Add objc wrappers for pk encryption/decryption
2018-10-16 15:51:31 +02:00
Hubert Chathi
5ef6a844d6
overwrite buffers that may contain sensitive data
...
also reduce the amount of memory copying that we do
2018-10-16 00:31:56 -04:00