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

19 lines
575 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.pqc.crypto.newhope;
import org.bouncycastle.crypto.CipherParameters;
/* loaded from: classes6.dex */
public class NHAgreement {
private NHPrivateKeyParameters privKey;
public void init(CipherParameters cipherParameters) {
this.privKey = (NHPrivateKeyParameters) cipherParameters;
}
public byte[] calculateAgreement(CipherParameters cipherParameters) {
byte[] bArr = new byte[32];
NewHope.sharedA(bArr, this.privKey.secData, ((NHPublicKeyParameters) cipherParameters).pubData);
return bArr;
}
}