Skip to content

Commit 652bf3c

Browse files
Update ecc chip READMEs
1 parent 9eb373c commit 652bf3c

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
Twisted Edwards (te) curve operations
1+
# Twisted Edwards (TE) curve operations
2+
3+
The `te_add` instruction is implemented in the `edwards_chip` module.
4+
5+
### 1. `te_add`
6+
7+
**Assumptions:**
8+
9+
- Both points `(x1, y1)` and `(x2, y2)` lie on the curve.
10+
11+
**Circuit statements:**
12+
13+
- The chip takes two inputs: `(x1, y1)` and `(x2, y2)`, and returns `(x3, y3)` where:
14+
- `x3 = (x1 * y2 + x2 * y1) / (1 + d * x1 * x2 * y1 * y2)`
15+
- `y3 = (y1 * y2 - a * x1 * x2) / (1 - d * x1 * x2 * y1 * y2)`
16+
17+
- The `TeAddChip` constrains that these field expressions are computed correctly over the field `C::Fp`. The coefficients `a` and `d` are taken from the `CurveConfig`.

extensions/ecc/circuit/src/weierstrass_chip/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Short Weierstrass (SW) Curve Operations
22

3-
The `ec_add_ne` and `ec_double` instructions are implemented in the `weierstrass_chip` module.
3+
The `sw_add_ne` and `sw_double` instructions are implemented in the `weierstrass_chip` module.
44

5-
### 1. `ec_add_ne`
5+
### 1. `sw_add_ne`
66

77
**Assumptions:**
88

@@ -16,9 +16,9 @@ The `ec_add_ne` and `ec_double` instructions are implemented in the `weierstrass
1616
- `x3 = lambda^2 - x1 - x2`
1717
- `y3 = lambda * (x1 - x3) - y1`
1818

19-
- The `EcAddNeChip` constrains that these field expressions are computed correctly over the field `C::Fp`.
19+
- The `SwAddNeChip` constrains that these field expressions are computed correctly over the field `C::Fp`.
2020

21-
### 2. `ec_double`
21+
### 2. `sw_double`
2222

2323
**Assumptions:**
2424

@@ -31,4 +31,4 @@ The `ec_add_ne` and `ec_double` instructions are implemented in the `weierstrass
3131
- `x3 = lambda^2 - 2 * x1`
3232
- `y3 = lambda * (x1 - x3) - y1`
3333

34-
- The `EcDoubleChip` constrains that these expressions are computed correctly over the field `C::Fp`. The coefficient `a` is taken from the `CurveConfig`.
34+
- The `SwDoubleChip` constrains that these expressions are computed correctly over the field `C::Fp`. The coefficient `a` is taken from the `CurveConfig`.

0 commit comments

Comments
 (0)