Skip to content

Recovering an Account with a Base64 Secret Key

George Williamson edited this page Jul 31, 2021 · 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

A .pem file has a header, body and a footer. The header and footer mirror each other and depend on what kind of data is stored in the body.

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:

  • secp256k1 ends in = whereas ed25519 ends in ==.

Fill in the Template File

Now that you have your base64 key and you know which algorithm was used you can complete the template files.
Download the template files and choose the appropriate file for your key.

You have to paste your key after the string of characters on the 2nd line. E.g. for the ed25519 file:

    -----BEGIN PRIVATE KEY-----
    MC4CAQAwBQYDK2VwBCIEI<paste your secret key here>
    -----END PRIVATE KEY-----

Import to the Signer

Once you've pasted your secret key into the .pem template and saved it you're ready to import it back to the Signer!