hw-security / de.cotech.hw.standalone

Package de.cotech.hw.standalone

Types

Name Summary
SecurityKeyAuthenticator

open class SecurityKeyAuthenticator

This use case class performs an “authenticate” operation on a challenge.

This class performs the authenticate operation with whatever security key it is passed, doing no checks to ensure it matches an some expected key. This is useful for workflows where the security key isn’t set up on the same device that uses it. This contrasts with de.cotech.hw.pairedkey.PairedAuthenticator, which checks whether the security key matches a given de.cotech.hw.pairedkey.PairedSecurityKey.

Example:

byte[] challenge = { (byte) 1, (byte) 2, (byte) 3, (byte) 4 };
      PairedAuthenticator authenticator = new SecurityKeyAuthenticator(keyInteractor, pairedPinProvider)
      byte[] signatureBytes = authenticator.authenticateWithDigest(challenge, "SHA-1");
 
      Signature signature = Signature.getInstance("SHA1withRSA");
      signature.initVerify(authPublicKey);
      signature.update(challenge);
      boolean isVerified = signature.verify(signatureBytes);
      assert isVerified;
SecurityKeyClientCertificateAuthenticator open class SecurityKeyClientCertificateAuthenticator
SecurityKeySshAuthenticator

open class SecurityKeySshAuthenticator

TODO