Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Sep 21, 2023
1 parent eb3e300 commit 42d7a68
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arithmetics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TODO
There are many many implementations out there, but here is one for Circom:

```cs
```cpp
template Num2Bits(n) {
assert(n < 254); // due to BN128
signal input in;
Expand Down
6 changes: 6 additions & 0 deletions elliptic-curves/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,12 @@ TODO
TODO

## Exercise 82

> Consider the small prime factor 2 of the TinyJubJub curve. Compute the full 2-torsion group of $TJJ_{13}$ and then compute the groups $\mathbb{G}_1[2]$ and $\mathbb{G}_2[2]$
TODO

## Exercise 83

> Consider `alt_bn128` curve and and it's curve extension. Write a Sage program that computes a generator for each of the torsion group $\mathbb{G}_1[p]$ and $\mathbb{G}_2[p]$.
Expand Down
2 changes: 1 addition & 1 deletion elliptic-curves/full-torsion-groups.sage
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def example_91():

# generate extension
FPt.<t> = FP[] # type: ignore
P_MOD_M = FPt(t^k + 2)
P_MOD_M = FPt(t^k + 2) # type: ignore
assert(P_MOD_M.is_irreducible())

FP_M = GF(p^k, name='t', modulus=P_MOD_M)
Expand Down
2 changes: 1 addition & 1 deletion statements/qap.sage
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def qap(r1cs, p: int):

# pick k random elements, unique & invertible
elems = []
for _ in range(k):
while len(elems) < k:
rand_elem = Fp.random_element()
if rand_elem not in elems:
elems.append(rand_elem)
Expand Down

0 comments on commit 42d7a68

Please sign in to comment.