Package com.trilead.ssh2.signature
Class ECDSAKeyAlgorithm
- java.lang.Object
-
- com.trilead.ssh2.signature.KeyAlgorithm<java.security.interfaces.ECPublicKey,java.security.interfaces.ECPrivateKey>
-
- com.trilead.ssh2.signature.ECDSAKeyAlgorithm
-
- Direct Known Subclasses:
ECDSAKeyAlgorithm.ECDSASha2Nistp256
,ECDSAKeyAlgorithm.ECDSASha2Nistp384
,ECDSAKeyAlgorithm.ECDSASha2Nistp521
public abstract class ECDSAKeyAlgorithm extends KeyAlgorithm<java.security.interfaces.ECPublicKey,java.security.interfaces.ECPrivateKey>
- Author:
- Michael Clarke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ECDSAKeyAlgorithm.ECDSASha2Nistp256
static class
ECDSAKeyAlgorithm.ECDSASha2Nistp384
static class
ECDSAKeyAlgorithm.ECDSASha2Nistp521
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static java.security.spec.ECPoint
decodePoint(byte[] encodedPoint, java.security.spec.EllipticCurve curve)
java.security.interfaces.ECPublicKey
decodePublicKey(byte[] key)
byte[]
decodeSignature(byte[] encodedSignature)
static byte[]
encodePoint(java.security.spec.ECPoint group, java.security.spec.EllipticCurve curve)
byte[]
encodePublicKey(java.security.interfaces.ECPublicKey key)
byte[]
encodeSignature(byte[] sig)
abstract java.lang.String
getDigestAlgorithm()
static java.lang.String
getDigestAlgorithmForParams(java.security.interfaces.ECKey key)
java.security.spec.ECParameterSpec
getEcParameterSpec()
static ECDSAKeyAlgorithm
getVerifierForKey(java.security.interfaces.ECKey key)
boolean
supportsKey(java.security.PrivateKey originalKey)
-
Methods inherited from class com.trilead.ssh2.signature.KeyAlgorithm
generateSignature, getCertificateDecoders, getKeyFormat, verifySignature
-
-
-
-
Method Detail
-
getEcParameterSpec
public java.security.spec.ECParameterSpec getEcParameterSpec()
-
decodePublicKey
public java.security.interfaces.ECPublicKey decodePublicKey(byte[] key) throws java.io.IOException
- Specified by:
decodePublicKey
in classKeyAlgorithm<java.security.interfaces.ECPublicKey,java.security.interfaces.ECPrivateKey>
- Throws:
java.io.IOException
-
encodePublicKey
public byte[] encodePublicKey(java.security.interfaces.ECPublicKey key) throws java.io.IOException
- Specified by:
encodePublicKey
in classKeyAlgorithm<java.security.interfaces.ECPublicKey,java.security.interfaces.ECPrivateKey>
- Throws:
java.io.IOException
-
decodeSignature
public byte[] decodeSignature(byte[] encodedSignature) throws java.io.IOException
- Specified by:
decodeSignature
in classKeyAlgorithm<java.security.interfaces.ECPublicKey,java.security.interfaces.ECPrivateKey>
- Throws:
java.io.IOException
-
encodeSignature
public byte[] encodeSignature(byte[] sig) throws java.io.IOException
- Specified by:
encodeSignature
in classKeyAlgorithm<java.security.interfaces.ECPublicKey,java.security.interfaces.ECPrivateKey>
- Throws:
java.io.IOException
-
supportsKey
public boolean supportsKey(java.security.PrivateKey originalKey)
- Overrides:
supportsKey
in classKeyAlgorithm<java.security.interfaces.ECPublicKey,java.security.interfaces.ECPrivateKey>
-
decodePoint
public static java.security.spec.ECPoint decodePoint(byte[] encodedPoint, java.security.spec.EllipticCurve curve)
-
encodePoint
public static byte[] encodePoint(java.security.spec.ECPoint group, java.security.spec.EllipticCurve curve)
-
getDigestAlgorithmForParams
public static java.lang.String getDigestAlgorithmForParams(java.security.interfaces.ECKey key)
-
getVerifierForKey
public static ECDSAKeyAlgorithm getVerifierForKey(java.security.interfaces.ECKey key)
-
getDigestAlgorithm
public abstract java.lang.String getDigestAlgorithm()
-
-