what-the-bank/sources/org/bouncycastle/pqc/crypto/newhope/Reduce.java

23 lines
612 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.pqc.crypto.newhope;
/* loaded from: classes6.dex */
class Reduce {
static final int QInv = 12287;
static final int RLog = 18;
static final int RMask = 262143;
/* JADX INFO: Access modifiers changed from: package-private */
public static short barrett(short s) {
int i = s & 65535;
return (short) (i - (((i * 5) >>> 16) * 12289));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static short montgomery(int i) {
return (short) (((((i * QInv) & RMask) * 12289) + i) >>> 18);
}
Reduce() {
}
}