net.adamcin.httpsig.ssh.jce
Class SSHDSSSignature
java.lang.Object
java.security.SignatureSpi
java.security.Signature
net.adamcin.httpsig.ssh.jce.SSHDSSSignature
public final class SSHDSSSignature
- extends Signature
The "ssh-dss" key format has the following specific encoding:
string "ssh-dss"
mpint p
mpint q
mpint g
mpint y
Here, the 'p', 'q', 'g', and 'y' parameters form the signature key blob.
Signing and verifying using this key format is done according to the Digital Signature Standard [FIPS-186-2]
using the SHA-1 hash [FIPS-180-2].
The resulting signature is encoded as follows:
string "ssh-dss"
string dss_signature_blob
The value for 'dss_signature_blob' is encoded as a string containing r, followed by s (which are 160-bit
integers, without lengths or padding, unsigned, and in network byte order).
| Methods inherited from class java.security.Signature |
clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, update, verify, verify |
SSHDSSSignature
public SSHDSSSignature()
throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
engineInitVerify
protected void engineInitVerify(PublicKey publicKey)
throws InvalidKeyException
- Specified by:
engineInitVerify in class SignatureSpi
- Throws:
InvalidKeyException
engineInitSign
protected void engineInitSign(PrivateKey privateKey)
throws InvalidKeyException
- Specified by:
engineInitSign in class SignatureSpi
- Throws:
InvalidKeyException
engineUpdate
protected void engineUpdate(byte b)
throws SignatureException
- Specified by:
engineUpdate in class SignatureSpi
- Throws:
SignatureException
engineUpdate
protected void engineUpdate(byte[] b,
int off,
int len)
throws SignatureException
- Specified by:
engineUpdate in class SignatureSpi
- Throws:
SignatureException
engineSign
protected byte[] engineSign()
throws SignatureException
- Specified by:
engineSign in class SignatureSpi
- Throws:
SignatureException
engineVerify
protected boolean engineVerify(byte[] sigBytes)
throws SignatureException
- Specified by:
engineVerify in class SignatureSpi
- Throws:
SignatureException
engineSetParameter
protected void engineSetParameter(String param,
Object value)
throws InvalidParameterException
- Specified by:
engineSetParameter in class SignatureSpi
- Throws:
InvalidParameterException
engineGetParameter
protected Object engineGetParameter(String param)
throws InvalidParameterException
- Specified by:
engineGetParameter in class SignatureSpi
- Throws:
InvalidParameterException
Copyright © 2013-2014. All Rights Reserved.