Class SecurityKeyPrivateKey
java.lang.Object
com.hierynomus.sshj.userauth.fido.SecurityKeyPrivateKey
- All Implemented Interfaces:
Serializable,Key,PrivateKey,Destroyable
The "private" half of an OpenSSH FIDO/U2F security key.
Unlike a normal private key this holds no secret scalar: the secret never leaves the hardware
authenticator. What an sk-* private key file actually stores - and what this class carries
- is the application, the key handle (credential
id) and the authenticator flags. Signing is delegated to a
SecurityKeySigner, which drives the hardware.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityKeyPrivateKey(String keyTypeName, SecurityKeyPublicKey publicKey, byte flags, byte[] keyHandle, SecurityKeySigner signer) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
SecurityKeyPrivateKey
public SecurityKeyPrivateKey(String keyTypeName, SecurityKeyPublicKey publicKey, byte flags, byte[] keyHandle, SecurityKeySigner signer)
-
-
Method Details
-
getKeyTypeName
- Returns:
- the SSH key type, e.g.
sk-ssh-ed25519@openssh.com.
-
getPublicKey
-
getApplication
-
getFlags
public byte getFlags()- Returns:
- the authenticator flags the key was created with (user-presence / user-verification).
-
getKeyHandle
public byte[] getKeyHandle() -
getSigner
- Returns:
- the bridge to the hardware authenticator, or
nullif none was attached.
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-