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

Use ByteArray for Anoma cryptographic builtins #2947

Merged
merged 7 commits into from
Aug 13, 2024

Conversation

paulcadman
Copy link
Collaborator

@paulcadman paulcadman commented Aug 9, 2024

This PR adds support for ByteArray in the Anoma cryptographic functions.

builtin anoma-sign
axiom anomaSign : {A : Type} -> A -> ByteArray -> ByteArray;

builtin anoma-verify-with-message
axiom anomaVerifyWithMessage : {A : Type} -> ByteArray -> ByteArray -> Maybe A;

builtin anoma-sign-detached
axiom anomaSignDetached : {A : Type} -> A -> ByteArray -> ByteArray;

builtin anoma-verify-detached
axiom anomaVerifyDetached : {A : Type} -> ByteArray -> A -> ByteArray -> Bool;

The Anoma / Hoon Stdlib function length needs to be exposed as a StdlibFunction because a ByteArray stores its length and the value returned by anomaSign is not a fixed length.

@paulcadman paulcadman added this to the 0.6.5 milestone Aug 9, 2024
@paulcadman paulcadman force-pushed the use-bytearray-for-anoma-builtins branch from 3b1b59f to f78c479 Compare August 13, 2024 10:14
@paulcadman paulcadman self-assigned this Aug 13, 2024
@paulcadman paulcadman marked this pull request as ready for review August 13, 2024 11:20
@paulcadman paulcadman changed the title Use ByteArray for Anoma builtins Use ByteArray for Anoma cryptographic builtins Aug 13, 2024
@paulcadman paulcadman merged commit d759d27 into main Aug 13, 2024
7 of 8 checks passed
@paulcadman paulcadman deleted the use-bytearray-for-anoma-builtins branch August 13, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants