The Secure Enclave and the Android Keystore system make it very difficult to decrypt sensitive data without physical access to the device. In that order, these keys need to be stored securely. freeRASP checks if the keys reside inside secure hardware.
Below are code snippets demonstrating missing hardware detection across various platforms:
// Android Keystoreoverride fun onHardwareBackedKeystoreNotAvailableDetected() {TODO("Not yet implemented")}// iOS Secure Enclavecase missingSecureEnclave// Flutter HW backed keystore not available and missing secure enclave detectiononSecureHardwareNotAvailable: () =>print("Secure hardware not available")// Cordova HW backed keystore not available and missing secure enclave detectionsecureHardwareNotAvailable: () => {// Place your reaction here}// React Native HW backed keystore not available and missing secure enclave detectionsecureHardwareNotAvailable: () => {// Place your reaction here}// Capacitor HW backed keystore not available and missing secure enclave detectionsecureHardwareNotAvailable: () => {// Place your reaction here}
Recommended action: Ignore the callback or log the event to your BE.