githubEdit

ECDSA Keys

Arweave supports ECDSA secp256k1 signing keys for blocks and transactions.

ECDSA support was activated at the 2.9 hard forkarrow-up-right.

The key differences between RSA and ECDSA transactions are:

  • An ECDSA account can only sign a format=2 transaction.

  • The owner field must be empty for ECDSA txs.

  • The signature preimage is constructed slightly differently - the owner is omitted from the recursively hashed list.

  • The signature must be a 65-byte compact recoverable signature (64 bytes of r || s followed by a 1-byte recovery id). The protocol recovers the public key from the signature before validating it.

circle-exclamation

ECDSA transactions can be used for transferring tokens and uploading data, just like RSA txs.

There is no account delegation mechanism in Arweave.

Signing and verifying with arweave-js

Native ECDSA support is currently available in arweave-js in a dedicated brancharrow-up-right.

It is published under the ec npm tag:

npm install arweave@ec

You can see how to create and use ECDSA wallets in the library docsarrow-up-right.

Mining with ECDSA

Miners can use either RSA or ECDSA keys. ECDSA reward keys produce 65-byte block signatures, much shorter than RSA's 512-byte signatures.

To create a new ECDSA mining wallet, use the wallet create subcommand of the Arweave node:

Use rsa instead of ecdsa to create an RSA wallet.

The new keyfile is written to the wallets/ subdirectory of the node's data directory (data_dir), as a standard JWK JSON file named after the resulting Arweave address. On startup, the node automatically picks up keyfiles from wallets/ and detects the key type from the JWK; no extra configuration is needed to mine with ECDSA.

Last updated

Was this helpful?