com.mindbright.ssh2
public abstract class SSH2ECDSASHA2NIST extends SSH2SimpleSignature
| Modifier and Type | Class and Description |
|---|---|
static class |
SSH2ECDSASHA2NIST.P256 |
static class |
SSH2ECDSASHA2NIST.P384 |
static class |
SSH2ECDSASHA2NIST.P521 |
draftIncompatibleSignature, signatureAlgorithm, ssh2KeyFormatalgorithm, pubKeyBlob, publicKey, signature| Constructor and Description |
|---|
SSH2ECDSASHA2NIST(java.lang.String algo,
java.lang.String sshname,
java.lang.String curve) |
| Modifier and Type | Method and Description |
|---|---|
protected java.security.PublicKey |
decodePublicKey(byte[] pubKeyBlob)
Decode a public key blob.
|
protected byte[] |
encodePublicKey(java.security.PublicKey publicKey)
Encode the given public key into a public key blob.
|
static java.security.spec.ECParameterSpec |
getParamsForCurve(java.lang.String curve) |
byte[] |
sign(byte[] data)
Sign the given data.
|
boolean |
verify(byte[] sigBlob,
byte[] data)
Verify that the given signature matches the given data and the
public key.
|
decodeSignature, encodeSignature, getKeyFormat, getSignatureAlgorithm, getVerifyInstance, setIncompatibilityclearSensitiveData, getAlgorithmName, getEncodingInstance, getInstance, getPublicKey, getPublicKeyBlob, initSign, initVerify, initVerify, setPublicKeypublic SSH2ECDSASHA2NIST(java.lang.String algo,
java.lang.String sshname,
java.lang.String curve)
public byte[] sign(byte[] data)
throws SSH2SignatureException
SSH2Signaturesign in interface SSH2PKISignersign in class SSH2Signaturedata - Data to sign.SSH2SignatureExceptionpublic boolean verify(byte[] sigBlob,
byte[] data)
throws SSH2SignatureException
SSH2Signatureverify in class SSH2SignaturesigBlob - Signature blob encoded in the ssh format.data - Signed data.SSH2SignatureExceptionprotected byte[] encodePublicKey(java.security.PublicKey publicKey)
throws SSH2Exception
SSH2SignatureencodePublicKey in class SSH2SignaturepublicKey - The public key to encode. Must be an instance of
DSAPublicKey.SSH2Exceptionpublic static java.security.spec.ECParameterSpec getParamsForCurve(java.lang.String curve)
protected java.security.PublicKey decodePublicKey(byte[] pubKeyBlob)
throws SSH2Exception
SSH2SignaturedecodePublicKey in class SSH2SignaturepubKeyBlob - A byte array containing a public key blob.Publickey instance.SSH2Exception