!vlnjqGLpLJlFmBSkfQ:matrix.org

End-to-end crypto in Matrix

310 Members
Discussion around implementing and using encryption in Matrix via Olm/Megolm | Spec work and reference impl work in #e2e-dev:matrix.org97 Servers

Load older messages


Timestamp Message
16 Feb 2020
20:04:38@MilkManzJourDaddy:matrix.orgMMJD-MxO invited @skykingskyking:matrix.orgskykingskyking.
20:53:30@skykingskyking:matrix.orgskykingskyking joined the room.
17 Feb 2020
13:07:10@exception:matrix.parat.swissStefan ThöniI'm trying to implement SAS verification as per the spec. I get identical emoji as riot, but cannot seam to get the HMAC of the keys right. More over, the result has certain similarities which to my knowledge of hashes and HMAC should never happen. Example output From riot: 1dae7a36 da0c6f4d 6330316a 4d444671 54555247 63565256 556b646a 566c4a57 My computation: 1dae7a2f da0caac6 63015673 a860041d 908483de f2ba88ba 1c538f87 a0ebca45 Any ideas what's wrong anyone?
13:12:32@exception:matrix.parat.swissStefan ThöniI've also looked at the source of olm and the matrix sdk: https://gitlab.matrix.org/matrix-org/olm/blob/master/src/sas.c https://github.com/matrix-org/matrix-android-sdk/blob/develop/matrix-sdk-crypto/src/main/java/org/matrix/androidsdk/crypto/verification/SASVerificationTransaction.kt But I couldn't find anything that would explain the difference.
13:21:00@matthew:matrix.orgMatthewthat is very strange.
13:21:17@matthew:matrix.orgMatthewis your code public anywhere?
13:21:32@matthew:matrix.orgMatthewi suspect the hmac is not being calculated with the right padding
13:21:41@matthew:matrix.orgMatthewuhoreg would likely know for sure once he wakes up in canada
13:31:09@exception:matrix.parat.swissStefan Thönithe could is not yet public as it's still work in progress
13:31:20@exception:matrix.parat.swissStefan ThöniI'll have a look at the padding...
15:20:02* @uhoreg:matrix.org[uhoreg] is awake but is on hol today and won't have time to look at anything until tomorrow
16:43:20@chris-g3:matrix.orgchris-g joined the room.
17:28:00@matthew:matrix.orgMatthewah, of course
17:28:22@matthew:matrix.orgMatthew poljar: any idea why stefan's HMAC drifts to be incorrect?
17:31:43@poljar:matrix.orgpoljar ahm, hard to tell without source code; perhaps the same issue we had when riot android first implemented it, using calculate_mac vs calculate_mac_long_kdf?
20:40:38@-____:privacytools.io-____ joined the room.
21:10:45@exception:matrix.parat.swissStefan Thöni

poljar Matthew here is the source: https://github.com/throwException/MatrixLib/blob/master/MatrixLib/Verification.cs

Beware: It's work in progress!

21:11:07@exception:matrix.parat.swissStefan ThöniThe relevant portion is about Line 125 of that file.
21:13:23@exception:matrix.parat.swissStefan ThöniThe other relevant file is: https://github.com/throwException/MatrixLib/blob/master/MatrixLib/Mac.cs
18 Feb 2020
02:49:31@uxr:matrix.orguxr joined the room.
03:10:27@dhmf:m.dhdf.devDylan joined the room.
03:11:14@dhmf:m.dhdf.devDylan left the room.
08:02:47@hankchiu:matrix.orgHank joined the room.
08:09:10@kun_tw:matrix.orgkun_tw joined the room.
11:29:15@christopher.eller:matrix.orgChristopher joined the room.
16:03:41@exception:matrix.parat.swissStefan Thöni
In reply to @exception:matrix.parat.swiss
I'm trying to implement SAS verification as per the spec. I get identical emoji as riot, but cannot seam to get the HMAC of the keys right. More over, the result has certain similarities which to my knowledge of hashes and HMAC should never happen.

Example output
From riot: 1dae7a36 da0c6f4d 6330316a 4d444671 54555247 63565256 556b646a 566c4a57
My computation: 1dae7a2f da0caac6 63015673 a860041d 908483de f2ba88ba 1c538f87 a0ebca45

Any ideas what's wrong anyone?

Anyone?

Source is now publicly available: https://github.com/throwException/MatrixLib/blob/master/MatrixLib/Verification.cs
https://github.com/throwException/MatrixLib/blob/master/MatrixLib/Mac.cs

16:23:39@crack3:matrix.orgfdghtbr changed their display name from crack3 to fdghtbr.
17:52:22@poljar:matrix.orgpoljari took a look and i didn't find anything obviously wrong, correct method seems to be used, base64 decoding seems to be sane as well
18:30:05@johnb8:matrix.orgjohnb8 joined the room.
18:47:14@exception:matrix.parat.swissStefan Thöni
In reply to @poljar:matrix.org
i took a look and i didn't find anything obviously wrong, correct method seems to be used, base64 decoding seems to be sane as well
Thanks anyway.

There are no newer messages yet.


Back to Room List