From 6e93b823e5a3aaab738af143d9c1ed07d8c56fcd Mon Sep 17 00:00:00 2001
From: J08nY
Date: Mon, 26 Feb 2018 20:34:45 +0100
Subject: Add 2D histogram into util/plot_*.py scripts.
---
util/plot_gen.py | 37 ++++++++++++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 3 deletions(-)
(limited to 'util/plot_gen.py')
diff --git a/util/plot_gen.py b/util/plot_gen.py
index 12f7089..848d812 100755
--- a/util/plot_gen.py
+++ b/util/plot_gen.py
@@ -14,7 +14,9 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
+import matplotlib.colors as colors
from operator import itemgetter
+from copy import deepcopy
import argparse
if __name__ == "__main__":
@@ -23,6 +25,7 @@ if __name__ == "__main__":
parser.add_argument("--pub", dest="pub", action="store_true", help="Show public key scatter plot.")
parser.add_argument("--priv", dest="priv", action="store_true", help="Show private key scatter plot.")
parser.add_argument("--hist", dest="hist", action="store_true", help="Show histogram.")
+ parser.add_argument("--hw-hist", dest="hw_hist", action="store_true", help="Show Hamming weight 2D histogram (private key Hamming weight and generation time).")
parser.add_argument("--skip-first", dest="skip_first", action="store_true", help="Skip first entry, as it's usually a large outlier.")
parser.add_argument("file", type=str, help="The file to plot(csv).")
@@ -32,11 +35,11 @@ if __name__ == "__main__":
header = f.readline()
header_names = header.split(";")
- plots = [opts.priv, opts.pub, opts.hist]
+ plots = [opts.priv, opts.pub, opts.hist, opts.hw_hist]
n_plots = sum(plots)
if n_plots == 0:
- n_plots = 3
- plots = [True, True, True]
+ n_plots = 4
+ plots = [True, True, True, True]
hx = lambda x: int(x, 16)
data = np.genfromtxt(opts.file, delimiter=";", skip_header=1, converters={2: hx, 3: hx}, dtype=np.dtype([("index","u4"), ("time","u4"), ("pub", "O"), ("priv", "O")]))
@@ -83,7 +86,35 @@ if __name__ == "__main__":
axe_hist.set_xlabel("time ({})".format(unit))
axe_hist.xaxis.set_major_locator(ticker.MaxNLocator())
axe_hist.legend(loc="best")
+ plot_i += 1
+ if plots[3]:
+ priv_bit_bins = {}
+ for i in range(len(data)):
+ skey = priv_data[i]
+ time = time_data[i]
+ skey_hw = 0
+ while skey:
+ skey_hw += 1
+ skey &= skey - 1
+ if skey_hw in priv_bit_bins:
+ priv_bit_bins[skey_hw].append(time)
+ else:
+ priv_bit_bins[skey_hw] = [time]
+ priv_bit_x = []
+ priv_bit_y = []
+ for k,v in priv_bit_bins.items():
+ priv_bit_x.extend([k] * len(v))
+ priv_bit_y.extend(v)
+ axe_priv_hist = fig.add_subplot(n_plots, 1, plot_i)
+ h, xe, ye = np.histogram2d(priv_bit_x, priv_bit_y, bins=[max(priv_bit_bins) - min(priv_bit_bins), (max(time_data) - min(time_data))/5])
+ cmap = deepcopy(plt.cm.plasma)
+ cmap.set_bad("black")
+ im = axe_priv_hist.imshow(h.T, origin="low", cmap=cmap, aspect="auto", extent=[xe[0], xe[-1], ye[0], ye[-1]], norm=colors.LogNorm())
+ axe_priv_hist.set_xlabel("private key Hamming weight")
+ axe_priv_hist.set_ylabel("time ({})".format(unit))
+ fig.colorbar(im, ax=axe_priv_hist)
+
fig.text(0.01, 0.02, "Data size: {}".format(len(time_data)), size="small")
if opts.output is None:
--
cgit v1.2.3-70-g09d2
From a371a837ba18c751af41ce003d06ebd86ab43e02 Mon Sep 17 00:00:00 2001
From: J08nY
Date: Wed, 21 Mar 2018 20:00:12 +0100
Subject: Move utility scripts to Python 3.
---
util/plot_dh.py | 13 +++++++------
util/plot_gen.py | 11 ++++++-----
2 files changed, 13 insertions(+), 11 deletions(-)
(limited to 'util/plot_gen.py')
diff --git a/util/plot_dh.py b/util/plot_dh.py
index 9f4f315..81bf441 100755
--- a/util/plot_dh.py
+++ b/util/plot_dh.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#
# Script for plotting ECTester ECDH results.
@@ -41,9 +41,10 @@ if __name__ == "__main__":
else:
unit = r"ms"
time_data = map(itemgetter(1), data)
- priv_data = map(itemgetter(2), data)
- pub_data = map(itemgetter(3), data)
- secret_data = map(itemgetter(4), data)
+ time_data = list(time_data)
+ priv_data = list(map(itemgetter(2), data))
+ pub_data = list(map(itemgetter(3), data))
+ secret_data = list(map(itemgetter(4), data))
plt.style.use("ggplot")
fig = plt.figure(tight_layout=True)
@@ -53,7 +54,7 @@ if __name__ == "__main__":
time_max = max(time_data)
time_avg = np.average(time_data)
time_median = np.median(time_data)
- axe_hist.hist(time_data, bins=time_max/3, log=True)
+ axe_hist.hist(time_data, bins=time_max//3, log=True)
axe_hist.axvline(x=time_avg, alpha=0.7, linestyle="dotted", color="red", label="avg = {}".format(time_avg))
axe_hist.axvline(x=time_median, alpha=0.7, linestyle="dotted", color="green", label="median = {}".format(time_median))
axe_hist.set_ylabel("count\n(log)")
@@ -80,7 +81,7 @@ if __name__ == "__main__":
priv_bit_y.extend(v)
axe_priv_hist = fig.add_subplot(2,1,2)
- h, xe, ye = np.histogram2d(priv_bit_x, priv_bit_y, bins=[max(priv_bit_bins) - min(priv_bit_bins), (time_max - min(time_data))/5])
+ h, xe, ye = np.histogram2d(priv_bit_x, priv_bit_y, bins=[max(priv_bit_bins) - min(priv_bit_bins), (time_max - min(time_data))//5])
cmap = deepcopy(plt.cm.plasma)
cmap.set_bad("black")
im = axe_priv_hist.imshow(h.T, origin="low", cmap=cmap, aspect="auto", extent=[xe[0], xe[-1], ye[0], ye[-1]], norm=colors.LogNorm())
diff --git a/util/plot_gen.py b/util/plot_gen.py
index 848d812..b96382d 100755
--- a/util/plot_gen.py
+++ b/util/plot_gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#
# Script for plotting ECTester key generation results.
@@ -52,8 +52,9 @@ if __name__ == "__main__":
else:
unit = r"ms"
time_data = map(itemgetter(1), data)
- priv_data = map(itemgetter(2), data)
- pub_data = map(itemgetter(3), data)
+ time_data = list(time_data)
+ priv_data = list(map(itemgetter(2), data))
+ pub_data = list(map(itemgetter(3), data))
plt.style.use("ggplot")
fig = plt.figure(tight_layout=True)
@@ -79,7 +80,7 @@ if __name__ == "__main__":
time_max = max(time_data)
time_avg = np.average(time_data)
time_median = np.median(time_data)
- axe_hist.hist(time_data, bins=time_max/3, log=True)
+ axe_hist.hist(time_data, bins=time_max//3, log=True)
axe_hist.axvline(x=time_avg, alpha=0.7, linestyle="dotted", color="red", label="avg = {}".format(time_avg))
axe_hist.axvline(x=time_median, alpha=0.7, linestyle="dotted", color="green", label="median = {}".format(time_median))
axe_hist.set_ylabel("count\n(log)")
@@ -107,7 +108,7 @@ if __name__ == "__main__":
priv_bit_x.extend([k] * len(v))
priv_bit_y.extend(v)
axe_priv_hist = fig.add_subplot(n_plots, 1, plot_i)
- h, xe, ye = np.histogram2d(priv_bit_x, priv_bit_y, bins=[max(priv_bit_bins) - min(priv_bit_bins), (max(time_data) - min(time_data))/5])
+ h, xe, ye = np.histogram2d(priv_bit_x, priv_bit_y, bins=[max(priv_bit_bins) - min(priv_bit_bins), (max(time_data) - min(time_data))//5])
cmap = deepcopy(plt.cm.plasma)
cmap.set_bad("black")
im = axe_priv_hist.imshow(h.T, origin="low", cmap=cmap, aspect="auto", extent=[xe[0], xe[-1], ye[0], ye[-1]], norm=colors.LogNorm())
--
cgit v1.2.3-70-g09d2
From 08088e5563f602eb87fb3ef90770df9cc2faa282 Mon Sep 17 00:00:00 2001
From: J08nY
Date: Wed, 21 Mar 2018 20:35:19 +0100
Subject: Fix utility scripts on Python 3.
---
util/plot_dh.py | 2 +-
util/plot_gen.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'util/plot_gen.py')
diff --git a/util/plot_dh.py b/util/plot_dh.py
index 81bf441..327e28a 100755
--- a/util/plot_dh.py
+++ b/util/plot_dh.py
@@ -37,7 +37,7 @@ if __name__ == "__main__":
if "nano" in header_names[1]:
unit = r"$\mu s$"
- time_data = map(lambda x: x[1]/1000, data)
+ time_data = map(lambda x: x[1]//1000, data)
else:
unit = r"ms"
time_data = map(itemgetter(1), data)
diff --git a/util/plot_gen.py b/util/plot_gen.py
index b96382d..2ae03ef 100755
--- a/util/plot_gen.py
+++ b/util/plot_gen.py
@@ -48,7 +48,7 @@ if __name__ == "__main__":
if "nano" in header_names[1]:
unit = r"$\mu s$"
- time_data = map(lambda x: x[1]/1000, data)
+ time_data = map(lambda x: x[1]//1000, data)
else:
unit = r"ms"
time_data = map(itemgetter(1), data)
--
cgit v1.2.3-70-g09d2
From 2d5d9dfa09ab6c06efe347d41de00bfed39ab039 Mon Sep 17 00:00:00 2001
From: J08nY
Date: Fri, 23 Mar 2018 23:55:18 +0100
Subject: Fix utility scripts.
---
util/plot_dh.py | 6 ++++--
util/plot_gen.py | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
(limited to 'util/plot_gen.py')
diff --git a/util/plot_dh.py b/util/plot_dh.py
index 327e28a..55e11b3 100755
--- a/util/plot_dh.py
+++ b/util/plot_dh.py
@@ -47,7 +47,8 @@ if __name__ == "__main__":
secret_data = list(map(itemgetter(4), data))
plt.style.use("ggplot")
- fig = plt.figure(tight_layout=True)
+ fig = plt.figure()
+ fig.tight_layout(rect=[0, 0.02, 1, 0.98])
fig.suptitle(opts.file)
axe_hist = fig.add_subplot(2,1,1)
@@ -95,4 +96,5 @@ if __name__ == "__main__":
plt.show()
else:
fig.set_size_inches(12, 10)
- plt.savefig(opts.output, dpi=400)
+ ext = opts.output.name.split(".")[-1]
+ plt.savefig(opts.output, format=ext, dpi=400)
diff --git a/util/plot_gen.py b/util/plot_gen.py
index 2ae03ef..f24fd2c 100755
--- a/util/plot_gen.py
+++ b/util/plot_gen.py
@@ -57,7 +57,8 @@ if __name__ == "__main__":
pub_data = list(map(itemgetter(3), data))
plt.style.use("ggplot")
- fig = plt.figure(tight_layout=True)
+ fig = plt.figure()
+ fig.tight_layout(rect=[0, 0.02, 1, 0.98])
fig.suptitle(opts.file)
plot_i = 1
@@ -122,4 +123,5 @@ if __name__ == "__main__":
plt.show()
else:
fig.set_size_inches(12, 10)
- plt.savefig(opts.output, dpi=400)
+ ext = opts.output.name.split(".")[-1]
+ plt.savefig(opts.output, format=ext, dpi=400)
--
cgit v1.2.3-70-g09d2
From e2b6a298522e6206903dcd0a0455431fb647d5d4 Mon Sep 17 00:00:00 2001
From: J08nY
Date: Wed, 28 Mar 2018 14:30:08 +0200
Subject: Fix utility scripts adding a subtitle.
---
util/plot_dh.py | 11 +++++++++--
util/plot_gen.py | 11 +++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
(limited to 'util/plot_gen.py')
diff --git a/util/plot_dh.py b/util/plot_dh.py
index 55e11b3..33fc3eb 100755
--- a/util/plot_dh.py
+++ b/util/plot_dh.py
@@ -22,6 +22,7 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Plot ECTester ECDH timing.")
parser.add_argument("-o", "--output", dest="output", type=argparse.FileType("wb"), help="Write image to [file], do not display.", metavar="file")
parser.add_argument("--skip-first", dest="skip_first", action="store_true", help="Skip first entry, as it's usually a large outlier.")
+ parser.add_argument("-t", "--title", dest="title", nargs="?", default="", type=str, help="What title to give the figure.")
parser.add_argument("file", type=str, help="The file to plot(csv).")
opts = parser.parse_args()
@@ -48,8 +49,14 @@ if __name__ == "__main__":
plt.style.use("ggplot")
fig = plt.figure()
- fig.tight_layout(rect=[0, 0.02, 1, 0.98])
- fig.suptitle(opts.file)
+ layout_kwargs = {}
+ if opts.title is None:
+ fig.suptitle(opts.file)
+ layout_kwargs["rect"] = [0, 0.02, 1, 0.98]
+ elif opts.title:
+ fig.suptitle(opts.title)
+ layout_kwargs["rect"] = [0, 0.02, 1, 0.98]
+ fig.tight_layout(**layout_kwargs)
axe_hist = fig.add_subplot(2,1,1)
time_max = max(time_data)
diff --git a/util/plot_gen.py b/util/plot_gen.py
index f24fd2c..c37d7c2 100755
--- a/util/plot_gen.py
+++ b/util/plot_gen.py
@@ -27,6 +27,7 @@ if __name__ == "__main__":
parser.add_argument("--hist", dest="hist", action="store_true", help="Show histogram.")
parser.add_argument("--hw-hist", dest="hw_hist", action="store_true", help="Show Hamming weight 2D histogram (private key Hamming weight and generation time).")
parser.add_argument("--skip-first", dest="skip_first", action="store_true", help="Skip first entry, as it's usually a large outlier.")
+ parser.add_argument("-t", "--title", dest="title", type=str, nargs="?", default="", help="What title to give the figure.")
parser.add_argument("file", type=str, help="The file to plot(csv).")
opts = parser.parse_args()
@@ -58,8 +59,14 @@ if __name__ == "__main__":
plt.style.use("ggplot")
fig = plt.figure()
- fig.tight_layout(rect=[0, 0.02, 1, 0.98])
- fig.suptitle(opts.file)
+ layout_kwargs = {}
+ if opts.title is None:
+ fig.suptitle(opts.file)
+ layout_kwargs["rect"] = [0, 0.02, 1, 0.98]
+ elif opts.title:
+ fig.suptitle(opts.title)
+ layout_kwargs["rect"] = [0, 0.02, 1, 0.98]
+ fig.tight_layout(**layout_kwargs)
plot_i = 1
if plots[0]:
--
cgit v1.2.3-70-g09d2
From 8294f8be5b4f374950bf640a6614fc7ae2e4675c Mon Sep 17 00:00:00 2001
From: J08nY
Date: Thu, 29 Mar 2018 01:20:02 +0200
Subject: Add some points of larger order to invalid secg curves.
---
src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml | 19 +++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml | 19 +++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml | 18 ++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml | 19 +++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml | 19 +++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml | 19 +++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml | 19 +++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml | 19 +++++++++++++++++++
src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml | 19 +++++++++++++++++++
util/plot_dh.py | 2 +-
util/plot_gen.py | 7 ++++---
11 files changed, 175 insertions(+), 4 deletions(-)
(limited to 'util/plot_gen.py')
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml
index ae8da15..316f0f6 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp112r1.xml
@@ -245,3 +245,22 @@
secg/secp112r1
invalid order = 179
+
+
+ secp112r1/41
+ 0x8eac00cf476993c428eaf07c80f1,0x27977f0c5acb323667408f21d143
+ secg/secp112r1
+ invalid order = 353
+
+
+ secp112r1/42
+ 0x8c5a6233e53b2c6b6fcf33af2726,0x5a04f74d8b5e220e8c23d1f21bb6
+ secg/secp112r1
+ invalid order = 631
+
+
+ secp112r1/43
+ 0x5a4479a257ed4b9a519f29184712,0x58c11aa81217d4ce67d8f05da930
+ secg/secp112r1
+ invalid order = 1231
+
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml b/src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml
index 9dc187e..536cb56 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp112r2.xml
@@ -245,3 +245,22 @@
secg/secp112r2
invalid order = 179
+
+
+ secp112r2/41
+ 0x6fffe4ca3cbda6828ddd63e9ab11,0xcf5e055aa2a94c0d7214d998c3a0
+ secg/secp112r2
+ invalid order = 353
+
+
+ secp112r2/42
+ 0x3813064a869de8884025d85736c0,0xd71ae54681ffc105144c8f7ba5bb
+ secg/secp112r2
+ invalid order = 631
+
+
+ secp112r2/43
+ 0x6906e5609f3d9e47c7cd961dc08e,0x7fccd8384db6b6fcc842a4f397fd
+ secg/secp112r2
+ invalid order = 1231
+
\ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml
index f038656..76f0aff 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp128r1.xml
@@ -269,3 +269,21 @@
secg/secp128r1
invalid order = 197
+
+ secp128r1/45
+ 0xea08890b70e94ac5d53514b583580faf,0x6cc66b4eedab2a8f01a0b41195271853
+ secg/secp128r1
+ invalid order = 359
+
+
+ secp128r1/46
+ 0x0ae9c73132e5ef2fd82d06b0f50bfe64,0x9b78c29bdf53038463fa4bf2edb4297a
+ secg/secp128r1
+ invalid order = 601
+
+
+ secp128r1/47
+ 0xd3522b2fb7fd15b8fbaf10a9abc60ca9,0x21236ba59e5a40eb9881a0218a2c2359
+ secg/secp128r1
+ invalid order = 1103
+
\ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml b/src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml
index ecb62bf..11fc0d8 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp128r2.xml
@@ -269,3 +269,22 @@
secg/secp128r2
invalid order = 197
+
+
+ secp128r2/45
+ 0x33c5f2e6190f7a3c23dbc5a1020e0f32,0x40afb310a8c5537ecc07c59d971c5fe6
+ secg/secp128r2
+ invalid order = 359
+
+
+ secp128r2/46
+ 0xd5392aed70323f8a02ec104dbd3dd3f2,0x0733de2e9d20bb117a632a9b5ff3c1a3
+ secg/secp128r2
+ invalid order = 631
+
+
+ secp128r2/47
+ 0x005a0ea68afd5793063d4537045e5cba,0x6ec5978352c81a646fc1b29491a62a59
+ secg/secp128r2
+ invalid order = 1103
+
\ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml
index 10fc5a0..c9ae8da 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp160r1.xml
@@ -323,3 +323,22 @@
secg/secp160r1
invalid order = 251
+
+
+ secp160r1/54
+ 0x8932e643678c5a324d7a2cf47528676d08f135d5,0x3a6a976e51623bf13d8d339312e2e65c9b29ea04
+ secg/secp160r1
+ invalid order = 353
+
+
+ secp160r1/55
+ 0xaee7bf31f3d12332e5e529eb0a7732ac913d0211,0xaa88ae4645cac4e7970a764e486774b2398e9fd0
+ secg/secp160r1
+ invalid order = 613
+
+
+ secp160r1/56
+ 0xc0a7736e7eec336eb3b7f853a832d4eec1d6f33f,0x2d7c536a1ee9cca9bb504755225c678f64ed5275
+ secg/secp160r1
+ invalid order = 1123
+
\ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml b/src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml
index 596fc6c..b1658c5 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp160r2.xml
@@ -323,3 +323,22 @@
secg/secp160r2
invalid order = 251
+
+
+ secp160r2/54
+ 0x15567f6e8e2d4a71ed809adbd53c620b3d674ca4,0xb418ff9fdc1eb410dd53064090099e76473d3f61
+ secg/secp160r2
+ invalid order = 353
+
+
+ secp160r2/55
+ 0x490905f64c868304641864ca9ad90fa48475f765,0xb52e302f7fe9c63a9bf6124daff99e7e3c7f9fda
+ secg/secp160r2
+ invalid order = 613
+
+
+ secp160r2/56
+ 0x1de73470d9a5ed4c6bb7a4c162956d20c1c2a38a,0x8037b163763d4dfd2d218f7d85d17c06bfa07ecc
+ secg/secp160r2
+ invalid order = 1123
+
\ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml
index 151189e..e823fed 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp192r1.xml
@@ -371,3 +371,22 @@
secg/secp192r1
invalid order = 293
+
+
+ secp192r1/62
+ 0x64f88f2014026439717b443fd0e9656bae76bc12e04846a6,0xed20d8d4ee021c98be74fdfd4e545fb8b8e529f269f6059e
+ secg/secp192r1
+ invalid order = 353
+
+
+ secp192r1/63
+ 0xeed3216e47d486fc7d1717e5732e1ef5409b84a0777df50a,0x20b7bcc21f15418b75ef425fcb0c7caf87c9ccad70e06142
+ secg/secp192r1
+ invalid order = 631
+
+
+ secp192r1/64
+ 0xc26950fdd51d386cf3c9d8e3e78c33e10e1046bfd5c41d8a,0x8bea331f38d09138dd75f414466db8c13948f8c6ddcc5def
+ secg/secp192r1
+ invalid order = 1231
+
\ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml
index aea9831..3f8c8fc 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp224r1.xml
@@ -413,3 +413,22 @@
secg/secp224r1
invalid order = 347
+
+
+ secp224r1/69
+ 0x21224a2e74c519b044cb0885bb4d39c93d459cb810a486e2bd257380,0xfcf0f5c414e98767bdd0a95887aa065634102f61afcbe13b7f1918c9
+ secg/secp224r1
+ invalid order = 353
+
+
+ secp224r1/70
+ 0xc81155743c1ce0d22f9bbc7acf64666e1e82973866c63e7e10a295c3,0x83ddf0ad6ed67e8863f3830e0ef6e76857b2d21d6de3ce9bc60153a0
+ secg/secp224r1
+ invalid order = 631
+
+
+ secp224r1/71
+ 0x74c39d25aaff45aea0a1e2a1f76ce58fc56bfff0b92f21ecea29b582,0x9a1f6fee02efe3a3013501fb4b77f9f6e6ca633463809207319a0787
+ secg/secp224r1
+ invalid order = 1231
+
\ No newline at end of file
diff --git a/src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml b/src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml
index 6f93370..2c23ea7 100644
--- a/src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml
+++ b/src/cz/crcs/ectester/data/invalid/secg/secp256r1.xml
@@ -461,3 +461,22 @@
secg/secp256r1
invalid order = 389
+
+
+ secp256r1/77
+ 0xb1b630092fa728b962bda086704dd16628d8ba65a5836f0e5ab6b268b1874346,0x6741a8de59e27d93c2afe35d02a62a0d6ca1d410f02fa272c916457c3d64024e
+ secg/secp256r1
+ invalid order = 353
+
+
+ secp256r1/78
+ 0x8ccf453921033e2a0e2d612103f9d6037bede19bce172bc7e4cfab350dba5c1b,0x4f381c96db7205602819de572b088b81cd8aad51dec5367b2572d07ec174b13b
+ secg/secp256r1
+ invalid order = 631
+
+
+ secp256r1/79
+ 0xed9c0943430dbb23b735c527f5376eb1f159ce7ed42d725f89b03d2b4004dd93,0xc8e98a510b4d1988d8291c4f59b99894285b0a18801ec46e1d732c37fbbe6027
+ secg/secp256r1
+ invalid order = 1231
+
\ No newline at end of file
diff --git a/util/plot_dh.py b/util/plot_dh.py
index 33fc3eb..468e73a 100755
--- a/util/plot_dh.py
+++ b/util/plot_dh.py
@@ -104,4 +104,4 @@ if __name__ == "__main__":
else:
fig.set_size_inches(12, 10)
ext = opts.output.name.split(".")[-1]
- plt.savefig(opts.output, format=ext, dpi=400)
+ plt.savefig(opts.output, format=ext, dpi=400, bbox_inches='tight')
diff --git a/util/plot_gen.py b/util/plot_gen.py
index c37d7c2..98d8261 100755
--- a/util/plot_gen.py
+++ b/util/plot_gen.py
@@ -123,12 +123,13 @@ if __name__ == "__main__":
axe_priv_hist.set_xlabel("private key Hamming weight")
axe_priv_hist.set_ylabel("time ({})".format(unit))
fig.colorbar(im, ax=axe_priv_hist)
-
- fig.text(0.01, 0.02, "Data size: {}".format(len(time_data)), size="small")
+
+ if plot_i > 2:
+ fig.text(0.01, 0.02, "Data size: {}".format(len(time_data)), size="small")
if opts.output is None:
plt.show()
else:
fig.set_size_inches(12, 10)
ext = opts.output.name.split(".")[-1]
- plt.savefig(opts.output, format=ext, dpi=400)
+ plt.savefig(opts.output, format=ext, dpi=400, bbox_inches='tight')
--
cgit v1.2.3-70-g09d2