KEM Question about restoring encapsulated secret by decapsulation #1380
-
Dear OQS team, I tried the sample KEM code in "https://openquantumsafe.org/liboqs/examples/kem.html". In my trial, I gave 0xC0, 0xC1, 0xC2, ... , 0xCF to 'shared_secret_e' and printed 'shared_secret_d' after OQS_KEM_frodokem_640_aes_decaps(). I expected that 'shared_secret_d' has 0xC0, 0xC1, 0xC2, ... , 0xCF but printing 'shared_secret_d' showed 0xCA, 0xB9, 0x43, 0x43, 0x32, 0x28, 0x29, 0xEB, 0x81 , 0x94, 0x73, 0xB2, 0x1C, 0x1B, 0x0E, 0x2B. Would you please let me know how I can restore original value 0xC0, 0xC1, 0xC2, ... , 0xCF after decapsulation? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you please share the complete code you're running? Looking at this statement
it seems you are not using encaps/decaps as a pair (as it needs to be). See a complete example highlighting identity test here. |
Beta Was this translation helpful? Give feedback.
Can you please share the complete code you're running? Looking at this statement
it seems you are not using encaps/decaps as a pair (as it needs to be). See a complete example highlighting identity test here.