Safle
  • SafleID
    • About SafleID
      • Core Technical Components (1/3)
      • Core Technical Concepts (2/3)
      • Core Technical Concepts (3/3)
    • What SafleID does?
    • For Chains
      • Technical Breakdown (1/2)
      • Technical Breakdown (2/2)
    • For dApps
    • For Wallet Providers (Exchanges and independent wallets)
      • Why Integrate SafleID (1/2)
      • Why Integrate SafleID (2/2)
    • SafleID's Technology
      • Data Flow and Interactions
      • Resolving Functionalities (RegistrarMain Contract)
      • Auction Functionalities (Auction Contract)
    • Conclusion
    • Terminology
    • Technical Documentation
  • Safle Wallet
    • Onboarding
    • Buy Crypto with Fiat enabled via Transak
    • Safle Swaps
    • Transaction processing on multiple Chains
    • Annexure: Encryption Sequence
  • Safle Vault
    • Features
    • Blockchains Supported
    • Installation & Initialisation
    • Encryption/Decryption Module
    • Controllers
Powered by GitBook
On this page
  • Encryption Sequence
  • Encryption Sequence extended for safle vault
  1. Safle Vault

Encryption/Decryption Module

PreviousInstallation & InitialisationNextControllers

Last updated 10 months ago

Encryption Sequence

  1. User selects a SafleID and password(plain text password)

  2. Client application generates a random 64 bytes string. This is stored as encryption key.

  3. Client application generates PDKey using safleID & password using pbkdf2 algorithm

  4. Client application hashes PDKey using SHA512

  5. Client application encrypts encryption key using PDKey using aes.cbc algorithm

  6. Client application hashes plain password using PDKey using pbkdf2 algorithm

  7. Send encrypted encryption key, hashed password and PDKeyHash to server

Encryption Sequence extended for safle vault

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.

  1. User enters a 6 digit pin on client app

  2. Generate vault using vault SDK

  3. Client encrypts private data of vault using pin using aes.encrypt method. This is the locked vault.

  4. Encrypt complete vault object using encryption key. This returns vault string

  5. 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.