23 lines
612 B
Java
23 lines
612 B
Java
|
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() {
|
||
|
}
|
||
|
}
|