From 76bbbb33b4df0b3948e3c6f5ecbca4aa1385b364 Mon Sep 17 00:00:00 2001 From: J08nY Date: Thu, 30 Jan 2025 15:14:12 +0100 Subject: Add exception to the set command that checks the generator and pubkey size. --- .../test/java/cz/crcs/ectester/common/CardIntegerPaddingTests.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common') diff --git a/common/src/test/java/cz/crcs/ectester/common/CardIntegerPaddingTests.java b/common/src/test/java/cz/crcs/ectester/common/CardIntegerPaddingTests.java index 560935f..fb8ed5f 100644 --- a/common/src/test/java/cz/crcs/ectester/common/CardIntegerPaddingTests.java +++ b/common/src/test/java/cz/crcs/ectester/common/CardIntegerPaddingTests.java @@ -94,6 +94,13 @@ public class CardIntegerPaddingTests { } catch (AssertionFailedError e) { errors.add(e); } + byte[][] field = curve.getParam(EC_Consts.PARAMETER_FP); + byte[] p = field[0]; + try { + assertEquals(bytes, p.length, "Curve: " + category.getName() + "/" + curve.getId() + " (p)"); + } catch (AssertionFailedError e) { + errors.add(e); + } } } } -- cgit v1.2.3-70-g09d2