Skip to content

Instantly share code, notes, and snippets.

@xavierfiechter
Created November 14, 2022 15:32
Show Gist options
  • Save xavierfiechter/da50878f78b31753cad7293a04f988ad to your computer and use it in GitHub Desktop.
Save xavierfiechter/da50878f78b31753cad7293a04f988ad to your computer and use it in GitHub Desktop.
WALLET KEY ALIAS

Using a KEY ALIAS for wallets, instead of key fingerprints

Why this suggestion?

An alias, like a nickname, is easier to read for humans and easier to remember than a key fingerprint.

BIP-32 suggests using a key fingerprint, which is the first 32 bits of the key identifier.

This helps to verify if you have loaded the correct wallet.

This is especially important when using a passphrase.

Ensuring this is essential in Brainbow because it's a stateless wallet.

Who does it work?

KEY ALIASES are, like anti-phishing word, taken from a word list (see below).

All words used are less or equal 8 characters long.

There is a PREFIX and a SUFFIX list.

First, a key identifier is generated as described in BIP-32.

https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#key-identifiers

The first byte is an adjective (PREFIX).

The second byte (SUFFIX) is an animal name, mythical creature, or other noun.

Instead of showing the key fingerprint 5B243682, the alias 'GreenComet' is shown.

5B (hex) -> 'Green' 24 (hex) -> 'Comet'

Wallet alias is 'GreenComet'.

Yes, the string is longer and yes, it is only 2 bytes of the full fingerprint - but it is easy to remember.

