Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Anoma cryptographic primitives as Juvix builtin axioms #2767

Closed
paulcadman opened this issue May 7, 2024 · 1 comment
Closed

Support Anoma cryptographic primitives as Juvix builtin axioms #2767

paulcadman opened this issue May 7, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@paulcadman
Copy link
Collaborator

The Anoma hoon stdlib now supports cryptographic primitives:

  • sign - sign a noun with a given a private key?
  • verify - verify the signature of some signed data, given a public key?
  • sign-detatched - sign a noun with a given private key, returning just the signature?
  • verify-detached - verify a detached signature for a noun with a given public key?

We need to make these available as Juvix builtins, in the same way as we did for anomaGet.

Proposed builtins:

--- Sign. Arguments: Data to sign, private key. Returns: Signed data.
builtin anoma-sign
axiom anomaSign : {A : Type} -> A -> Nat -> Nat;

--- Verify. Arguments: Signed data, public key.
builtin anoma-verify
axiom anomaVerify : {A : Type} -> Nat -> Nat -> Bool;

--- Sign detached. Arguments: Data to sign, private key. Returns: detached signature
axiom anomaSignDetached : {A : Type} -> A -> Nat -> Nat;

--- Verify detatched. Arguments: Data that was signed, public key, detached signature
axiom anomaVerifyDetached : {A : Type} -> A -> Nat -> Nat -> Bool;
@paulcadman paulcadman added this to the 0.6.2 milestone May 7, 2024
@paulcadman paulcadman self-assigned this May 7, 2024
@paulcadman
Copy link
Collaborator Author

Closed by #2788 - signDetached is not required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant