exceet Secure Solutions
Tungsten
OpenKeychain
Try Hardware Security SDK in your app today.

Use Case Samples

Due to the vast amount of different protocols involved, it is difficult to support security hardware in your app. With the Hardware Security SDK, you can focus on your scenario at hand and leave the rest to us. If you are missing a use case, contact us and we provide the necessary customizations.
public class MainActivity extends AppCompatActivity implements OnFidoAuthenticateCallback {

    private void showFidoAuthenticateDialog() {
        // Make an authentication request to the server. In a real application, this would perform
        // an HTTP request. The server will send us a challenge based on the FIDO key we registered
        // before, asking us to prove we still have the same key.
        FidoAuthenticateRequest.create(fidoAppId, fidoFacetId, authChallenge, keyHandle);

        // This opens a UI fragment, which takes care of the user interaction as well as all FIDO internal
        // operations for us, and triggers a callback to onAuthenticateResponse(FidoAuthenticateResponse).
        FidoDialogFragment fidoDialogFragment = FidoDialogFragment.newInstance(authenticateRequest);
        fidoDialogFragment.show(getSupportFragmentManager());
    }

    @Override
    public void onFidoAuthenticateResponse(@NonNull FidoAuthenticateResponse authenticateResponse) {
        // Forward the authentication response from the FIDO Security Key to our server application.
        // The server will check that the signature matches the FIDO key we registered with, and if
        // so we have successfully logged in.
    }
}
Supported Hardware:
All FIDO Security Keys
Hardware Standards:
FIDO
Complete Guide Full List of Supported Hardware
class MainActivity:AppCompatActivity(), SmartcardDialogFragment.SmartcardDialogCallback<OpenPgpSecurityKey> {

    private fun showSmartcardDialog() {
        val options = SmartcardDialogOptions.builder()
            //.setPinLength(4) // smartcards with a fixed PIN and PUK length improve the UX
            //.setPukLength(8)
            .setShowReset(true) // show button to reset/unblock of PIN using the PUK
            .build()

        smartcardDialogFragment = SmartcardDialogFactory.newOpenPgpInstance(options)
        smartcardDialogFragment.show(supportFragmentManager)
    }

    override fun onSmartcardDialogSecurityKeyDiscovered(securityKey: OpenPgpSecurityKey, pinProvider: PinProvider) {
        val loginName = "cotech"
        val loginHost = "ssh.hwsecurity.dev"
        connectToSsh(loginName, loginHost, securityKey, pinProvider)
    }
    
    private fun connectToSsh(
        loginName: String, loginHost: String, securityKey: OpenPgpSecurityKey, pinProvider: PinProvider
    ) = runBlocking {
        val deferred = GlobalScope.async(Dispatchers.IO) {
            val securityKeyAuthenticator = securityKey.createSshAuthenticatorFromPublicKey(pinProvider)
            // NOTE: Please consult the guide for more details on SmartcardJschIdentity and jschConnection()
            val smartcardIdentity = SmartcardJschIdentity(loginName, securityKeyAuthenticator)
            jschConnection(loginHost, smartcardIdentity)
        }

        try {
            deferred.await()
        } catch (e: Exception) {
            // NOTE: Please consult the guide for a full sample.
        }
    }
}
Supported Hardware:
YubiKey NEO, YubiKey 4/5 series, Nitrokey Start/Pro, compatible smart cards, …
Hardware Standards:
PIV (NIST SP 800-73), ISO 7816-4, OpenPGP Card Specification
Complete Guide Full List of Supported Hardware
public class MainActivity extends AppCompatActivity implements SmartcardDialogFragment.SmartcardDialogCallback<PivSecurityKey> {

    private void showSmartcardDialog() {
        SmartcardDialogOptions options = SmartcardDialogOptions.builder()
                //.setPinLength(4) // smartcards with a fixed PIN and PUK length improve the UX
                //.setPukLength(8)
                .build();

        smartcardDialogFragment = SmartcardDialogFactory.newPivInstance(options);
        smartcardDialogFragment.show(getSupportFragmentManager());
    }

    @Override
    public void onSmartcardDialogSecurityKeyDiscovered(PivSecurityKey securityKey, PinProvider pinProvider) throws IOException {
        SecurityKeyTlsClientCertificateAuthenticator clientCertificateAuthenticator =
                securityKey.createSecurityKeyClientCertificateAuthenticator(pinProvider);
        SSLContext sslContext = clientCertificateAuthenticator.buildInitializedSslContext();

        // connection with OkHttp
        OkHttpClient httpClient = new OkHttpClient.Builder()
                .sslSocketFactory(sslContext.getSocketFactory())
                .build();
        Request request = new Request.Builder()
                .url("https://tls.hwsecurity.dev")
                .build();
        Response response = httpClient.newCall(request).execute();
    }
}
Supported Hardware:
YubiKey NEO, YubiKey 4/5 series, Nitrokey Start/Pro, compatible smart cards, …
Hardware Standards:
PIV (NIST SP 800-73), ISO 7816-4, OpenPGP Card Specification
Complete Guide Full List of Supported Hardware

Smartcards and Security Keys

Supports a wide range of Security Keys over USB, such as the YubiKey 4 and 5 Series, Nitrokeys and Google's Titan Key. YubiKey 5 NFC and YubiKey NEO are also supported over NFC. Of course, it also supports smartcards over NFC.

Security Keys

Technical Support

If you ever need help, you get direct access to the developers and cryptographers who built the product. Whether you have questions getting started or you want to know how to best integrate SDK features into your app, we’re here to help you find a solution.
  • Direct line to the SDK developers
  • Fast response time
  • Comprehensive example projects
  • Flexible licensing options