Skip to content

Secure your wallets

hungbv edited this page Sep 25, 2021 · 3 revisions

Preface

How to secure your wallet?

Introduction

You have nothing without the key on the Blockchains!

The only way to prove the blockchain-assets ownership or wallets is having the corressponding keys.

Key takeaways

  1. Coins/Tokens in the Exchanges might not be fully backed/collateralized by real coins/tokens on the blockchains.
  2. Having an external wallet out of the Exchanges is inevitable, your coins is not real until they are in your wallet.
  3. The Exchanges security level may be very high, however , it is never enough.

Ownership

Moving assets from Wallet A to another wallet

  • Without Key A, no one could move the Wallet A assets to another ones.
  • On the other hand, anyone has Key A could freely transfer the Wallet A assets.

Analogy

Public blockchain vs Banks

  • It is almost impossible to rollback the processed transactions on the Blockchains (except The DAO hack).
  • Once the assets have been transfered, there is no way to get it back. (except the receiver transfer it back to you :D)

Keys

In this article scope, the detail implementation of cryptographic is skipped. It is critical to know which keys need to be secured.

Public key

As the name, it is public to everyone or some relevant persons.

Public-key usually is the receiver-address.

Private key

Depend on the blockchain implementations, there are several types of private key

One-on-one

One private-key link only to one public-key or address

Each wallet is a pair of private and public key

  • ETH use this approach -> each wallet has only one receive-address only

One-to-many

There is a certify root-key creating multiple private and public key-pairs.

Each wallet has only one Certify root-key and multiple private and public key pair!

  • Cardano uses this approch -> each wallet has multiple receive-addresses.
  • Each private-key manages the coressponding Address
  • Both Certify Key and Private keys are private.
    • Leaking the Certify Key you may lost all the wallet
    • Leaking a Private Key, you may lost the asset on a specific Address only

Key format

Raw key

It is usually a random character or number sequence like the below.

06fc9c397e9dc7d907bf567166eb3adc638950418ae757cde915a754b70f4bc7

It is difficult to memorized, thus, there is a need to convert to human-readable format.

Mnemonic or Seed phrases

This format varies depend on which Wallet interface is used. The format is usually like the below:

primary hood cattle assault leisure 
acid six spot sudden angry 
bunker layer heavy say jungle 
upon glass decorate mad 
ice vendor tackle grief midnight

Notes:

  1. It might not be compatible for all-type of Wallet
  2. Each Wallet Interface may have a different way to convert Mnemonic -> private-key
  3. The best practice is check the Re-import mnemonic phrase before sending

How to secure the private keys?

The hacker could steal the private key on when users initialized the wallet. Please make sure your environment is clean (no virus, no malware ...) and no one is arround.

There are several way to store and back-up the keys.

It is best practice to apply more than one-way to back-up the keys.

  • Write the keys to paper(s) (more than one copy is good)
    • 100% off-line
    • Online attack cannot steal
    • Physical storage is required (could be lost or damaged)
  • Store a digital copy in your external drive(s) such as USB (with LUKS encryption is good)
    • most of the time is off-line (except plug it in to a online computer)
    • Physical storage is required (could be lost or damaged)
  • Store a digital copy in your Cloud Drive (such as Google Drive) - must be encrypted or compressed with password
    • 100% on-line (vulnerable - required data encryption)
    • Online attack could steal it
    • Depend on the Cloud Drive Provider security
  • Cold Wallet or Dedicated hardware (still need key back-up)
    • Ledger Wallet
    • Trezor

My best practice

  1. Write Mnemomic to a paper -> put in the Vault or somewhere only you and God know :D
  2. Write to a file on off-line and clean computer(clear old-data, recently OS-installation)
  3. Generate a memorized and secured password

echo 'the_keywork_only_you_know' | sha512sum be19dc003cf4032ad14c4a487f0439f2193270d150aaefbc914a05df3313f4800344fd66438977c6065b6b4a1d02480823752586c806734a9dd0adb1051c85f9 -

  1. Compressed (by WinRar or 7z) the file with the above password
  2. Upload the compressed file with password to Cloud Drive
  3. Create a USB with LUKS encryption , then put the compressed file with password into

Summary

  • Private keys may be more than one key (Certify and Private keys) -> keep them safe and secured.
  • Treat your private keys as your bank account having a lot of money -> never share it (except your wife :D)
  • Encryption key is a-must , if upload the key to online Drive -> never upload the key without encryption to the online environment