aboutsummaryrefslogtreecommitdiff
path: root/test/data
diff options
context:
space:
mode:
authorJ08nY2023-11-07 17:16:03 +0100
committerJ08nY2023-11-10 12:21:27 +0100
commita523a8874c8d13c0e6f64dbe4b3cea1bf0771688 (patch)
tree2c10515c97b714a55b86a1e2da7ca6e8018f2b2b /test/data
parent2e64f22c3c388b4765893c729713fcaf0937f14a (diff)
downloadpyecsca-a523a8874c8d13c0e6f64dbe4b3cea1bf0771688.tar.gz
pyecsca-a523a8874c8d13c0e6f64dbe4b3cea1bf0771688.tar.zst
pyecsca-a523a8874c8d13c0e6f64dbe4b3cea1bf0771688.zip
Diffstat (limited to 'test/data')
-rw-r--r--test/data/formulas/__init__.py0
-rw-r--r--test/data/formulas/add-bc-r1rv761
-rw-r--r--test/data/formulas/add-bc-r1rv76.op323
3 files changed, 24 insertions, 0 deletions
diff --git a/test/data/formulas/__init__.py b/test/data/formulas/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/data/formulas/__init__.py
diff --git a/test/data/formulas/add-bc-r1rv76 b/test/data/formulas/add-bc-r1rv76
new file mode 100644
index 0000000..c33b915
--- /dev/null
+++ b/test/data/formulas/add-bc-r1rv76
@@ -0,0 +1 @@
+source BouncyCastle r1rv76 https://github.com/bcgit/bc-java/blob/r1rv76/core/src/main/java/org/bouncycastle/math/ec/ECPoint.java#L749
diff --git a/test/data/formulas/add-bc-r1rv76.op3 b/test/data/formulas/add-bc-r1rv76.op3
new file mode 100644
index 0000000..5e7f521
--- /dev/null
+++ b/test/data/formulas/add-bc-r1rv76.op3
@@ -0,0 +1,23 @@
+Z1Squared = Z1^2
+U2 = Z1Squared * X2
+Z1Cubed = Z1Squared * Z1
+S2 = Z1Cubed * Y2
+Z2Squared = Z2^2
+U1 = Z2Squared * X1
+Z2Cubed = Z2Squared * Z2
+S1 = Z2Cubed * Y1
+H = U1 - U2
+R = S1 - S2
+HSquared = H^2
+G = HSquared * H
+V = HSquared * U1
+t0 = 2 * V
+t1 = R^2
+t2 = t1 + G
+X3 = t2 - t0
+t3 = V - X3
+t4 = G * S1
+t5 = t3 * R
+Y3 = t5 - t4
+Z3 = H * Z1
+Z3 = Z3 * Z2