Skip to content

Commit

Permalink
test: todo
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Feb 20, 2024
1 parent 2884d09 commit 3952bfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/src/main/kotlin/bip32ed25519/ContextualApiCrypto.kt
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,6 @@ class ContextualApiCrypto(private var seed: ByteArray) {
concatenated = sharedPoint + otherPartyCurve25519Key + myCurve25519Key
}

print("Concatenated: ${printer(concatenated)}\n")

// TODO: ensure that the byteArray -> string -> byteArray conversion does not affect hash
return this.lazySodium.cryptoGenericHash(String(concatenated)).toByteArray()
}
Expand Down
10 changes: 7 additions & 3 deletions lib/src/test/kotlin/bip32ed25519/ContextualApiCryptoTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -392,18 +392,22 @@ class ContextualApiCryptoTest {
) { "produced second shared secret does not correspond to hardcoded secret" }

// TODO: hash these values with another blake2d hash library to make sure they conform
// with the shared secrets produced by our library
// with the shared secrets produced by our library, and other platforms as well
// These are concatenations of shared point + alice's pubkey + bob's pubkey and
// shared point + bob's pubkey + alice's pubkey respectively

// (183, 233, 120, 45, 238, 54, 131, 65, 238, 144, 220, 254, 152, 43, 5, 106, 30, 224,
// concat alice first bob second (183, 233, 120, 45, 238, 54, 131, 65, 238, 144, 220,
// 254, 152, 43,
// 5, 106, 30, 224,
// 72, 43, 204, 198, 135, 88, 99, 90, 231, 249, 61, 95, 221, 72, 228, 135, 197, 185, 34,
// 66, 189, 8, 173, 177, 249, 55, 141, 136, 244, 91, 130, 210, 221, 12, 245, 55, 107,
// 171, 16, 72, 246, 29, 130, 140, 236, 107, 43, 205, 32, 195, 0, 181, 38, 183, 171,
// 235, 232, 189, 119, 175, 111, 176, 64, 206, 150, 37, 183, 46, 211, 203, 0, 232, 151,
// 154, 123, 168, 167, 116, )

// (183, 233, 120, 45, 238, 54, 131, 65, 238, 144, 220, 254, 152, 43, 5, 106, 30, 224,
// concat bob first alice second (183, 233, 120, 45, 238, 54, 131, 65, 238, 144, 220,
// 254, 152, 43,
// 5, 106, 30, 224,
// 72, 43, 204, 198, 135, 88, 99, 90, 231, 249, 61, 95, 221, 72, 43, 205, 32, 195, 0,
// 181, 38, 183, 171, 235, 232, 189, 119, 175, 111, 176, 64, 206, 150, 37, 183, 46, 211,
// 203, 0, 232, 151, 154, 123, 168, 167, 116, 228, 135, 197, 185, 34, 66, 189, 8, 173,
Expand Down

0 comments on commit 3952bfc

Please sign in to comment.