Olm merge requestshttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests2019-04-28T11:35:59Zhttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/1cmake: Add the SAS functions to the CMake build.2019-04-28T11:35:59Zpoljarcmake: Add the SAS functions to the CMake build.The cmake configuration file was forgotten when the SAS functions were added.
Using cmake for building currently ends up in a build that is missing the symbols of the SAS functions as well as missing development headers after the instal...The cmake configuration file was forgotten when the SAS functions were added.
Using cmake for building currently ends up in a build that is missing the symbols of the SAS functions as well as missing development headers after the install.
This PR adds the SAS functions to the cmake build and adds the SAS headers to the install.https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/2Convert docs from RST to Markdown2019-05-20T20:38:58ZHubert ChathiConvert docs from RST to Markdownthanks to @ aaron:raim.istthanks to @ aaron:raim.isthttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/3explicitly define backward & forward secrecy2019-06-19T23:25:56ZMatthew Hodgsonexplicitly define backward & forward secrecyas it repeatedly trips people up, including meas it repeatedly trips people up, including meRichard van der HoffRichard van der Hoffhttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/4Python unicode decode errors when decrypting.2019-06-22T17:06:02ZpoljarPython unicode decode errors when decrypting.This patch-set implements the ability to let the library handle Unicode decode errors when decrypting a ciphertext that contains non-Unicode bytes.
Up until now decrypting such an ciphertext would raise a UnicodeDecodeError, to let user...This patch-set implements the ability to let the library handle Unicode decode errors when decrypting a ciphertext that contains non-Unicode bytes.
Up until now decrypting such an ciphertext would raise a UnicodeDecodeError, to let users chose how they would handle such errors every decrypt function received a "unicode_errors" argument where library users can pick an error handling scheme as defined by the [codecs module](https://docs.python.org/3.7/library/codecs.html#error-handlers). The default error handling scheme is "replace" where characters that fail to decode are replaced with the unicode replacement character (U+FFFD)
* The first patch adds a new to_native_str() function which handles the bytes -> str conversion.
* The second patch replaces the bytes_to_native_str() function with the new to_native_str() function.
* The third patch just adds an isort target to the Makefile.https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/5tests: Drop hypothesis from the python tests.2019-07-03T19:27:31Zpoljartests: Drop hypothesis from the python tests.Hypothesis recently had some problems with the typing module breaking
the tox tests.
Since Hypothesis isn't really used much in the test this patch removes
it from them as well as from the test-requirements.Hypothesis recently had some problems with the typing module breaking
the tox tests.
Since Hypothesis isn't really used much in the test this patch removes
it from them as well as from the test-requirements.Richard van der HoffRichard van der Hoffhttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/6Update megolm.md2019-08-22T04:30:46ZRichard van der HoffUpdate megolm.mdFix some broken links and math formatting.Fix some broken links and math formatting.https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/7Fix comment and also js build2019-09-30T13:08:24ZDavid BakerFix comment and also js buildThe python that searches the header files for exports isn't smart
enough to know what is a comment and what isn't, so it picks this
up too and emscripten then complains about it being undefined.The python that searches the header files for exports isn't smart
enough to know what is a comment and what isn't, so it picks this
up too and emscripten then complains about it being undefined.https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/8Build the js objects without PIC2019-09-30T13:12:39ZDavid BakerBuild the js objects without PICThis confuses emscripten nowThis confuses emscripten nowhttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/9Add olm_session_describe2019-10-09T15:37:57ZDavid BakerAdd olm_session_describeAs a way to dump the state of an olm session, ie. the chain indicies,
so we can debug why olm sessions break and get out of sync.As a way to dump the state of an olm session, ie. the chain indicies,
so we can debug why olm sessions break and get out of sync.https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/10Fix some math blocks2019-11-08T14:09:13ZRichard van der HoffFix some math blockshttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/11Add TypeScript definition file2020-04-29T16:42:26ZHubert ChathiAdd TypeScript definition fileso that TypeScript users can have their olm function calls checked.so that TypeScript users can have their olm function calls checked.David BakerDavid Bakerhttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/12Fix JS demos, which had bitrotted2020-05-19T15:08:28ZMatthew HodgsonFix JS demos, which had bitrottedHubert ChathiHubert Chathihttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/13add support for fallback keys2020-09-17T21:42:26ZHubert Chathiadd support for fallback keysto support [MSC2732](https://github.com/matrix-org/matrix-doc/pull/2732)to support [MSC2732](https://github.com/matrix-org/matrix-doc/pull/2732)https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/14remove other_key checks from Python binding since it's done in C now2020-09-24T18:56:19ZHubert Chathiremove other_key checks from Python binding since it's done in C nowpoljarpoljarhttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/15Update index.d.ts; specify PRIVATE_KEY_LENGTH const export2020-10-14T01:43:31ZMichael TelatynskiUpdate index.d.ts; specify PRIVATE_KEY_LENGTH const exporthttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/17OLMKit: New pickle version using a pickle key provided externally2021-02-19T19:23:21ZManuOLMKit: New pickle version using a pickle key provided externallyImprove ObjC wrappers so that they can use a pickle key provided by the olm lib user.
This new behavior is optional to not break existing usage.
It is retro compatible and use pickle versioning already in place.
Existing key will be u...Improve ObjC wrappers so that they can use a pickle key provided by the olm lib user.
This new behavior is optional to not break existing usage.
It is retro compatible and use pickle versioning already in place.
Existing key will be unpickled with pickle v1 and pickled with pickle v2 if an external pickle key is provided.https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/16sas: Fix the base64 encoding of the MAC.2021-02-19T22:18:28Zpoljarsas: Fix the base64 encoding of the MAC.Please note that this is a breaking change, so we'll likely need to introduce another `calculate_mac()` method instead of applying this patch as is.
When calculating the MAC for a message using `olm_sas_calculate_mac()` and
`olm_sas_cal...Please note that this is a breaking change, so we'll likely need to introduce another `calculate_mac()` method instead of applying this patch as is.
When calculating the MAC for a message using `olm_sas_calculate_mac()` and
`olm_sas_calculate_mac_long_kdf()` the resulting MAC will be base64
encoded using `_olm_encode_base64()`.
The `_olm_encode_base64()` method requires an input buffer and output
buffer to be passed alongside the input length. The method is called
with the same buffer, containing the MAC, for the input buffer as well
as for the output buffer. This results in an incorrectly base64 encoded
MAC.
For example the byte array:
```python
[121, 105, 187, 19, 37, 94, 119, 248, 224, 34, 94, 29, 157, 5,
15, 230, 246, 115, 236, 217, 80, 78, 56, 200, 80, 200, 82, 158,
168, 179, 10, 230]
```
will be encoded as
eWm7NyVeVmXgbVhnYlZobllsWm9ibGxzV205aWJHeHo
instead of as
eWm7EyVed/jgIl4dnQUP5vZz7NlQTjjIUMhSnqizCuY
Notice the different value at the 10th character.
The correct result can be independently checked using Python for example:
```python
>>> from base64 import b64encode
>>> mac = [121, 105, 187, 19, 37, 94, 119, 248, 224, 34, 94, 29, 157, \
5, 15, 230, 246, 115, 236, 217, 80, 78, 56, 200, 80, 200, \
82, 158, 168, 179, 10, 230]
>>> b64encode(bytearray(mac)).rstrip(b"=")
>>> b'eWm7EyVed/jgIl4dnQUP5vZz7NlQTjjIUMhSnqizCuY'
```
This happens because the `_olm_encode_base64()` method that is used does not support in-place encoding in the general case. This is because the remainder for a 32 bit input will always be 2 (32 % 6 == 2).
The remainder will be used over here:
https://gitlab.matrix.org/matrix-org/olm/-/blob/c01164f001d57fbe2297fe11954b58077a68dc0d/src/base64.cpp#L74
The logic that gets executed if a remainder exists depends on the original input values, since those already got in-place encoded, the whole block will behave differently if the input buffer is the same as the output buffer.https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/19Xcode: Add support of Swift Package Manager2021-04-06T18:22:52ZManuXcode: Add support of Swift Package ManagerMade by Johennes at https://github.com/matrix-org/olm/issues/51#issuecomment-809128833Made by Johennes at https://github.com/matrix-org/olm/issues/51#issuecomment-809128833https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/20Update gradle wrapper and build tools2021-04-16T20:17:51ZBenoƮt MartyUpdate gradle wrapper and build toolsBuildConfig.VERSION_NAME is not available anymore when building library
Also replace JCenter by MavenCentralBuildConfig.VERSION_NAME is not available anymore when building library
Also replace JCenter by MavenCentralhttps://gitlab.matrix.org/matrix-org/olm/-/merge_requests/22Fix URL to the NCC Group audit.2021-05-04T21:58:36ZDenis KasakFix URL to the NCC Group audit.The original URL is now redirecting to a generic listing page and there
are no links to the actual Olm audit paper there.
Signed-off-by: Denis Kasak <dkasak@termina.org.uk>The original URL is now redirecting to a generic listing page and there
are no links to the actual Olm audit paper there.
Signed-off-by: Denis Kasak <dkasak@termina.org.uk>