hwsecurity-openpgp / de.cotech.hw.openpgp / OpenPgpSecurityKey /

OpenPgpSecurityKey

open class OpenPgpSecurityKey

Constructors

Name Summary
OpenPgpSecurityKey open fun OpenPgpSecurityKey(config: SecurityKeyManagerConfig, transport: Transport, openPgpAppletConnection: OpenPgpAppletConnection)

Types

Name Summary
AlgorithmConfig enum AlgorithmConfig

Functions

Name Summary
createSecurityKeyAuthenticator open fun createSecurityKeyAuthenticator(pinProvider: PinProvider): SecurityKeyAuthenticator
getJcaPrivateKeyForAuthentication open fun getJcaPrivateKeyForAuthentication(pinProvider: PinProvider): PrivateKey
getMaxCertificateDataLength open fun getMaxCertificateDataLength(): Int
getOpenPgpInstanceAid open fun getOpenPgpInstanceAid(): Array<Byte>
getSecurityKeyName open fun getSecurityKeyName(): String
getSerialNumber open fun getSerialNumber(): String
isSecurityKeyEmpty

open fun isSecurityKeyEmpty(): Boolean

Returns true if the connected security key has never been set up.

matchesPairedSecurityKey

open fun matchesPairedSecurityKey(pairedSecurityKey: PairedSecurityKey): Boolean

Returns true if the connected security key matches the one referenced by the provided PairedSecurityKey.

putCertificateData

open fun putCertificateData(data: Array<Byte>)

This method puts the given bytes on the security key as its “cardholder certificate” data object (DO 0x7F21)

readCertificateData

open fun readCertificateData(): Array<Byte>

This method reads the bytes from the “cardholder certificate” data object (DO 0x7F21) from the security key.

retrieveAuthenticationPublicKey open fun retrieveAuthenticationPublicKey(): PublicKey
retrievePublicKey

open fun retrievePublicKey(keyType: KeyType): PublicKey

Retrieves a public key for the given KeyType.

setupPairedKey

@Deprecated()

open fun setupPairedKey(pinProvider: PinProvider~~)~~~~:~~ PairedSecurityKey
@Deprecated()

open fun setupPairedKey(newPin: ByteSecret~~,~~ ~~newPuk~~~~:~~ ~~ByteSecret~~~~)~~~~:~~ PairedSecurityKey
@Deprecated()

open fun setupPairedKey(newPin: ByteSecret~~,~~ ~~newPuk~~~~:~~ ~~ByteSecret~~~~,~~ ~~encryptionOnly~~~~:~~ Boolean~~)~~~~:~~ PairedSecurityKey
open fun setupPairedKey(newPin: ByteSecret, newPuk: ByteSecret, algorithmConfig: OpenPgpSecurityKey.AlgorithmConfig): PairedSecurityKey

open fun setupPairedKey(pinProvider: PinProvider, setupAlgorithm: OpenPgpSecurityKey.AlgorithmConfig): PairedSecurityKey

This methods sets up the connected security key for signing, encryption, and authentication.

updatePinAndPukUsingDefaultPuk

open fun updatePinAndPukUsingDefaultPuk(newPin: ByteSecret, newPuk: ByteSecret)

This method directly performs IO with the security token, and should therefore not be called on the UI thread.

updatePinUsingPuk

open fun updatePinUsingPuk(currentPuk: ByteSecret, newPin: ByteSecret)

This method directly performs IO with the security token, and should therefore not be called on the UI thread.

wipeAndVerify

open fun wipeAndVerify()

Resets the security key into its factory state wiping all private keys, and authenticates for subsequentadministrative operations.

Properties

Name Summary
openPgpAppletConnection val openPgpAppletConnection: OpenPgpAppletConnection