How to Create KyberKEMKeyPair with independent Encapsulation and Decapsulation Keys ? #11
-
How to Create KyberKEMKeyPair with independent Encapsulation and Decapsulation Keys ? I have indepedent KyberEncapsulationKey and KyberDecapsulationKey formed from base 64 strings and I am trying to get KyberKEMKeyPair which is required for the KyberAgreement instantiation. Since the construtor of KyberKEMKeyPair is internal instantiation of KyberKEMKeyPair is possible. Is there way to get KyberKEMKeyPair using independent KyberEncapsulationKey and KyberDecapsulationKey instances ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hello, Sorry, it was a mistake. I had an old version of the library that doesn't need a KyberKEMKeyPair to encapsulate and decapsulate which resulted in my confusion. I have brought back that change now. You only need an independent KyberDecapsulationKey to instantiate a KyberAgreement. In addition, I have opened up the KyberKEMKeyPair constructor in order to allow externally generated Kyber KEM keys to be used. As of the moment, the update is out in NPM as 0.7.0 and Maven Central is still at PUBLISHING status. It goes up around 10-15 minutes, so if you could wait for around that time. Best Regards, |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for making not of my comment and changes. At the moment the maven sync is failing to download the new version 0.7.0, hopefully it will work soon. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the update, I could use the KeyAgreement with decap key. Also the encapsulate method is visible outside and can be used. I have have one curious question, why the N or N_BYTES are chosen to be signed integer instead on unsigned integer since they represent Byte which may not have any significance of using signed value. thanks, |
Beta Was this translation helpful? Give feedback.
Hello,
Sorry, it was a mistake. I had an old version of the library that doesn't need a KyberKEMKeyPair to encapsulate and decapsulate which resulted in my confusion. I have brought back that change now. You only need an independent KyberDecapsulationKey to instantiate a KyberAgreement. In addition, I have opened up the KyberKEMKeyPair constructor in order to allow externally generated Kyber KEM keys to be used.
As of the moment, the update is out in NPM as 0.7.0 and Maven Central is still at PUBLISHING status. It goes up around 10-15 minutes, so if you could wait for around that time.
Best Regards,
Ron Lauren Hombre