Skip to content

Supporting the change in encoding of ik and issueAuthSig#136

Closed
vivek-arte wants to merge 4 commits intozsa1from
ik_issueauthsig_encoding
Closed

Supporting the change in encoding of ik and issueAuthSig#136
vivek-arte wants to merge 4 commits intozsa1from
ik_issueauthsig_encoding

Conversation

@vivek-arte
Copy link

This makes the changes needed to support the change in the encoding of ik and issueAuthSig, as performed in QED-it/orchard#185, QED-it/orchard#182 and QED-it/orchard#184, and in QED-it/zcash-test-vectors#31.

@what-the-diff
Copy link

what-the-diff bot commented Sep 5, 2025

PR Summary

  • Refactored import paths for issuance keys
    This pull request simplifies the import paths for issuance keys by shortening long namespaces. For instance, IssuanceAuthorizingKey is now IssueAuthKey and IssuanceValidatingKey has been renamed to IssueValidatingKey.

  • Revised function parameters in the 'Builder' struct
    The function parameters in the Builder structure and its implementation have been updated. Now they use the newly introduced key types for better consistency and clarity.

  • Improved data reading functions in issuance.rs
    The PR improves the functionality of data reading methods in issuance.rs. For instance, the return type of read_ik is modified, and the byte array size has been adjusted from 32 to 33. Also, the error handling process for the decoding of IssueValidatingKey is refined for better robustness.

  • Upgraded serialization methods in write_v6_bundle
    The serialization methods in write_v6_bundle are updated to enhance performance. For instance, writing of keys from to_bytes() is switched to encode() now, affecting both the key and signature. This should speed up the serialization process and reduce the amount of memory overhead.

@vivek-arte vivek-arte force-pushed the ik_issueauthsig_encoding branch from a657424 to 4b16d80 Compare September 5, 2025 14:49

let isk = IssuanceAuthorizingKey::from_bytes([1; 32]).unwrap();
let ik = IssuanceValidatingKey::from(&isk);
let isk = IssueAuthKey::from_bytes(&[1u8; 32]).unwrap();

Choose a reason for hiding this comment

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

I prefer to specify that it is a ZSASchnorr validating key to avoid any ambiguity.

Suggested change
let isk = IssueAuthKey::from_bytes(&[1u8; 32]).unwrap();
let isk = IssueAuthKey::<ZSASchnorr>::from_bytes(&[1u8; 32]).unwrap();

)
})?;
Ok(Signed::from_data(bytes))
Ok(Signed::from_sig(sig))

Choose a reason for hiding this comment

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

I prefer to call this function new rather than from_sig.

@ConstanceBeguier
Copy link

Included into #129

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