[Cryptech-Commits] [core/pkey/ecdsa256] branch fix updated: Modified the test program to verify that changes in Verilog do work.

git at cryptech.is git at cryptech.is
Tue Apr 17 11:48:53 UTC 2018


This is an automated email from the git hooks/post-receive script.

meisterpaul1 at yandex.ru pushed a commit to branch fix
in repository core/pkey/ecdsa256.

The following commit(s) were added to refs/heads/fix by this push:
     new bbca088  Modified the test program to verify that changes in Verilog do work.
bbca088 is described below

commit bbca08857a55439eae903b891fcc7de5ebea61a7
Author: Pavel V. Shatov (Meister) <meisterpaul1 at yandex.ru>
AuthorDate: Tue Apr 17 14:48:03 2018 +0300

    Modified the test program to verify that changes in Verilog do work.
---
 stm32_driver/ecdsa256_driver_sample.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/stm32_driver/ecdsa256_driver_sample.c b/stm32_driver/ecdsa256_driver_sample.c
index fcfd3ae..1950491 100644
--- a/stm32_driver/ecdsa256_driver_sample.c
+++ b/stm32_driver/ecdsa256_driver_sample.c
@@ -122,22 +122,22 @@ int main()
 			
       ok = ok && test_p256_multiplier(p256_n, p256_z,  p256_z);		/* O = n * G */
 
-			ok = ok && test_p256_multiplier(p256_n1, p256_gx, p256_gy);	/* G = (n + 1) * G */
+      ok = ok && test_p256_multiplier(p256_n1, p256_gx, p256_gy);	/* G = (n + 1) * G */
 			
-			//
-			// The following two vectors test the virtually never taken path in the curve point
-			// addition routine when both input points are the same. During the first test (2 * G)
-			// the double of the base point is computed at the second doubling step of the multiplication
-			// algorithm, which does not require any special handling. During the second test the
-			// precomputed double of the base point (stored in internal read-only memory) is returned,
-			// because after doubling of G * ((n + 1) / 2) we get G * (n + 1) = G. The adder then has to
-			// compute G + G for which the formulae don't work, and special handling is required. The two
-			// test vectors verify that the hardcoded double of the base point matches the one computed
-			// on the fly. Note that in practice one should never be multiplying by anything larger than (n-1),
-			// because both the secret key and the per-message (random) number must be from [1, n-1].
-			//
-			ok = ok && test_p256_multiplier(p256_2, p256_hx, p256_hy);	/* H = 2 * G */
-			ok = ok && test_p256_multiplier(p256_n2, p256_hx, p256_hy);	/* H = (n + 2) * G */			
+	//
+	// The following two vectors test the virtually never taken path in the curve point
+	// addition routine when both input points are the same. During the first test (2 * G)
+	// the double of the base point is computed at the second doubling step of the multiplication
+	// algorithm, which does not require any special handling. During the second test the
+	// precomputed double of the base point (stored in internal read-only memory) is returned,
+	// because after doubling of G * ((n + 1) / 2) we get G * (n + 1) = G. The adder then has to
+	// compute G + G for which the formulae don't work, and special handling is required. The two
+	// test vectors verify that the hardcoded double of the base point matches the one computed
+	// on the fly. Note that in practice one should never be multiplying by anything larger than (n-1),
+	// because both the secret key and the per-message (random) number must be from [1, n-1].
+	//
+	ok = ok && test_p256_multiplier(p256_2, p256_hx, p256_hy);	/* H = 2 * G */
+	ok = ok && test_p256_multiplier(p256_n2, p256_hx, p256_hy);	/* H = (n + 2) * G */			
 			
       if (!ok) {
 				led_off(LED_GREEN);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list