Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn committed Aug 25, 2023
1 parent 31ccfe9 commit 321f890
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion delegatable_credentials/src/msbm/issuance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl<E: Pairing> Credential<E> {
) -> Result<(Self, Option<UpdateKey<E>>), DelegationError> {
let mut new_uk = None;
if let Some(l) = new_update_key_index {
assert!(l < update_key.end_index() as u32);
assert!(l <= update_key.end_index() + 1);
new_uk = Some(
update_key.trim_key(
self.attributes
Expand Down
4 changes: 2 additions & 2 deletions legogroth16/src/link/snark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<PE: Pairing> SubspaceSnark for PESubspaceSnark<PE> {
}

fn prove(pp: &Self::PP, ek: &Self::EK, w: &[Self::InVec]) -> Result<Self::Proof, LinkError> {
if pp.t < w.len() as u64 {
if (pp.t as usize) < w.len() {
return Err(LinkError::VectorLongerThanExpected(w.len(), pp.t as usize));
}
Ok(inner_product::<PE>(w, &ek.p))
Expand All @@ -143,7 +143,7 @@ impl<PE: Pairing> SubspaceSnark for PESubspaceSnark<PE> {
x: &[Self::OutVec],
pi: &Self::Proof,
) -> Result<(), LinkError> {
if pp.l != x.len() as u64 {
if (pp.l as usize) != x.len() {
return Err(LinkError::VectorWithUnexpectedLength(
x.len(),
pp.l as usize,
Expand Down

0 comments on commit 321f890

Please sign in to comment.