Package com.google.crypto.tink.signature
Class EcdsaPrivateKey
- java.lang.Object
-
- com.google.crypto.tink.Key
-
- com.google.crypto.tink.signature.SignaturePrivateKey
-
- com.google.crypto.tink.signature.EcdsaPrivateKey
-
- All Implemented Interfaces:
PrivateKey
@Immutable public final class EcdsaPrivateKey extends SignaturePrivateKey
Represents a key for computing ECDSA signatures.ECDSA is defined in http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf, section 6.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEcdsaPrivateKey.BuilderBuilder for EcdsaPrivateKey.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EcdsaPrivateKey.Builderbuilder()booleanequalsKey(Key o)Returns true if the key is guaranteed to be equal toother.EcdsaParametersgetParameters()Returns the parameters of this key.SecretBigIntegergetPrivateValue()EcdsaPublicKeygetPublicKey()Returns theSignaturePublicKey, which contains the verify function of the digital signature primitive.-
Methods inherited from class com.google.crypto.tink.signature.SignaturePrivateKey
getIdRequirementOrNull, getOutputPrefix
-
-
-
-
Method Detail
-
builder
public static EcdsaPrivateKey.Builder builder()
-
getParameters
public EcdsaParameters getParameters()
Description copied from class:SignaturePrivateKeyReturns the parameters of this key.Returns the same as
getPublicKey().getParameters().- Overrides:
getParametersin classSignaturePrivateKey
-
getPublicKey
public EcdsaPublicKey getPublicKey()
Description copied from class:SignaturePrivateKeyReturns theSignaturePublicKey, which contains the verify function of the digital signature primitive.- Specified by:
getPublicKeyin interfacePrivateKey- Specified by:
getPublicKeyin classSignaturePrivateKey
-
getPrivateValue
public SecretBigInteger getPrivateValue()
-
equalsKey
public boolean equalsKey(Key o)
Description copied from class:KeyReturns true if the key is guaranteed to be equal toother.Implementations are required to do this in constant time.
Note: this is allowed to return false even if two keys are guaranteed to represent the same function, but are represented differently. For example, a key is allowed to internally store the number of zero-bytes used as padding when a large number is represented as a byte array, and use this in the comparison.
Note: Tink
Keyobjects should typically not overridehashCode(because it could risk leaking key material). Hence, they typically also should not overrideequals.
-
-