From 44da462ba03951c22b1fa552f4d74b1a69882197 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 10 Mar 2014 13:51:28 +0700 Subject: Refactor temporary variables in reductions --- crypto/src/math/ec/custom/sec/SecP224R1Field.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'crypto/src/math/ec/custom/sec/SecP224R1Field.cs') diff --git a/crypto/src/math/ec/custom/sec/SecP224R1Field.cs b/crypto/src/math/ec/custom/sec/SecP224R1Field.cs index 17c9b92a5..51d9020b6 100644 --- a/crypto/src/math/ec/custom/sec/SecP224R1Field.cs +++ b/crypto/src/math/ec/custom/sec/SecP224R1Field.cs @@ -88,16 +88,13 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec public static void Reduce(uint[] xx, uint[] z) { - long xx07 = xx[7], xx08 = xx[8], xx09 = xx[9], xx10 = xx[10]; - long xx11 = xx[11], xx12 = xx[12], xx13 = xx[13]; - - long t0 = xx07 + xx11; - long t1 = xx08 + xx12; - long t2 = xx09 + xx13; + long xx10 = xx[10], xx11 = xx[11], xx12 = xx[12], xx13 = xx[13]; const long n = 1; - t0 -= n; + long t0 = (long)xx[7] + xx11 - n; + long t1 = (long)xx[8] + xx12; + long t2 = (long)xx[9] + xx13; long cc = 0; cc += (long)xx[0] - t0; -- cgit 1.4.1