Bouncy Castle Cryptography Library 1.84

org.bouncycastle.jcajce.provider.asymmetric.ec
Class GMKeyExchangeSpi

java.lang.Object
  extended byjavax.crypto.KeyAgreementSpi
      extended byorg.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
          extended byorg.bouncycastle.jcajce.provider.asymmetric.ec.GMKeyExchangeSpi
Direct Known Subclasses:
GMKeyExchangeSpi.SM2

public class GMKeyExchangeSpi
extends BaseAgreementSpi


Nested Class Summary
static class GMKeyExchangeSpi.SM2
           
 
Field Summary
 
Fields inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
kdf, ukmParameters, ukmParametersSalt
 
Constructor Summary
protected GMKeyExchangeSpi(java.lang.String kaAlgorithm)
           
 
Method Summary
protected  byte[] doCalcSecret()
           
protected  void doInitFromKey(java.security.Key key, java.security.spec.AlgorithmParameterSpec parameterSpec, java.security.SecureRandom random)
           
protected  java.security.Key engineDoPhase(java.security.Key key, boolean lastPhase)
           
 
Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
engineGenerateSecret, engineGenerateSecret, engineGenerateSecret, engineInit, engineInit, getAlgorithm, getKeySize, trimZeroes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMKeyExchangeSpi

protected GMKeyExchangeSpi(java.lang.String kaAlgorithm)
Method Detail

engineDoPhase

protected java.security.Key engineDoPhase(java.security.Key key,
                                          boolean lastPhase)
                                   throws java.security.InvalidKeyException,
                                          java.lang.IllegalStateException
Throws:
java.security.InvalidKeyException
java.lang.IllegalStateException

doInitFromKey

protected void doInitFromKey(java.security.Key key,
                             java.security.spec.AlgorithmParameterSpec parameterSpec,
                             java.security.SecureRandom random)
                      throws java.security.InvalidKeyException,
                             java.security.InvalidAlgorithmParameterException
Specified by:
doInitFromKey in class BaseAgreementSpi
Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException

doCalcSecret

protected byte[] doCalcSecret()
Specified by:
doCalcSecret in class BaseAgreementSpi

Bouncy Castle Cryptography Library 1.84