Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Formatting & CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ax0 committed Oct 11, 2024
1 parent 08842d2 commit de7d197
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- uses: actions-rust-lang/[email protected]
with:
toolchain: nightly
rustflags:
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
6 changes: 3 additions & 3 deletions src/schnorr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ impl SchnorrSigner {
let mut a_copy = a;
let mut res = GoldilocksField(1);
let mut x_pow_2n = x.clone();
while (a_copy > 0) {
if (a_copy % 2 != 0) {
while a_copy > 0 {
if a_copy % 2 != 0 {
res *= x_pow_2n;
}
a_copy /= 2;
Expand Down Expand Up @@ -101,7 +101,7 @@ impl SchnorrSigner {
assert!(k < self.PRIME_GROUP_ORDER);
assert!(sk.sk < self.PRIME_GROUP_ORDER);
assert!(e < self.PRIME_GROUP_ORDER);
let mut s128: u128 = ((k as u128) + (sk.sk as u128) * (e as u128));
let mut s128: u128 = (k as u128) + (sk.sk as u128) * (e as u128);
s128 %= self.PRIME_GROUP_ORDER as u128;
let s: u64 = s128 as u64;
SchnorrSignature { e, s }
Expand Down

0 comments on commit de7d197

Please sign in to comment.