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

crypto: create new crate, scratch work #66

Merged
merged 2 commits into from
Oct 5, 2021
Merged

crypto: create new crate, scratch work #66

merged 2 commits into from
Oct 5, 2021

Conversation

hdevalence
Copy link
Member

Adds asset identifiers and value commitment generator computation.

Also changes the workspace to use a Penumbra fork of some of the
arkworks crates. The current change is in the Display impl for Fp* instances.
The fork's ours branch is based off of v0.3.0, in order to not pick up any
unreleased breaking changes.

Adds asset identifiers and value commitment generator computation.
Adds a basic test of value commitments with different bases.

This commit changes the workspace to use a Penumbra fork of some of the
arkworks crates.  The current change is in the Display impl for Fp* instances.
The fork's `ours` branch is based off of `v0.3.0`, in order to not pick up any
unreleased breaking changes.
@@ -0,0 +1,37 @@
// XXX move into poseidon377 crate?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe as a method on this struct (which we can rename, but the struct has one public method implemented following roughly the C2SP variable-length hash so we could add a fixed-length hash_1) or just as a standalone function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I'm wondering is whether it would make sense to split the upstream code in ark-sponge into two levels, one that just does the permutation, and then another that tracks the sponge state on top of that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


let v = Fr::from(self.amount);

// XXX would be more convenient for decaf377 not to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair, can always add back later 👍

@hdevalence hdevalence marked this pull request as ready for review October 5, 2021 17:48
@hdevalence hdevalence merged commit d0f720e into main Oct 5, 2021
@hdevalence hdevalence deleted the crypto-stub branch October 5, 2021 17:48
@hdevalence hdevalence restored the crypto-stub branch October 5, 2021 17:48
@hdevalence hdevalence deleted the crypto-stub branch November 4, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants