Signing a Text File

Sign Text File

The "Sign Text File" command can be found here: Advanced > MicroSD Card > Sign Text File.

First step is to choose a suitable text file to be signed. It must meet these requirements:

  • have file name extension TXT
  • be less than 500 bytes in size
  • filename cannot contain the string '-signed'

The file should contain a single line of text to be signed. If there is a second line, it specifies the subkey derivation path for the key to be used for signing. Files that do not meet these requirements will not be offered for signing purposes.

The key subpath is optional and specifies a path from master key, such as m/48'/0'/0' or similar. If not provided, the master key (m) is used as a default.

Once a file has been selected, you'll be shown the message to be signed, and the subpath and address that will be used. You should press OK (✔) to proceed, and a new text file is created and saved with the signature added.

Message Restrictions

There are restrictions on the message to be signed, including:

  • up to 240 characters long
  • ASCII only, and no control characters (ie. code points 32 to 127)
  • no more than 4 consecutive spaces
  • leading and trailing whitespace will be trimmed before signing
  • newline characters used in the file are stripped

These restrictions are also applied to messages signed using the USB protocol.

Example

Here is a full example. Starting with this text file:

to-be-signed
m/23/23'/33

This sequence is shown on the COLDCARD:

microsd-menu

This creates signme2-signed.txt on the microSD card:

-----BEGIN BITCOIN SIGNED MESSAGE-----
to-be-signed
-----BEGIN SIGNATURE-----
1MDhJdtwjtGGbz3vQipUwtgjn5JPT2gWcT
H9JPn0tbPfDVRVC48YnAOwbYKTCFQ5hvimrBAPyRtuzjPxM+hbDCGk+CvtTt/BJrJZkgJi9/UAKyrnbyi0kBsM4=
-----END BITCOIN SIGNED MESSAGE-----
Segwit-Style Address

If you specify a path that conforms to BIP-84, we will assume you want the address to be shown in Segwit/Bech32 P2PKH format, rather than classic Bitcoin base58 format. Any path that starts with m/84'/ will get this treatment. The signature value itself is not impacted by this change.

Search Results for ""

We've found relevant search results.