RSN Wallet Specification

RSN Wallet Import Format (WIF)

Wallet Import Format is an encoding for a private EDSA key. RSN uses the same version, checksum, and encoding scheme as the Bitcoin WIF addresses and should be compatible with existing libraries [1].

This is an example of a WIF Private Key:


This encoding is good for:

  • Copy and Pasting private keys (ensures the entire key is copied)
  • Including keys in text or user editable file formats
  • Shortening the key-length
  • This encoding is not good for:
  • Writing keys down by hand (even a single upper / lowercase mistake can cause a major problem)
  • Binary or computer storage where code handles the key and data is already checked
  • Considerations:
  • If a key could be written down or re-keyed, the BIP39 Mnemonic Code standard is a better option to use.
  • It is a good idea to always label a WIF key using the word "Private" or "Private Key".

Private key to WIF

1.A fake private key of all zeros is used. This is 32 bytes long (shown here as hex).


2.Add a 0x80 byte in front. This byte represents the Bitcoin mainnet. RSN uses the same version byte. When encoded the version byte helps to identify this as a private key. Unlike Bitcoin, RSN always uses compressed public keys (derived from a private key) and therefore does not suffix the private key with a 0x01 byte.


3.Perform a binary SHA-256 hash on the versioned key.


4.Perform a binary SHA-256 hash on result of SHA-256 has


5.Take the first 4 bytes of the second SHA-256 hash, this is the checksum.



Base58Check is a JavaScript implementation of this algorithm and may be used to encode and decode RSN WIF private keys.

base58check = require('base58check')
wif = base58check.encode(privateKey = '00'.repeat(32), version = '80', encoding = 'hex')
assert.equal('5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU', wif)
let {prefix, data} = base58check.decode(wif)
assert.equal(prefix.toString('hex'), '80')
assert.equal(data.toString('hex'), '00'.repeat(32))