diff options
| -rw-r--r-- | util/plot_dh.ipynb | 16 | ||||
| -rw-r--r-- | util/plot_dsa.ipynb | 58 | ||||
| -rw-r--r-- | util/plot_gen.ipynb | 12 |
3 files changed, 44 insertions, 42 deletions
diff --git a/util/plot_dh.ipynb b/util/plot_dh.ipynb index e42b25c..950be6a 100644 --- a/util/plot_dh.ipynb +++ b/util/plot_dh.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-03-19T13:35:38.954375Z", @@ -510,7 +510,7 @@ " values = data_trimmed[np.logical_and(data_trimmed[\"time\"] <= upper_bnd,\n", " data_trimmed[\"time\"] >= lower_bnd)]\n", " axe_bl_time.clear()\n", - " axe_bl_time.set_title(\"Private key bit length, given key agreement time $\\in ({}, {})$ {}\".format(int(lower_bnd), int(upper_bnd), sign_disp_unit))\n", + " axe_bl_time.set_title(\"Private key bit length, given key agreement time $\\in ({}, {})$ {}\".format(int(lower_bnd), int(upper_bnd), time_disp_unit))\n", " bl_data = np.array(list(map(lambda x: x.bit_length(), values[\"priv\"])), dtype=np.dtype(\"u2\"))\n", " plot_hist(axe_bl_time, bl_data, \"private key bit length\", bins=11, range=(bit_size-10, bit_size+1), align=\"left\")\n", " axe_bl_time.set_xlim((bit_size-10, bit_size))\n", @@ -519,11 +519,11 @@ "center_w = widgets.IntSlider(min=min(data_trimmed[\"time\"]),\n", " max=max(data_trimmed[\"time\"]),\n", " step=1,\n", - " value=description_sign_trim.mean,\n", + " value=description_trim.mean,\n", " continuous_update=False,\n", - " description=\"center {}\".format(sign_disp_unit))\n", + " description=\"center {}\".format(time_disp_unit))\n", "width_w = widgets.IntSlider(min=1, max=100, continuous_update=False,\n", - " description=\"width {}\".format(sign_disp_unit))\n", + " description=\"width {}\".format(time_disp_unit))\n", "w = interactive(f, center=center_w,\n", " width=width_w)\n", "display(w)" @@ -568,7 +568,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "All of the following tests should pass (e.g. be true), given a large enough sample and run without the `--fixed` or `-priv/-npriv` flags:" + "All of the following tests should pass (e.g. be true), given a large enough sample." ] }, { @@ -610,8 +610,8 @@ ], "metadata": { "@webio": { - "lastCommId": "18de549d83f84e128074fc96e268d86f", - "lastKernelId": "875ada23-b504-4c96-8f24-68b5d72faab5" + "lastCommId": "68bed3134fc443a3829779707f7e77b0", + "lastKernelId": "168cb4cf-3a36-4e98-a687-9a9f57b50354" }, "hide_input": false, "kernelspec": { diff --git a/util/plot_dsa.ipynb b/util/plot_dsa.ipynb index 6fa5663..a542f9c 100644 --- a/util/plot_dsa.ipynb +++ b/util/plot_dsa.ipynb @@ -12,8 +12,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:47:51.573214Z", - "start_time": "2019-03-21T16:47:50.777035Z" + "end_time": "2019-03-22T09:04:46.257111Z", + "start_time": "2019-03-22T09:04:43.955081Z" } }, "outputs": [], @@ -48,8 +48,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:47:51.578911Z", - "start_time": "2019-03-21T16:47:51.575142Z" + "end_time": "2019-03-22T09:05:02.399284Z", + "start_time": "2019-03-22T09:05:02.391509Z" } }, "outputs": [], @@ -103,8 +103,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:47:55.190977Z", - "start_time": "2019-03-21T16:47:52.428880Z" + "end_time": "2019-03-22T09:05:04.270940Z", + "start_time": "2019-03-22T09:05:03.059822Z" } }, "outputs": [], @@ -205,8 +205,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:18:19.188665Z", - "start_time": "2019-03-21T16:18:19.164737Z" + "end_time": "2019-03-22T09:05:04.817352Z", + "start_time": "2019-03-22T09:05:04.804639Z" } }, "outputs": [], @@ -233,8 +233,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:18:20.110503Z", - "start_time": "2019-03-21T16:18:20.099333Z" + "end_time": "2019-03-22T09:05:06.106323Z", + "start_time": "2019-03-22T09:05:06.090706Z" } }, "outputs": [], @@ -256,8 +256,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:18:20.768858Z", - "start_time": "2019-03-21T16:18:20.758881Z" + "end_time": "2019-03-22T09:05:06.799992Z", + "start_time": "2019-03-22T09:05:06.790754Z" } }, "outputs": [], @@ -287,8 +287,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:18:22.549846Z", - "start_time": "2019-03-21T16:18:22.332677Z" + "end_time": "2019-03-22T09:05:08.567129Z", + "start_time": "2019-03-22T09:05:07.948181Z" } }, "outputs": [], @@ -326,8 +326,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:18:26.230002Z", - "start_time": "2019-03-21T16:18:24.323208Z" + "end_time": "2019-03-22T09:05:17.416586Z", + "start_time": "2019-03-22T09:05:16.928355Z" } }, "outputs": [], @@ -423,8 +423,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:19:56.783127Z", - "start_time": "2019-03-21T16:19:56.375647Z" + "end_time": "2019-03-22T09:05:24.311923Z", + "start_time": "2019-03-22T09:05:24.063585Z" } }, "outputs": [], @@ -470,8 +470,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:20:00.354254Z", - "start_time": "2019-03-21T16:19:59.289152Z" + "end_time": "2019-03-22T09:05:29.427210Z", + "start_time": "2019-03-22T09:05:28.768399Z" } }, "outputs": [], @@ -501,8 +501,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:20:02.737798Z", - "start_time": "2019-03-21T16:20:02.481429Z" + "end_time": "2019-03-22T09:06:00.061206Z", + "start_time": "2019-03-22T09:05:59.817227Z" } }, "outputs": [], @@ -539,8 +539,8 @@ "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2019-03-21T16:20:10.306709Z", - "start_time": "2019-03-21T16:20:10.102626Z" + "end_time": "2019-03-22T09:06:16.571781Z", + "start_time": "2019-03-22T09:06:16.336312Z" }, "scrolled": false }, @@ -619,7 +619,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "All of the following tests should pass (e.g. be true), given a large enough sample and run without the `--fixed` or `-priv/-npriv` flags:" + "All of the following tests should pass (e.g. be true), given a large enough sample." ] }, { @@ -668,13 +668,15 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "print(\"Nonce uniqueness (no duplicates):\" + str(len(np.unique(data[\"nonce\"])) == len(data[\"nonce\"])))" + ] } ], "metadata": { "@webio": { - "lastCommId": "9597ec08f0744c0c9aff275fad95d237", - "lastKernelId": "e6055c6c-6313-439b-909b-d90592f67d26" + "lastCommId": "8be83dd299f244e7859686e690aa3254", + "lastKernelId": "4cf3b8b4-71ee-4bf5-aafc-ff6192e2d23c" }, "hide_input": false, "kernelspec": { diff --git a/util/plot_gen.ipynb b/util/plot_gen.ipynb index 1b8e94d..0b97e32 100644 --- a/util/plot_gen.ipynb +++ b/util/plot_gen.ipynb @@ -606,7 +606,7 @@ " values = data_trimmed[np.logical_and(data_trimmed[\"gen_time\"] <= upper_bnd,\n", " data_trimmed[\"gen_time\"] >= lower_bnd)]\n", " axe_bl_time.clear()\n", - " axe_bl_time.set_title(\"Private key bit length, given keygen time $\\in ({}, {})$ {}\".format(int(lower_bnd), int(upper_bnd), sign_disp_unit))\n", + " axe_bl_time.set_title(\"Private key bit length, given keygen time $\\in ({}, {})$ {}\".format(int(lower_bnd), int(upper_bnd), gen_disp_unit))\n", " bl_data = np.array(list(map(lambda x: x.bit_length(), values[\"priv\"])), dtype=np.dtype(\"u2\"))\n", " plot_hist(axe_bl_time, bl_data, \"private key bit length\", bins=11, range=(bit_size-10, bit_size+1), align=\"left\")\n", " axe_bl_time.set_xlim((bit_size-10, bit_size))\n", @@ -615,11 +615,11 @@ "center_w = widgets.IntSlider(min=min(data_trimmed[\"gen_time\"]),\n", " max=max(data_trimmed[\"gen_time\"]),\n", " step=1,\n", - " value=description_sign_trim.mean,\n", + " value=description_gen_trim.mean,\n", " continuous_update=False,\n", - " description=\"center {}\".format(sign_disp_unit))\n", + " description=\"center {}\".format(gen_disp_unit))\n", "width_w = widgets.IntSlider(min=1, max=100, continuous_update=False,\n", - " description=\"width {}\".format(sign_disp_unit))\n", + " description=\"width {}\".format(gen_disp_unit))\n", "w = interactive(f, center=center_w,\n", " width=width_w)\n", "display(w)" @@ -697,8 +697,8 @@ ], "metadata": { "@webio": { - "lastCommId": "bfabd932302644968194449673036179", - "lastKernelId": "b7098475-e3c7-43a2-9851-9b285c0afdc4" + "lastCommId": "654e0684d96844649d98c59269982aec", + "lastKernelId": "aa63ee10-ea6a-4bf0-9d7f-78e3bb9ee3a9" }, "hide_input": false, "kernelspec": { |
