Skip to content

Commit

Permalink
Fix bug in calculation of shared secret
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio Tacke committed Apr 1, 2020
1 parent 5c9fd6a commit 626a51f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion androidx3dh/src/main/java/com/ticeapp/androidx3dh/X3DH.kt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class X3DH {
side: Side,
info: String
): ByteArray {
var input = ByteArray(32) { Byte.MAX_VALUE }
var input = ByteArray(32) { -1 }
input += side.calculateSessionKey(DH1.ownKeyPair, DH1.remotePublicKey)
input += side.calculateSessionKey(DH2.ownKeyPair, DH2.remotePublicKey)
input += side.calculateSessionKey(DH3.ownKeyPair, DH3.remotePublicKey)
Expand Down

0 comments on commit 626a51f

Please sign in to comment.