Hellar wallets at their core are a collection of private keys. These collections are stored digitally in a file, or can even be physically stored on pieces of paper.

Private Key Formats

Private keys are what are used to unlock duffs from a particular address. In Hellar, a private key in standard format is simply a 256-bit number, between the values:

0x01 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140, representing nearly the entire range of 2256-1 values. The range is governed by the secp256k1 ECDSA encryption standard used by Hellar.

Wallet Import Format (WIF)

In order to make copying of private keys less prone to error, Wallet Import Format may be utilized. WIF uses base58check encoding on a private key, greatly decreasing the chance of copying error, much like standard Hellar addresses.

  1. Take a private key.
  2. Add a 0xCC byte in front of it for mainnet addresses or 0xEF for testnet addresses.
  3. Append a 0x01 byte after it if it should be used with compressed public keys (described in a later subsection). Nothing is appended if it is used with uncompressed public keys.
  4. Perform a SHA-256 hash on the extended key.
  5. Perform a SHA-256 hash on result of SHA-256 hash.
  6. Take the first four bytes of the second SHA-256 hash; this is the checksum.
  7. Add the four checksum bytes from point 5 at the end of the extended key from point 2.
  8. Convert the result from a byte string into a Base58 string using Base58Check encoding.

The process is easily reversible, using the Base58 decoding function, and removing the padding.

Mini Private Key Format

Mini private key format is a method for encoding a private key in under 30 characters, enabling keys to be embedded in a small physical space and more damage-resistant QR codes.

  1. The first character of mini keys is ‘h’.
  2. In order to determine if a mini private key is well-formatted, a question mark is added to the private key.
  3. The SHA256 hash is calculated. If the first byte produced is a 00, it is well-formatted. This key restriction acts as a typo-checking mechanism. A user brute forces the process using random numbers until a well-formatted mini private key is produced.