Sharing public keys
To make the use of the libraries easier, there are some functions to export only the publicTable
and publicKeys
, which have to be accessible from both the sender and the receiver. Here's how to export and import a PublicKyber
object.
Exporting
To export the PublicKyber
object, you first create it from a Kyber object and then transform it to a JSON string:
Now share the str
variable, which can be imported as done in the next example.
Importing
To import the PublicKyber
object from a string, use importPublicKyber
.
Now you can use k.publicTable
and k.publicKeys
to create a KyberSender
as in this page.
Last updated