Skip to content

Commit f980d69

Browse files
Remove unused Shr16()
1 parent 920f3b6 commit f980d69

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

Src/Autarkysoft.Bitcoin/Cryptography/EllipticCurve/Scalar8x32.cs

-26
Original file line numberDiff line numberDiff line change
@@ -1115,32 +1115,6 @@ private static Scalar8x32 Reduce(in Scalar8x32 r, uint overflow)
11151115
}
11161116

11171117

1118-
/// <summary>
1119-
/// Shift this scalar right by the given amount strictly between 0 and 16.
1120-
/// </summary>
1121-
/// <param name="shift">Shift must be between 0 and 16</param>
1122-
/// <param name="ret">Low bits that were shifted off</param>
1123-
/// <returns>Shifted scalar</returns>
1124-
public unsafe Scalar8x32 Shr16(int shift, out uint ret)
1125-
{
1126-
Debug.Assert(GetOverflow(this) == 0);
1127-
Debug.Assert(shift > 0);
1128-
Debug.Assert(shift < 16);
1129-
1130-
ret = b0 & ((1U << shift) - 1);
1131-
uint r0 = (b0 >> shift) + (b1 << (32 - shift));
1132-
uint r1 = (b1 >> shift) + (b2 << (32 - shift));
1133-
uint r2 = (b2 >> shift) + (b3 << (32 - shift));
1134-
uint r3 = (b3 >> shift) + (b4 << (32 - shift));
1135-
uint r4 = (b4 >> shift) + (b5 << (32 - shift));
1136-
uint r5 = (b5 >> shift) + (b6 << (32 - shift));
1137-
uint r6 = (b6 >> shift) + (b7 << (32 - shift));
1138-
uint r7 = (b7 >> shift);
1139-
1140-
return new Scalar8x32(r0, r1, r2, r3, r4, r5, r6, r7);
1141-
}
1142-
1143-
11441118
/// <summary>
11451119
/// Multiply a and b (without taking the modulus!), divide by 2**shift, and round to the nearest integer.
11461120
/// Shift must be at least 256

0 commit comments

Comments
 (0)