summaryrefslogtreecommitdiff
path: root/ext/crypto/x25519.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/crypto/x25519.rs')
-rw-r--r--ext/crypto/x25519.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/crypto/x25519.rs b/ext/crypto/x25519.rs
index 8fcad3ef2..cdbd1d7c8 100644
--- a/ext/crypto/x25519.rs
+++ b/ext/crypto/x25519.rs
@@ -47,10 +47,10 @@ pub fn op_crypto_derive_bits_x25519(
let sh_sec = x25519_dalek::x25519(k, u);
let point = MontgomeryPoint(sh_sec);
if point.ct_eq(&MONTGOMERY_IDENTITY).unwrap_u8() == 1 {
- return false;
+ return true;
}
secret.copy_from_slice(&sh_sec);
- true
+ false
}
// id-X25519 OBJECT IDENTIFIER ::= { 1 3 101 110 }