Skip to content

Constant-time note commitment#52

Closed
ConstanceBeguier wants to merge 3 commits intozsa1from
constant_time_commitment_v2
Closed

Constant-time note commitment#52
ConstanceBeguier wants to merge 3 commits intozsa1from
constant_time_commitment_v2

Conversation

@ConstanceBeguier
Copy link
Collaborator

We would like to have a constant-time evaluation of the note commitment for both ZEC and ZSA.
ZEC_note_commitment=Extract_P(SinsemillaHashToPoint(zec_personalization, common_bits) + [rcm]R_zec)
ZSA_note_commitment=Extract_P(SinsemillaHashToPoint(zsa_personalization, common_bits || asset) + [rcm]R_zsa)

@ConstanceBeguier ConstanceBeguier changed the base branch from main to zsa1 April 14, 2023 11:55
@ConstanceBeguier ConstanceBeguier changed the title Constant time commitment (v2) Constant-time note commitment (v2) Apr 14, 2023
@ConstanceBeguier ConstanceBeguier changed the title Constant-time note commitment (v2) Constant-time note commitment Apr 17, 2023
Copy link
Collaborator

@PaulLaux PaulLaux left a comment

Choose a reason for hiding this comment

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

Looks good, some minor improvements are required.

use subtle::CtOption;

#[test]
fn test_note_commit() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test does not test the derive() function - we need a native and non native tests for this function.

You can keep this test but please describe what is being tested here.

if asset.is_native().into() {
// Commit to ZEC notes as per the Orchard protocol.
Self::commit(NOTE_COMMITMENT_PERSONALIZATION, zec_note_bits, rcm)
CtOption::<pallas::Point>::from(zec_hash_point)
Copy link
Collaborator

@PaulLaux PaulLaux Apr 17, 2023

Choose a reason for hiding this comment

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

can return the comments to emphasis the changes between the cases.

@ConstanceBeguier
Copy link
Collaborator Author

Deprecated in favor of #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