I have a question for you guys, as shown below.
When using the FingerprintManager, the crytoObject type is passed as Cipher.
The cipher that I have init with privateKey in decryption mode.
PrivateKey is generated from AndroidKeystore using setUserAuthenticationRequired (true).
Thus, this private key will be used in a cipher such as cipher.init (DecryptionMode, privatekey), passing this cipher to Fingerprintmanager.authenticate.
After verification by the user, I can successfully use the result of the crypto object, successfully obtain the cipher and perform decryption (doFinal) in the encrypted string.
After I decrypted the string, I need to continue signing, because I need to use the same private key a second time for signing and get the full string.
The problem is that it will always throw an exception if the user is not authenticated. Does this mean that the cryptoObject value is returned from the FingerprintManager after successfully checking a fingerprint that an object of cipher type can use only once? I can use it once to double-decrypt the encrypted string, and after that I will have to use the same private key for signing, it will fall into the exception of the unauthenticated user.
Does this mean that the user needs to check the biometric data again? It can be used only 1 time after the user has successfully confirmed, the cipher that I did init (decryption mode, private key), it returns and cannot be used twice. I already checked setUserAuthenticationValidityDurationSeconds (int seconds), this will always fall without authentication, and I did not use setUserAuthenticationValidityDurationSeconds.
Please, I need the help of a fingerprintManager specialist (cryptoObject result), when the authentication is successful, the cipher type with privateKey can be used only once. I need to continue to use it a second time without hitting an unauthenticated user. You are welcome.
setUserAuthenticationValidityDurationSeconds this does not work.
encrypt init PrivateKey and pass to fingerprintManager.authenticate (cryptoObject)
If you successfully verify your fingerprint, you can use the cipher only once. If it is necessary to use the same private key in the signature, it will go to the user who is not authenticated. How to make a private key available?