Try Hardware Security SDK in your app today.
Security Keys

PIV cards and Security Keys

Supports a wide range of Security Keys, such as the YubiKey 4 and 5 Series over USB. YubiKey 5 NFC and YubiKey NEO are also supported over NFC.

Certificate Handling

Automatic retrieval and usage of certificates stored on the security hardware.
PIV Certificate Chain
OkHttp

Integrates with Modern Android Libraries

Out-of-the-box integration with OkHttp 3.

Make Your App work with PIV

class MyActivity:Activity(), SecurityKeyManager.SecurityKeyManagerCallback {

    // called when security key is detected over NFC or attached to USB
    override fun onSecurityKeyDiscovered(keyInteractor: SecurityKeyInteractor, pinProvider: PinProvider): Boolean {
        val clientCertificateAuthenticator = SecurityKeyClientCertificateAuthenticator
                .createFromAuthenticationCertificate(keyInteractor, pinProvider)
        val sslContext = clientCertificateAuthenticator.buildInitializedSslContext()
        
        // connection with OkHttp library
        val httpClient = OkHttpClient.Builder()
                .sslSocketFactory(sslContext.socketFactory)
                .build()
        val request = Request.Builder()
                .url("https://example.com")
                .build()
        val response = httpClient.newCall(request).execute()

        return true
    }
}
Complete Guide Full List of Supported Hardware
class MyActivity:Activity(), SecurityKeyManager.SecurityKeyManagerCallback {

    // called when security key is detected over NFC or attached to USB
    override fun onSecurityKeyDiscovered(keyInteractor: SecurityKeyInteractor, pinProvider: PinProvider): Boolean {
        val loginName = "username"
        val loginHost = "localhost"

        val securityKeyAuthenticator = SecurityKeySshAuthenticator.createFromCertificate(keyInteractor, pinProvider)
        // works automatically with OpenSSH public keys and OpenSSH certificates.
        val sshIdentity = SecurityKeySshIdentity(loginName, securityKeyAuthenticator)
        
        // connection with JSch library
        val jsch = JSch()
        JSch.setConfig("StrictHostKeyChecking", "no")
        jsch.addIdentity(sshIdentity, null)
        val sshSession = jsch.getSession(sshIdentity.loginName, loginHost)

        sshSession.connect(10000)

        val channel = sshSession.openChannel("shell")
        val baos = ByteArrayOutputStream()
        channel.outputStream = baos
        channel.connect(10000)

        return true
    }
}
Complete Guide Full List of Supported Hardware

Developer Documentation

Learn about the features of the Hardware Security SDK in detail. The guides, API reference, and example projects will help you get up and running in no time.