oblador / react-native-keychain

:key: Keychain Access for React Native
MIT License
3.18k stars 519 forks source link

Use AES with block mode GCM #587

Open matteodanelli opened 1 year ago

matteodanelli commented 1 year ago

Actually, the cipher created using AES is using block mode CBC. According to OWASP guidelines, it's better to use AES with block mode GCM, which is already available inside android.KeyProperties. GCM can prevent CBC attacks like Chosen Plaintext Attack(CPA) and Chosen Ciphertext Attack(CCA)

Are there any known limitations to switch to this?

BraveEvidence commented 1 year ago

This will help https://www.youtube.com/watch?v=J0OSn7s9YiA&list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i&index=15