PREFIX = [
'active',
'adorable',
'agile',
'amazing',
'amiable',
'amusing',
'annoyed',
'aquatic',
'arctic',
'balanced',
'blue',
'bold',
'brave',
'bright',
'bronze',
'bubbly',
'busy',
'captain',
'caring',
'charming',
'cheeky',
'cheerful',
'chic',
'classy',
'clever',
'colorful',
'cool',
'couture',
'cozy',
'crafty',
'creative',
'credible',
'cultured',
'curious',
'cute',
'dandy',
'daring',
'dazzled',
'decisive',
'deep',
'delicate',
'deluxe',
'detailed',
'diligent',
'diplomat',
'direct',
'discreet',
'doctor',
'dramatic',
'dreamy',
'driven',
'dynamic',
'eager',
'elated',
'epic',
'ethereal',
'ethical',
'excited',
'expert',
'fabulous',
'fast',
'fearless',
'filthy',
'flat',
'fluffy',
'flying',
'focused',
'foolish',
'frantic',
'fresh',
'friendly',
'frothy',
'funny',
'fuzzy',
'gaudy',
'generous',
'genius',
'gentle',
'ghastly',
'giddy',
'giga',
'giving',
'glad',
'gleaming',
'glorious',
'glowing',
'golden',
'gorgeous',
'graceful',
'greasy',
'great',
'green',
'groovy',
'grumpy',
'hairy',
'handsome',
'happy',
'hard',
'healthy',
'helpful',
'helpless',
'hero',
'high',
'hollow',
'homely',
'honest',
'huge',
'hungry',
'hurt',
'icy',
'ideal',
'idyllic',
'immense',
'inspired',
'irate',
'itchy',
'jealous',
'jittery',
'jolly',
'joyful',
'joyous',
'jumpy',
'kind',
'knowing',
'large',
'lazy',
'legend',
'lethal',
'little',
'lively',
'livid',
'logical',
'lonely',
'loose',
'lost',
'lovely',
'loving',
'lucky',
'lyrical',
'macho',
'magic',
'majestic',
'massive',
'melodic',
'melted',
'mighty',
'minimal',
'misty',
'moody',
'mountain',
'muddy',
'mystery',
'narrow',
'nasty',
'nervous',
'nimble',
'noble',
'nutty',
'obedient',
'odd',
'panicky',
'patient',
'peaceful',
'perfect',
'petty',
'plain',
'pleasant',
'poetic',
'poised',
'polite',
'power',
'precious',
'precise',
'pretty',
'prickly',
'proud',
'pungent',
'puny',
'purple',
'quaint',
'quick',
'quiet ',
'radiant',
'rapid',
'rational',
'ratty',
'red',
'relaxed',
'reliable',
'rich',
'ripe',
'robust',
'rocky',
'rotten',
'rotund',
'rough',
'round',
'royal',
'salty',
'scary',
'scrawny',
'secret',
'selfish',
'serene',
'serious',
'sexy',
'shaggy',
'shaky',
'shallow',
'sharp',
'shining',
'shiny',
'short',
'silky',
'silly',
'silver',
'skillful',
'skinny',
'slimy',
'small',
'smarmy',
'smart',
'smiling',
'smoggy',
'smooth',
'smug',
'snowy',
'soaring',
'social',
'soggy',
'solid',
'sore',
'sour',
'space',
'speedy',
'spicy',
'spiky',
'square',
'stacked',
'stale',
'steady',
'steep',
'stellar',
'strong',
'sturdy',
'super',
'swift',
'tender',
'tropical',
'weaving',
'winged',
'wise',
'witty',
'wonder',
'yellow',
'zany']
SUFFIX = ['alpaca',
'ant',
'anteater',
'antelope',
'ape',
'apollo',
'baboon',
'badger',
'basilisk',
'bat',
'bear',
'beauty',
'beaver',
'bee',
'bigfoot',
'bimbo',
'bison',
'boa',
'boar',
'bobcat',
'buffalo',
'bull',
'bunny',
'camel',
'captain',
'capybara',
'cat',
'catch',
'chamois',
'champion',
'cheetah',
'chicken',
'chough',
'clam',
'cobra',
'cod',
'comet',
'condor',
'cookie',
'coyote',
'crab',
'crane',
'crow',
'curlew',
'deer',
'dingo',
'dinosaur',
'dog',
'dogfish',
'dolphin',
'donkey',
'dotterel',
'dove',
'dragon',
'dreamer',
'duck',
'dugong',
'dunlin',
'eagle',
'echidna',
'eel',
'egret',
'eland',
'elephant',
'elk',
'emu',
'fairy',
'falcon',
'ferret',
'fighter',
'finch',
'fish',
'flamingo',
'fly',
'fogg',
'fox',
'frog',
'galaxy',
'gator',
'gaur',
'gazelle',
'gecko',
'gerbil',
'giraffe',
'glider',
'gnat',
'gnome',
'gnu',
'goat',
'goldfish',
'goose',
'gorilla',
'goshawk',
'griffin',
'grouse',
'guanaco',
'gull',
'hamster',
'hare',
'hawk',
'hedgehog',
'hera',
'hermes',
'heron',
'herring',
'hippo',
'hornet',
'horse',
'human',
'hunter',
'hyena',
'ibex',
'ibis',
'iguana',
'jackal',
'jay',
'jupiter',
'kangaroo',
'king',
'kitten',
'koala',
'kouprey',
'kudu',
'lapwing',
'lark',
'lemming',
'lemur',
'leopard',
'lion',
'lizard',
'llama',
'lobster',
'locust',
'loris',
'louse',
'lyrebird',
'macaw',
'magpie',
'mallard',
'manatee',
'mandrill',
'mantis',
'mars',
'marten',
'meerkat',
'mercury',
'mermaid',
'mink',
'mole',
'mongoose',
'monkey',
'moon',
'moose',
'mosquito',
'mouse',
'mule',
'narwhal',
'newt',
'octopus',
'okapi',
'opossum',
'oryx',
'ostrich',
'otter',
'owl',
'oyster',
'panda',
'panther',
'parrot',
'peafowl',
'pelican',
'penguin',
'pheasant',
'phoenix',
'pig',
'pigeon',
'piranha',
'planet',
'pony',
'porpoise',
'poseidon',
'possum',
'puffin',
'quail',
'queen',
'quelea',
'quetzal',
'rabbit',
'raccoon',
'rail',
'ram',
'rat',
'raven',
'realist',
'reindeer',
'robo',
'rockstar',
'rook',
'sable',
'salmon',
'sardine',
'saturn',
'scorpion',
'seahorse',
'seal',
'shark',
'sheep',
'shrew',
'skunk',
'sky',
'snail',
'snake',
'sparrow',
'sphinx',
'spider',
'squid',
'squirrel',
'star',
'starling',
'stingray',
'stinkbug',
'stork',
'swallow',
'swan',
'tapir',
'tarsier',
'taurus',
'termite',
'tiger',
'toad',
'tree',
'trout',
'turkey',
'turtle',
'unicorn',
'urchin',
'venus',
'viper',
'vulture',
'wallaby',
'walrus',
'wasp',
'weasel',
'werewolf',
'whale',
'wildcat',
'wolf',
'wombat',
'woodcock',
'worm',
'wren',
'yak',
'yeti',
'zebra',
'zeus',
'zombie']
def wallet_nickname(first_byte, second_byte):
first = PREFIX[int(first_byte, base=16)]
second = SUFFIX[int(second_byte, base=16)]
return("{}{}".format(first.capitalize(), second.capitalize()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment