---
# System prepended metadata

title: Signing Messages

---

# Signing Messages

A general guide to signing messages, i.e. what to put in the signature field on [the validator address request form.](https://forms.gle/k4LGgjgPrmfGCpP49)

These instructions depend on whether you have your key in Polkadot JS or you store offline and use [Subkey](https://substrate.dev/docs/en/ecosystem/subkey) to sign.

## Polkadot JS

Go to "[Toolbox](https://polkadot.js.org/apps/#/toolbox/sign)" and click on "Sign message".

![](https://i.imgur.com/dQp1t74.png)

I have an account called `JOE-KSMA-01` in Polkadot JS and will use that. **You should use whatever address you listed for your Kusama validator stash account.** Click "Unlock account" and enter your password associated with the account.

![](https://i.imgur.com/1S746VJ.png)

Enter a message in the "sign the following data" field and click "Sign message".

![](https://i.imgur.com/43LPkk5.png)

You now have all the information you need for the form. Submit this:

```
Message: this is a message for the guide
Address: HtkSmapBVeMH3mDk5jFERJRod5t4qLtoqwqgbdN4BAVKTqW
Signature: 0x4543c8769bf7578e54bc6b2a0d9479cf03ae635b3f7d433cadcb1c042df27e754833d5ceaf7989f0f051d1601d4b04a000f1f25797868ca5bc497e3bf87fac00
```


## Subkey

I'm going to use this dummy account for the guide so you can see the mnemonic seed. **You should use whatever address you listed for your Kusama validator stash account.**

```
$ subkey -n kusama generate
Secret phrase `guilt prize output hedgehog hour alone daring trash main charge need naive` is account:
  Secret seed:      0x4ba488d3b8e2ef1ad8a0256b68a0263a3639a27f1ad69a9d6c81c26ce661bc21
  Public key (hex): 0xca736c1462069c34999830c5693a42d316a35b0f742a5125ee840177ea5ae161
  Account ID:       0xca736c1462069c34999830c5693a42d316a35b0f742a5125ee840177ea5ae161
  SS58 Address:     H9mUgQLwPFBZ6HVkpJ7oACnQZdNu4mU1QxuRyc5xovrL9jF
```

This is mostly a duplicate of the [Subkey documentation](https://substrate.dev/docs/en/ecosystem/subkey#signing-and-verifying-messages).

Use the syntax:

```
$ echo "message" | subkey sign <your mnemonic>//<hard>/<soft>///<password>
```

Example:

```
$ echo "message for guide" | subkey sign "guilt prize output hedgehog hour alone daring trash main charge need naive"
409d131f2a809a9148348659e31b065b082d3aca5fe7fd10d1b93991b7dabf7ff9bdbbda5c6cf6a83c8e831a95460f3dc6601deaa2bc1c40247625a4eceaca89
```

Verification follows this syntax:

```
$ echo "message" | subkey verify <signature> <address>
```

Example:

```
$ echo "message for guide" | subkey verify 409d131f2a809a9148348659e31b065b082d3aca5fe7fd10d1b93991b7dabf7ff9bdbbda5c6cf6a83c8e831a95460f3dc6601deaa2bc1c40247625a4eceaca89 H9mUgQLwPFBZ6HVkpJ7oACnQZdNu4mU1QxuRyc5xovrL9jF
Signature verifies correctly.
```

> **NOTE:** If you have an ed25519 key pair, then you need to use the `-e` flag with Subkey.
> `subkey -e sign`
> `subkey -e verify`

You need to submit the message, the address, and the signature. If you want to get on my good side, just paste in the whole verify command to the form so that I can copy/paste it and make sure it verifies. As in,
```
echo "message for guide" | subkey verify 409d131f2a809a9148348659e31b065b082d3aca5fe7fd10d1b93991b7dabf7ff9bdbbda5c6cf6a83c8e831a95460f3dc6601deaa2bc1c40247625a4eceaca89 H9mUgQLwPFBZ6HVkpJ7oACnQZdNu4mU1QxuRyc5xovrL9jF
```
:rocket: 
