org.bouncycastle.jce.provider
Class JCEECDHKeyAgreement
java.lang.Object
  
javax.crypto.KeyAgreementSpi
      
org.bouncycastle.jce.provider.JCEECDHKeyAgreement
- Direct Known Subclasses: 
 - JCEECDHKeyAgreement.DH
 
public class JCEECDHKeyAgreement
- extends KeyAgreementSpi
 
Diffie-Hellman key agreement using elliptic curve keys, ala IEEE P1363
 both the simple one, and the simple one with cofactors are supported.
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
JCEECDHKeyAgreement
protected JCEECDHKeyAgreement(BasicAgreement agreement)
doPhase
public Key doPhase(Key key,
                   boolean lastPhase)
            throws InvalidKeyException,
                   IllegalStateException
- Throws:
 InvalidKeyException
IllegalStateException
 
engineDoPhase
protected Key engineDoPhase(Key key,
                            boolean lastPhase)
                     throws InvalidKeyException,
                            IllegalStateException
- Specified by:
 engineDoPhase in class KeyAgreementSpi
 
- Throws:
 InvalidKeyException
IllegalStateException
 
generateSecret
public byte[] generateSecret()
                      throws IllegalStateException
- Throws:
 IllegalStateException
 
engineGenerateSecret
protected byte[] engineGenerateSecret()
                               throws IllegalStateException
- Specified by:
 engineGenerateSecret in class KeyAgreementSpi
 
- Throws:
 IllegalStateException
 
engineGenerateSecret
protected int engineGenerateSecret(byte[] sharedSecret,
                                   int offset)
                            throws IllegalStateException,
                                   ShortBufferException
- Specified by:
 engineGenerateSecret in class KeyAgreementSpi
 
- Throws:
 IllegalStateException
ShortBufferException
 
engineGenerateSecret
protected SecretKey engineGenerateSecret(String algorithm)
- Specified by:
 engineGenerateSecret in class KeyAgreementSpi
 
 
init
public void init(Key key)
          throws InvalidKeyException,
                 InvalidAlgorithmParameterException
- Throws:
 InvalidKeyException
InvalidAlgorithmParameterException
 
engineInit
protected void engineInit(Key key,
                          AlgorithmParameterSpec params,
                          SecureRandom random)
                   throws InvalidKeyException,
                          InvalidAlgorithmParameterException
- Specified by:
 engineInit in class KeyAgreementSpi
 
- Throws:
 InvalidKeyException
InvalidAlgorithmParameterException
 
engineInit
protected void engineInit(Key key,
                          SecureRandom random)
                   throws InvalidKeyException
- Specified by:
 engineInit in class KeyAgreementSpi
 
- Throws:
 InvalidKeyException