0
$\begingroup$
use pqcrypto_frodo::frodokem1344aes::*;
let (pk, sk) = keypair();
let (ss1, ct) = encapsulate(&pk);
let ss2 = decapsulate(&ct, &sk);
assert!(ss1 == ss2);

In the above code, only one keypair is generated. The public key is then used to 'encapsulate', which returns a ciphertext and a shared secret. I'm going to assume that the shared secret is used to do symmetric encryption with AES or something.

Since there is only one keypair, doesn't that mean anyone can compute the shared secret with the public key?

$\endgroup$

1 Answer 1

0
$\begingroup$

Since there is only one keypair, doesn't that mean anyone can compute the shared secret with the public key?

No, because the secret ss1 is randomly chosen each time from a space large enough that there will never be a collision.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.