Bouncy Castle Cryptography Library 1.85.2

org.bouncycastle.crypto.params
Class ECPrivateKeyParameters

java.lang.Object
  extended byorg.bouncycastle.crypto.params.AsymmetricKeyParameter
      extended byorg.bouncycastle.crypto.params.ECKeyParameters
          extended byorg.bouncycastle.crypto.params.ECPrivateKeyParameters
All Implemented Interfaces:
CipherParameters, javax.security.auth.Destroyable

public class ECPrivateKeyParameters
extends ECKeyParameters
implements javax.security.auth.Destroyable


Constructor Summary
ECPrivateKeyParameters(java.math.BigInteger d, ECDomainParameters parameters)
           
 
Method Summary
 void destroy()
          Destroy this object, dropping its reference to the private value.
 java.math.BigInteger getD()
           
 boolean isDestroyed()
           
 
Methods inherited from class org.bouncycastle.crypto.params.ECKeyParameters
getParameters
 
Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECPrivateKeyParameters

public ECPrivateKeyParameters(java.math.BigInteger d,
                              ECDomainParameters parameters)
Method Detail

getD

public java.math.BigInteger getD()

destroy

public void destroy()
Destroy this object, dropping its reference to the private value.

As BigInteger is immutable the private value cannot be zeroized in place; destruction drops the internal reference so the value becomes unreachable (cleared on garbage collection). After destruction getD() throws IllegalStateException.

Specified by:
destroy in interface javax.security.auth.Destroyable

isDestroyed

public boolean isDestroyed()
Specified by:
isDestroyed in interface javax.security.auth.Destroyable

Bouncy Castle Cryptography Library 1.85.2