Encryption/Decryption Module
Last updated
Last updated
User selects a SafleID and password(plain text password)
Client application generates a random 64 bytes string. This is stored as encryption key.
Client application generates PDKey using safleID & password using pbkdf2 algorithm
Client application hashes PDKey using SHA512
Client application encrypts encryption key using PDKey using aes.cbc algorithm
Client application hashes plain password using PDKey using pbkdf2 algorithm
Send encrypted encryption key, hashed password and PDKeyHash to server
All the private functions which access the private keys are securitised using the user's PIN. Further, the entire vault is encrypted again using an encryptionKey
which is a hash of the user's safleId and password.
User enters a 6 digit pin on client app
Generate vault using vault SDK
Client encrypts private data of vault using pin using aes.encrypt method. This is the locked vault.
Encrypt complete vault object using encryption key. This returns vault string
Save vault to mobile app keyring
💡All the encryption and decryption is done at the client-side to ensure security and to make the user's wallet and funds truly non-custodial.