aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--analysis/countermeasures/simulation.ipynb56
1 files changed, 50 insertions, 6 deletions
diff --git a/analysis/countermeasures/simulation.ipynb b/analysis/countermeasures/simulation.ipynb
index ef64493..5d3affc 100644
--- a/analysis/countermeasures/simulation.ipynb
+++ b/analysis/countermeasures/simulation.ipynb
@@ -5,12 +5,19 @@
"id": "bafc2f4e-05a3-4120-bcd6-5d1f5fb91cd9",
"metadata": {},
"source": [
- "# Distinguishing countermeasures by output"
+ "# Distinguishing countermeasures by output\n",
+ "\n",
+ "This notebook contains simulations of scalar randomization countermeasures acting under the five tests:\n",
+ " - [The 3n test](#3n-test)\n",
+ " - [The $n + \\epsilon$ test](#Mask-recovery-(n+ϵ-test)) including mask recovery\n",
+ " - [The $k = 10$ test](#k=10-test)\n",
+ " - [The composite test](#Composite-test)\n",
+ " - [The EPA test](#EPA-test)"
]
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 97,
"id": "33ee6084-2ac3-4f95-9610-0fbc06026538",
"metadata": {},
"outputs": [],
@@ -42,6 +49,14 @@
]
},
{
+ "cell_type": "markdown",
+ "id": "73e5efc6-b5ea-474f-9c71-8b54561d4ec1",
+ "metadata": {},
+ "source": [
+ "Let's first initialize some useful objects. We will be working with projective coordinates and the `add-2007-bl` and `dbl-2007-bl` formulas, though any formulas would work. However, one obtains different results if working with complete formulas."
+ ]
+ },
+ {
"cell_type": "code",
"execution_count": 3,
"id": "b1b9596c-1eba-4ace-af84-8cb279d84cc2",
@@ -85,7 +100,9 @@
"id": "27626337-dcbc-497c-a54e-02d50e2b8f34",
"metadata": {},
"source": [
- "## 3n test"
+ "## 3n test\n",
+ "\n",
+ "In the 3n test the target is given domain parameters of order $3n$ but claimed order $n$. The target is then given a point of order $3n$ for scalar multiplication and the results are observed."
]
},
{
@@ -2324,7 +2341,7 @@
},
{
"cell_type": "code",
- "execution_count": 103,
+ "execution_count": 93,
"id": "7fdd24cc-7c52-4222-b473-79b09c0df810",
"metadata": {},
"outputs": [],
@@ -2342,7 +2359,7 @@
},
{
"cell_type": "code",
- "execution_count": 104,
+ "execution_count": 94,
"id": "9db677c5-34e3-4b5e-93dc-11b9b7e2cf3a",
"metadata": {},
"outputs": [
@@ -2377,7 +2394,7 @@
},
{
"cell_type": "code",
- "execution_count": 120,
+ "execution_count": 95,
"id": "db1e4115-d0cf-4558-93e5-d60781407548",
"metadata": {},
"outputs": [],
@@ -2702,6 +2719,33 @@
},
{
"cell_type": "markdown",
+ "id": "843ce251-4454-4902-add5-262d5d3c02ed",
+ "metadata": {},
+ "source": [
+ "### Brumley and Tuveri bit-length fixing\n",
+ "Brumley and Tuveri has no issues computing over composite order curves."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 96,
+ "id": "7f9b4fd2-b85f-4fe8-916c-68c239140748",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "0 errors, 0 wrong results\n"
+ ]
+ }
+ ],
+ "source": [
+ "test_composite(bt, 100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
"id": "38ce47d6-e9ee-47d9-bb0d-6a182261e422",
"metadata": {},
"source": [