Merge branch 'carrot-tx-proof-support' of https://github.com/salvium/salvium into carrot-tx-proof-support

This commit is contained in:
Some Random Crypto Guy
2025-11-25 09:22:36 +00:00
2 changed files with 57 additions and 37 deletions
+11 -1
View File
@@ -543,7 +543,17 @@ namespace crypto {
ge_frombytes_vartime(&D_p3, &dbg_D);
mx25519_pubkey D_x25519;
ge_p3_to_x25519(D_x25519.data, &D_p3);
assert(memcmp(D.data, D_x25519.data, 32) == 0);
if (memcmp(D.data, D_x25519.data, 32) != 0) {
// try with x25519 curve
mx25519_pubkey A_x25519;
memcpy(&A_x25519, &A, sizeof(mx25519_pubkey));
mx25519_scmul_key(get_mx25519_impl(),
&A_x25519,
reinterpret_cast<const mx25519_privkey*>(&r),
&D_x25519);
assert(memcmp(D.data, D_x25519.data, 32) == 0);
}
}
#endif