Skip to content

Recovering an Account with a Base64 Secret Key

George Williamson edited this page Apr 16, 2022 · 7 revisions

Issue

This guide is intended to help those who have copied/saved the raw base64 secret key - rather than download the .pem files - from the Signer convert them to .pem files. This is required if you have deleted the account or reset the vault but want to add it back - importing an account requires a secret key in a .pem file.

Simply pasting the key into a file and changing the file extension to .pem will not work.

Solution

Identify Type of Key

The two algorithms used by the Signer to generate keys are ed25519 and secp256k1. If you can't remember which you chose then here's one way to tell:

  • If you have the Public Key (pub_key_hex) then you can tell by the first two characters:
    • 01: ed25519
    • 02: secp256k1
  • secp256k1 tends to end in = whereas ed25519 ends in ==.

Setup the Converter

Create a new folder.

Download the Key Recovery Tool and extract the contents to the folder you just created.

You should now have <new folder>/dist.

Open a terminal in the new folder and run:

    npx serve dist

This will run the app locally (usually on localhost:3000) and copies the address to your clipboard.

You can now paste the address into your browser to use the app. I recommend disconnecting your PC from the internet if you want to be extra cautious.

Key-Recovery-Tool-Screenshot

Use the Converter

  • Paste the secret key into the text box.
  • Select the algorithm that you selected in the Signer originally.
  • Click on 'Recover'.
  • If it succeeds you will now be able to download the generated .PEM file.
  • Save the .PEM somewhere secure - optimally an encrypted drive not connected to the internet.
  • You can then upload the .PEM file into the Signer.

Feedback

If you're having any issues using this guide then please get in touch on Discord.