Package com.hierynomus.sshj.signature
Class SignatureSkEcdsa
java.lang.Object
net.schmizz.sshj.signature.AbstractSignature
net.schmizz.sshj.signature.AbstractSignatureDSA
com.hierynomus.sshj.signature.AbstractSecurityKeySignature
com.hierynomus.sshj.signature.SignatureSkEcdsa
- All Implemented Interfaces:
Signature
Signature for the
sk-ecdsa-sha2-nistp256@openssh.com FIDO/U2F key type.
The authenticator produces an ASN.1 DER ECDSA signature; on the SSH wire it is encoded as the two
integers r and s as mpints, exactly like a plain ecdsa-sha2-nistp256
signature. This class converts between the two encodings. The verification engine is always
SHA-256 (the "sha2-nistp256" of the key type).
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class net.schmizz.sshj.signature.AbstractSignature
signature -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]deviceSignatureToSsh(byte[] derSignature) Convert the authenticator's native signature into the SSH raw-signature encoding (r||s as two mpints for ECDSA, unchanged for Ed25519).protected byte[]sshSignatureToDevice(byte[] sshRawSignature) Convert the SSH raw-signature encoding read off the wire into the byte format the JCA verification engine expects (DER for ECDSA, unchanged for Ed25519).Methods inherited from class com.hierynomus.sshj.signature.AbstractSecurityKeySignature
encode, initSign, initVerify, isSignaturePreEncoded, sha256, sign, update, verifyMethods inherited from class net.schmizz.sshj.signature.AbstractSignatureDSA
encodeAsnSignatureMethods inherited from class net.schmizz.sshj.signature.AbstractSignature
extractSig, getSignatureName, update
-
Constructor Details
-
SignatureSkEcdsa
public SignatureSkEcdsa()
-
-
Method Details
-
sshSignatureToDevice
Description copied from class:AbstractSecurityKeySignatureConvert the SSH raw-signature encoding read off the wire into the byte format the JCA verification engine expects (DER for ECDSA, unchanged for Ed25519).- Specified by:
sshSignatureToDevicein classAbstractSecurityKeySignature- Throws:
Buffer.BufferException
-
deviceSignatureToSsh
protected byte[] deviceSignatureToSsh(byte[] derSignature) Description copied from class:AbstractSecurityKeySignatureConvert the authenticator's native signature into the SSH raw-signature encoding (r||s as two mpints for ECDSA, unchanged for Ed25519).- Specified by:
deviceSignatureToSshin classAbstractSecurityKeySignature
-