summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2021-11-27 15:50:40 +0100
committerDenys Vlasenko2021-11-27 15:50:40 +0100
commit8cbb70365f653397c8c2b9370214d5aed36ec9fa (patch)
treef7fe3cb62bb2a4e0e68de2606fb646a508b78b1c
parent4415f7bc06f1ee382bcbaabd86c3d7aca0b46d93 (diff)
downloadbusybox-8cbb70365f653397c8c2b9370214d5aed36ec9fa.zip
busybox-8cbb70365f653397c8c2b9370214d5aed36ec9fa.tar.gz
tls: P256: remove redundant zeroing in sp_256_map_8
Previous change made it obvious that we zero out already-zeroed high bits function old new delta sp_256_ecc_mulmod_8 534 494 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/tls_sp_c32.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/networking/tls_sp_c32.c b/networking/tls_sp_c32.c
index 74ded2c..baed62f 100644
--- a/networking/tls_sp_c32.c
+++ b/networking/tls_sp_c32.c
@@ -1062,7 +1062,6 @@ static void sp_256_map_8(sp_point* r, sp_point* p)
/* x /= z^2 */
sp_256to512z_mont_mul_8(r->x, p->x, t2 /*, p256_mod, p256_mp_mod*/);
- memset(r->x + 8, 0, sizeof(r->x) / 2);
sp_512to256_mont_reduce_8(r->x /*, p256_mod, p256_mp_mod*/);
/* Reduce x to less than modulus */
if (sp_256_cmp_8(r->x, p256_mod) >= 0)
@@ -1071,7 +1070,6 @@ static void sp_256_map_8(sp_point* r, sp_point* p)
/* y /= z^3 */
sp_256to512z_mont_mul_8(r->y, p->y, t1 /*, p256_mod, p256_mp_mod*/);
- memset(r->y + 8, 0, sizeof(r->y) / 2);
sp_512to256_mont_reduce_8(r->y /*, p256_mod, p256_mp_mod*/);
/* Reduce y to less than modulus */
if (sp_256_cmp_8(r->y, p256_mod) >= 0)