Skip to content

Commit

Permalink
fix not
Browse files Browse the repository at this point in the history
  • Loading branch information
Trivo25 committed Nov 7, 2023
1 parent 1e75122 commit c5aa5f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/finite_field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function createField(p: bigint, t: bigint, twoadicRoot: bigint) {
return mod(x + y, p);
},
not(x: bigint, bits: number) {
return 2n ** BigInt(bits) - (x + 1n);
return mod(2n ** BigInt(bits) - (x + 1n), p);
},
negate(x: bigint) {
return x === 0n ? 0n : p - x;
Expand Down

0 comments on commit c5aa5f1

Please sign in to comment.