Class KeyAgreementSpi
- java.lang.Object
-
- javax.crypto.KeyAgreementSpi
-
- org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
-
- org.bouncycastle.pqc.jcajce.provider.newhope.KeyAgreementSpi
-
public class KeyAgreementSpi extends BaseAgreementSpi
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
kaAlgorithm, kdf, ukmParameters
-
-
Constructor Summary
Constructors Constructor Description KeyAgreementSpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
calcSecret()
protected java.security.Key
engineDoPhase(java.security.Key key, boolean lastPhase)
protected byte[]
engineGenerateSecret()
protected int
engineGenerateSecret(byte[] bytes, int offset)
protected void
engineInit(java.security.Key key, java.security.SecureRandom secureRandom)
protected void
engineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec algorithmParameterSpec, java.security.SecureRandom secureRandom)
-
Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
engineGenerateSecret, getAlgorithm, getKeySize, trimZeroes
-
-
-
-
Method Detail
-
engineInit
protected void engineInit(java.security.Key key, java.security.SecureRandom secureRandom) throws java.security.InvalidKeyException
- Specified by:
engineInit
in classjavax.crypto.KeyAgreementSpi
- Throws:
java.security.InvalidKeyException
-
engineInit
protected void engineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec algorithmParameterSpec, java.security.SecureRandom secureRandom) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException
- Specified by:
engineInit
in classjavax.crypto.KeyAgreementSpi
- Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException
-
engineDoPhase
protected java.security.Key engineDoPhase(java.security.Key key, boolean lastPhase) throws java.security.InvalidKeyException, java.lang.IllegalStateException
- Specified by:
engineDoPhase
in classjavax.crypto.KeyAgreementSpi
- Throws:
java.security.InvalidKeyException
java.lang.IllegalStateException
-
engineGenerateSecret
protected byte[] engineGenerateSecret() throws java.lang.IllegalStateException
- Overrides:
engineGenerateSecret
in classBaseAgreementSpi
- Throws:
java.lang.IllegalStateException
-
engineGenerateSecret
protected int engineGenerateSecret(byte[] bytes, int offset) throws java.lang.IllegalStateException, javax.crypto.ShortBufferException
- Overrides:
engineGenerateSecret
in classBaseAgreementSpi
- Throws:
java.lang.IllegalStateException
javax.crypto.ShortBufferException
-
calcSecret
protected byte[] calcSecret()
- Specified by:
calcSecret
in classBaseAgreementSpi
-
-