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
  1. Safle Wallet

Onboarding

Vault generation and SafleID registration on Blockchain

  1. User selects a SafleID of choice

  2. User enters a password

  3. Client application generates PDKeyHash, encryptedEncryption key with users inputs.

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

    2. Client application generates PDKey using SafleID & password using pbkdf2 algorithm

    3. Client application hashes PDKey using SHA512

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

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

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

  4. Client app initialises safle vault SDK

    Installation, package import & initialisation: :

    npm install @getsafle/safle-vault
    
    const Vault = require('@getsafle/safle-vault');
    const vault = new Vault();
  5. Client app generates 12 word seed phrase using Safle Vault

    const mnemonic = await vault.generateMnemonic(entropy);
    • entropy (optional) - The entropy used to generate the 12 word seed phrase. (Uses crypto.randomBytes under the hood). Defaults to 128-bits of entropy.

  6. User enters 6 digit Pin used to encrypt private data and methods of vault. This pin is never stored on Safle’s end

  7. Client app generates users vault.

    	const userVault = await vault.generateVault(encryptionKey, pin, mnemonic);
    • encryptionKey - 64 bytes Uint8Array used to encrypt the vault.

    • pin - The pin to access the vault's private functions.

    • mnemonic - The mnemonic to generate the vault from.

  8. Register user’s safleID on blockchain - User’s safleID is registered using safle relayer where gas fee for the transaction is paid by safle registrars

💡The encrypted vault string is persisted in the mobiles keyring storage to access other wallet related operations.

PreviousSafle WalletNextBuy Crypto with Fiat enabled via Transak

Last updated 10 months ago