Skip to content

Commit

Permalink
unconstrained hint_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
kevjue committed Feb 9, 2024
1 parent 99fb6ba commit 5d6378c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions baby-bear/src/baby_bear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ impl Add for BabyBear {
sum = corr_sum;
}

// unconstrained!
unconstrained!
{
io::hint_slice(&sum.to_le_bytes());
}
Expand Down Expand Up @@ -416,7 +416,7 @@ impl Sub for BabyBear {
let corr = if over { P } else { 0 };
diff = diff.wrapping_add(corr);

// unconstrained!
unconstrained!
{
io::hint_slice(&diff.to_le_bytes());
}
Expand Down Expand Up @@ -480,7 +480,7 @@ impl Mul for BabyBear {
{
let long_prod = self.value as u64 * rhs.value as u64;
let value = monty_reduce(long_prod);
// unconstrained!
unconstrained!
{
io::hint_slice(&value.to_le_bytes());
}
Expand Down

0 comments on commit 5d6378c

Please sign in to comment.