androidの指紋問題

3815 ワード

チェックロジック
//      
if (!fingerprintManager.isHardwareDetected()) {
    return;
}

//  
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {
    return;
}

//         
if (!fingerprintManager.hasEnrolledFingerprints()) {
    return;
}

//       
if (!keyguardManager.isKeyguardSecure()) {
    return;
}
KeyStore
Key認証バインディング
指紋とロック画面のパスワードの強いバインド
"a fingerprint may be less secure than a strong PIN, pattern, or password."
(https://support.google.com/nexus/answer/6300638?hl=en)

(         ,         ->        )           
: ( ), miui android : ,
Nexus-6P/Nexus-5X:             
Miui:            ,                   
KeyPermanentlyInvalidatedException (Key  )

プロセスの使用
Request fingerprint authentication permission within the project's AndroidManifest file.

Enable any lock screen security mechanism (PIN, pattern or password).

Register at least one fingerprint on the device.

Create an instance of the FingerprintManager.

Use a Keystore instance to gain access to the Android Keystore container.

Generate an encryption key using the KeyGenerator class and store it in the Keystore container.

Initialise an instance of the Cipher class using the previously generated encryption key.

Use the Cipher instance to create a CryptoObject and assign it to the instantiated FingerprintManager.

Call the authenticate() method of the FingerprintManager instance.

Handle callbacks on completion of a successful authentication, providing access to protected content or functionality.