@@ -28,30 +28,31 @@ private BigInteger load_4(byte[] in, int offset) {
2828 * where l = 2^252 + 27742317777372353535851937790883648493.
2929 */
3030 public byte [] reduce (byte [] s ) {
31- BigInteger num = BigInteger .valueOf (2097151 );
32- long s0 = num .and (load_3 (s , 0 )).longValue ();
33- long s1 = num .and (load_4 (s , 2 ).shiftRight (5 )).longValue ();
34- long s2 = num .and (load_3 (s , 5 ).shiftRight (2 )).longValue ();
35- long s3 = num .and (load_4 (s , 7 ).shiftRight (7 )).longValue ();
36- long s4 = num .and (load_4 (s , 10 ).shiftRight (4 )).longValue ();
37- long s5 = num .and (load_3 (s , 13 ).shiftRight (1 )).longValue ();
38- long s6 = num .and (load_4 (s , 15 ).shiftRight (6 )).longValue ();
39- long s7 = num .and (load_3 (s , 18 ).shiftRight (3 )).longValue ();
40- long s8 = num .and (load_3 (s , 21 )).longValue ();
41- long s9 = num .and (load_4 (s , 23 ).shiftRight (5 )).longValue ();
42- long s10 = num .and (load_3 (s , 26 ).shiftRight (2 )).longValue ();
43- long s11 = num .and (load_4 (s , 28 ).shiftRight (7 )).longValue ();
44- long s12 = num .and (load_4 (s , 31 ).shiftRight (4 )).longValue ();
45- long s13 = num .and (load_3 (s , 34 ).shiftRight (1 )).longValue ();
46- long s14 = num .and (load_4 (s , 36 ).shiftRight (6 )).longValue ();
47- long s15 = num .and (load_3 (s , 39 ).shiftRight (3 )).longValue ();
48- long s16 = num .and (load_3 (s , 42 )).longValue ();
49- long s17 = num .and (load_4 (s , 44 ).shiftRight (5 )).longValue ();
50- long s18 = num .and (load_3 (s , 47 ).shiftRight (2 )).longValue ();
51- long s19 = num .and (load_4 (s , 49 ).shiftRight (7 )).longValue ();
52- long s20 = num .and (load_4 (s , 52 ).shiftRight (4 )).longValue ();
53- long s21 = num .and (load_3 (s , 55 ).shiftRight (1 )).longValue ();
54- long s22 = num .and (load_4 (s , 57 ).shiftRight (6 )).longValue ();
31+ BigInteger n2097151 = BigInteger .valueOf (2097151 );
32+
33+ long s0 = n2097151 .and (load_3 (s , 0 )).longValue ();
34+ long s1 = n2097151 .and (load_4 (s , 2 ).shiftRight (5 )).longValue ();
35+ long s2 = n2097151 .and (load_3 (s , 5 ).shiftRight (2 )).longValue ();
36+ long s3 = n2097151 .and (load_4 (s , 7 ).shiftRight (7 )).longValue ();
37+ long s4 = n2097151 .and (load_4 (s , 10 ).shiftRight (4 )).longValue ();
38+ long s5 = n2097151 .and (load_3 (s , 13 ).shiftRight (1 )).longValue ();
39+ long s6 = n2097151 .and (load_4 (s , 15 ).shiftRight (6 )).longValue ();
40+ long s7 = n2097151 .and (load_3 (s , 18 ).shiftRight (3 )).longValue ();
41+ long s8 = n2097151 .and (load_3 (s , 21 )).longValue ();
42+ long s9 = n2097151 .and (load_4 (s , 23 ).shiftRight (5 )).longValue ();
43+ long s10 = n2097151 .and (load_3 (s , 26 ).shiftRight (2 )).longValue ();
44+ long s11 = n2097151 .and (load_4 (s , 28 ).shiftRight (7 )).longValue ();
45+ long s12 = n2097151 .and (load_4 (s , 31 ).shiftRight (4 )).longValue ();
46+ long s13 = n2097151 .and (load_3 (s , 34 ).shiftRight (1 )).longValue ();
47+ long s14 = n2097151 .and (load_4 (s , 36 ).shiftRight (6 )).longValue ();
48+ long s15 = n2097151 .and (load_3 (s , 39 ).shiftRight (3 )).longValue ();
49+ long s16 = n2097151 .and (load_3 (s , 42 )).longValue ();
50+ long s17 = n2097151 .and (load_4 (s , 44 ).shiftRight (5 )).longValue ();
51+ long s18 = n2097151 .and (load_3 (s , 47 ).shiftRight (2 )).longValue ();
52+ long s19 = n2097151 .and (load_4 (s , 49 ).shiftRight (7 )).longValue ();
53+ long s20 = n2097151 .and (load_4 (s , 52 ).shiftRight (4 )).longValue ();
54+ long s21 = n2097151 .and (load_3 (s , 55 ).shiftRight (1 )).longValue ();
55+ long s22 = n2097151 .and (load_4 (s , 57 ).shiftRight (6 )).longValue ();
5556 long s23 = (load_4 (s , 60 ).shiftRight (3 )).longValue ();
5657 long carry0 ;
5758 long carry1 ;
0 commit comments