I have evaluated several React Native crypto libraries. Here is an overview of them:
Name | Last publish | iOS implementation | Android implementation | Note |
---|---|---|---|---|
react-native-aes-crypto | 2 months ago | CommonCrypto | javax.crypto | Only supports AES/CBC/PKCS7Padding and AES/CTR/PKCS5Padding |
hybrid-crypto-js | 4 years ago/10 months ago | Javascript | Javascript | Pure Javascript |
react-native-aes-ecb | 2 years ago | Javascript | Javascript | Pure Javascript, ECB mode only (no IV, dangerous) |
react-native-crypto-aes-cbc | 5 months ago | CommonCrypto | javax.crypto | CBC mode only (vulnerable to the padding oracle attack, no authentication) |
react-native-zebra-aes-crypto | 5 months ago | CommonCrypto | javax.crypto | CTR mode only (no authentication) |
expo-crypto | a month ago | (not checked) | (not checked) | Only provides digest method and random data generator |
react-native-quick-crypto | 4 days ago | OpenSSL/C++ | OpenSSL/C++ | Relatively new (started on Feb 13, 2022) |
browserify/crypto-browserify | 7 years ago | Javascript | Javascript | Pure Javascript, NPM package unmaintained |
react-native-quick-crypto
might be a good option to use, although the Android implementation doesn't match my initial plan (OpenSSL
vs. javax.crypto
).