You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in Leo (and SnarkVM) there is no way to implement the following three features on "group" elements:
Obtaining the X-coordinate of an elliptic curve group element (as a field element)
Hashing group elements through functions like Poseidon (this can be implemented using the feature above)
Obtaining the generator point of the elliptic curve
Motivation
These three features are necessary to build Elgamal/ECIES (crypto_box) style encryption, which in a simplified version will look something like this.
Let "random_field" be a random field element. Let "generator_group" be the generator of the elliptic curve group. Let "message_field" be some message to encrypt. Let "PK_group" be the public key to encrypt to, as a group element.
馃殌 Feature
Currently in Leo (and SnarkVM) there is no way to implement the following three features on "group" elements:
Motivation
These three features are necessary to build Elgamal/ECIES (crypto_box) style encryption, which in a simplified version will look something like this.
Let "random_field" be a random field element. Let "generator_group" be the generator of the elliptic curve group. Let "message_field" be some message to encrypt. Let "PK_group" be the public key to encrypt to, as a group element.
C0 = random_field * generator_group,
C1 = Poseidon(random_field * PK_group) + message_field
Implementation
It seems likely that this will require additional opcodes in SnarkVM as well as a new command in Leo. Ideally this would be very simple:
Thank you!
The text was updated successfully, but these errors were encountered: