Class SecurityKeyPublicKey
java.lang.Object
com.hierynomus.sshj.userauth.fido.SecurityKeyPublicKey
- All Implemented Interfaces:
Serializable,Key,PublicKey
A public key for an OpenSSH FIDO/U2F security key, i.e. one of the
sk-ecdsa-sha2-nistp256@openssh.com or sk-ssh-ed25519@openssh.com key types.
Such a key is a regular ECDSA (NIST P-256) or Ed25519 public key with an additional
application string attached (typically "ssh:"). The application string is part of
the SSH wire encoding of the key and is mixed into every signature the authenticator produces, so
it has to travel with the key. This wrapper keeps the underlying PublicKey and the
application together.
It deliberately does not implement ECKey or
EdECKey so that KeyType.fromKey(java.security.Key) can tell
a security-key public key apart from a plain ECDSA/Ed25519 public key.
- See Also:
-
Constructor Details
-
SecurityKeyPublicKey
-
-
Method Details
-
getDelegate
- Returns:
- the underlying ECDSA (P-256) or Ed25519 public key.
-
getApplication
- Returns:
- the application string, e.g.
"ssh:".
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-
equals
-
hashCode
public int hashCode() -
toString
-