diff options
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/math/ec/LongArray.java')
-rw-r--r-- | bcprov/src/main/java/org/bouncycastle/math/ec/LongArray.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/math/ec/LongArray.java b/bcprov/src/main/java/org/bouncycastle/math/ec/LongArray.java index e3069dc0..b963118a 100644 --- a/bcprov/src/main/java/org/bouncycastle/math/ec/LongArray.java +++ b/bcprov/src/main/java/org/bouncycastle/math/ec/LongArray.java @@ -4,15 +4,17 @@ import org.bouncycastle.util.Arrays; import java.math.BigInteger; -class LongArray +class LongArray implements Cloneable { // private static long DEINTERLEAVE_MASK = 0x5555555555555555L; /* * This expands 8 bit indices into 16 bit contents (high bit 14), by inserting 0s between bits. * In a binary field, this operation is the same as squaring an 8 bit number. + * + * NOTE: All entries are positive so sign-extension is not an issue. */ - private static final int[] INTERLEAVE2_TABLE = new int[] + private static final short[] INTERLEAVE2_TABLE = new short[] { 0x0000, 0x0001, 0x0004, 0x0005, 0x0010, 0x0011, 0x0014, 0x0015, 0x0040, 0x0041, 0x0044, 0x0045, 0x0050, 0x0051, 0x0054, 0x0055, |