rustpq / pqcrypto

Rust Post-Quantum cryptography
226 stars 41 forks source link

What type does SharedSecret::new() return? #50

Closed oilel closed 1 year ago

oilel commented 1 year ago

In the source code , it mentioned SharedSecret::new(), what type does SharedSecret::new() return? Can we customize the content?

thomwiggers commented 1 year ago

That is a private API, you can only obtain a shared secret through Encapsulate or Decapsulate operations. You can not set the shared secret in post-quantum KEMs.

oilel commented 1 year ago

What does the assert_eq! do here? @thomwiggers

thomwiggers commented 1 year ago

check that the C function called returns 0 for success.