Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d245433
adding IssuanceAuthorizationSignature struct wrapping around schnorr:…
vivek-arte Aug 10, 2025
46628ad
updating IssuanceAuthorizationSignature struct to wrap [u8; 64] inste…
vivek-arte Aug 10, 2025
a04e581
updating IssuanceValidatingKey struct to wrap [u8; 32] instead of sch…
vivek-arte Aug 10, 2025
8e95c26
updating IssuanceAuthorizingKey struct to wrap [u8; 32] instead of No…
vivek-arte Aug 11, 2025
da73a39
pulling out the issuance authorization key material into its own modu…
vivek-arte Aug 14, 2025
398b896
shifting IssuanceAuthorizationSignature to issuance_auth module
vivek-arte Aug 14, 2025
3213bab
adding Scheme ID enum to all the issuance auth signature structs (cur…
vivek-arte Aug 14, 2025
3eaf767
adding trait to work with scheme enum to the structs, and generalizing
vivek-arte Aug 16, 2025
79389fe
adding encode and decode to ik impl, adding TryFrom impl for the sche…
vivek-arte Aug 18, 2025
f05ad89
initial functional generic implementation
vivek-arte Aug 23, 2025
14a8118
responding to review comments
vivek-arte Aug 24, 2025
f719082
optimizing import lines across the crate
vivek-arte Aug 25, 2025
fb471af
applying suggestions from review - mostly comment fixes
vivek-arte Aug 25, 2025
6b4388c
further work on review comments
vivek-arte Aug 25, 2025
676abca
removing IssueAuthSigScheme generic from IssueBundle and Signed autho…
vivek-arte Aug 25, 2025
1fce99d
renaming ZSASchnorrSigScheme to ZSASchnorr
vivek-arte Aug 25, 2025
0447010
updating the issue bundle commitment to also take the algorithm byte …
vivek-arte Aug 25, 2025
23cb73a
Apply suggestions from code review
vivek-arte Aug 25, 2025
7606601
additions based on review comments
vivek-arte Aug 25, 2025
5ffb2e7
updating keys test_vectors
vivek-arte Aug 26, 2025
bb701f7
Merge branch 'zsa1' into ik_isk_issueauthsig
vivek-arte Aug 26, 2025
5cc3ed5
removing generics from src/note/asset_base.rs functions
vivek-arte Aug 28, 2025
9f3db8e
removed unused constant
vivek-arte Aug 28, 2025
a3cfb96
refactoring to shorten issuance authorization struct names
vivek-arte Aug 28, 2025
1e118ff
removing unnecessary issuance:: path prefix from Error calls, and mak…
vivek-arte Aug 28, 2025
6f9ebde
remove discussed TODO comment
vivek-arte Aug 28, 2025
b511b3b
Update ZcashSA_Issue_V1 to ZcashSA_Issue_V1
ConstanceBeguier Aug 28, 2025
63ef85b
Some renamings
ConstanceBeguier Aug 28, 2025
6bfd963
Add zip32::Error::NonZeroAccount
ConstanceBeguier Aug 28, 2025
b613288
Update returned error for try_sign function
ConstanceBeguier Aug 28, 2025
2b8e0eb
Rename IssueAuthSigScheme to IssueAuthSigScheme
ConstanceBeguier Aug 28, 2025
1ff48d6
Update issuance_auth documentation
ConstanceBeguier Aug 28, 2025
ef27216
Replace (&isk).into() with IssueValidatingKey::from(&isk)
ConstanceBeguier Aug 28, 2025
76bfb24
Simplify IssueAuthSigScheme trait
ConstanceBeguier Aug 28, 2025
ddeb721
Update debug for issuance validating/authorizing keys
ConstanceBeguier Aug 28, 2025
d61ed08
Add try_sing_with_aux and verify_with_aux
ConstanceBeguier Aug 28, 2025
f660b0c
Add tests
ConstanceBeguier Aug 28, 2025
059e4dc
Revert "Add try_sing_with_aux and verify_with_aux"
ConstanceBeguier Aug 28, 2025
9ccd085
Use sign_raw
ConstanceBeguier Aug 28, 2025
8bca3f1
Update decode
ConstanceBeguier Aug 28, 2025
b2be2d0
Simplify IssueValidatingKey Debug
ConstanceBeguier Aug 28, 2025
49a98c7
Move Debug impl just before tests
ConstanceBeguier Aug 28, 2025
d1d91c7
Update encode functions with size_of_val
ConstanceBeguier Aug 29, 2025
07d9031
Remove redundant from/to_bytes functions
ConstanceBeguier Aug 29, 2025
5215adf
Fix no_std issues
ConstanceBeguier Aug 29, 2025
dd6bb02
Fix no_std issues v2
ConstanceBeguier Aug 29, 2025
63586f0
Update issuance_auth_sig test vectors
ConstanceBeguier Aug 29, 2025
5ac49f8
Import core::meme::size_of_val
ConstanceBeguier Sep 1, 2025
9fd361c
Fix size of message to verify
ConstanceBeguier Sep 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,11 @@ pub mod testing {
use super::{Action, Authorized, Bundle, Flags};

pub use crate::action::testing::ActionArb;
use crate::note::asset_base::testing::arb_zsa_asset_base;
use crate::note::AssetBase;
use crate::primitives::OrchardPrimitives;
use crate::value::testing::arb_note_value;
use crate::{
note::{asset_base::testing::arb_zsa_asset_base, AssetBase},
primitives::OrchardPrimitives,
value::testing::arb_note_value,
};

/// Marker type for a bundle that contains no authorizing data.
pub type Unauthorized = super::EffectsOnly;
Expand Down
6 changes: 4 additions & 2 deletions src/bundle/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ use tracing::debug;
use super::{Authorized, Bundle};
use crate::{
circuit::VerifyingKey,
primitives::redpallas::{self, Binding, SpendAuth},
primitives::OrchardPrimitives,
primitives::{
redpallas::{self, Binding, SpendAuth},
OrchardPrimitives,
},
};

/// A signature within an authorized Orchard bundle.
Expand Down
14 changes: 6 additions & 8 deletions src/bundle/burn_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,14 @@ impl fmt::Display for BurnError {

#[cfg(test)]
mod tests {
use crate::issuance::compute_asset_desc_hash;
use crate::value::NoteValue;
use nonempty::NonEmpty;

use super::*;
use crate::{issuance::compute_asset_desc_hash, issuance_auth::ZSASchnorr, value::NoteValue};
use nonempty::NonEmpty;

/// Creates an item of bundle burn list for a given asset description hash and value.
///
/// This function is deterministic and guarantees that each call with the same parameters
/// will return the same result. It achieves determinism by using a static `IssuanceAuthorizingKey`.
/// will return the same result. It achieves determinism by using a static `IssueAuthKey`.
///
/// # Arguments
///
Expand All @@ -86,12 +84,12 @@ mod tests {
/// A tuple `(AssetBase, Amount)` representing the burn list item.
///
fn get_burn_tuple(asset_desc_hash: &[u8; 32], value: u64) -> (AssetBase, NoteValue) {
use crate::keys::{IssuanceAuthorizingKey, IssuanceValidatingKey};
use crate::issuance_auth::{IssueAuthKey, IssueValidatingKey};

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

(
AssetBase::derive(&IssuanceValidatingKey::from(&isk), asset_desc_hash),
AssetBase::derive(&IssueValidatingKey::from(&isk), asset_desc_hash),
NoteValue::from_raw(value),
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/commitments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub(crate) fn hash_issue_bundle_txid_data<A: IssueAuth>(bundle: &IssueBundle<A>)
ia.update(&[u8::from(action.is_finalized())]);
}
h.update(ia.finalize().as_bytes());
h.update(&bundle.ik().to_bytes());
h.update(&bundle.ik().encode());
h.finalize()
}

Expand All @@ -123,7 +123,7 @@ pub(crate) fn hash_issue_bundle_txid_data<A: IssueAuth>(bundle: &IssueBundle<A>)
/// [zip246]: https://zips.z.cash/zip-0246
pub(crate) fn hash_issue_bundle_auth_data(bundle: &IssueBundle<Signed>) -> Blake2bHash {
let mut h = hasher(ZCASH_ORCHARD_ZSA_ISSUE_SIG_PERSONALIZATION);
h.update(&<[u8; 64]>::from(bundle.authorization().signature()));
h.update(&bundle.authorization().signature().encode());
h.finalize()
}

Expand Down
3 changes: 1 addition & 2 deletions src/circuit/circuit_zsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ use crate::{
AdditionalZsaWitnesses, Config, OrchardCircuit, Witnesses, ANCHOR, CMX, CV_NET_X, CV_NET_Y,
ENABLE_OUTPUT, ENABLE_SPEND, ENABLE_ZSA, NF_OLD, RK_X, RK_Y,
},
constants::OrchardFixedBasesFull,
constants::{OrchardFixedBases, OrchardHashDomains},
constants::{OrchardFixedBases, OrchardFixedBasesFull, OrchardHashDomains},
note::AssetBase,
orchard_flavor::OrchardZSA,
};
Expand Down
9 changes: 5 additions & 4 deletions src/circuit/value_commit_orchard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ pub(in crate::circuit) mod gadgets {
#[cfg(test)]
mod tests {
use crate::{
circuit::gadget::assign_free_advice,
circuit::value_commit_orchard::gadgets::value_commit_orchard,
circuit::K,
circuit::{
gadget::assign_free_advice,
value_commit_orchard::{gadgets::value_commit_orchard, ZsaValueCommitParams},
K,
},
constants::{OrchardCommitDomains, OrchardFixedBases, OrchardHashDomains},
note::AssetBase,
value::{NoteValue, ValueCommitTrapdoor, ValueCommitment},
Expand All @@ -156,7 +158,6 @@ mod tests {
};
use pasta_curves::pallas;

use crate::circuit::value_commit_orchard::ZsaValueCommitParams;
use rand::{rngs::OsRng, RngCore};

#[test]
Expand Down
Loading
Loading