Generate Keys
The Flow CLI provides a command to generate ECDSA key pairs that can be attached to new or existing Flow accounts.
_10flow keys generate
⚠️ Store private key safely and don't share with anyone!
Example Usage
_10flow keys generate
Example response
_10> flow keys generate_10_10🔴️ Store Private Key safely and don't share with anyone! _10Private Key c778170793026a9a7a3815dabed68ded445bde7f40a8c66889908197412be89f _10Public Key 584245c57e5316d6606c53b1ce46dae29f5c9bd26e9e8...aaa5091b2eebcb2ac71c75cf70842878878a2d650f7
Flags
Seed
- Flag:
--seed
- Valid inputs: any string with length >= 32
Specify a UTF-8 seed string that will be used to generate the key pair. Key generation is deterministic, so the same seed will always result in the same key.
If no seed is specified, the key pair will be generated using a random 32 byte seed.
⚠️ Using seed with production keys can be dangerous if seed was not generated by using safe random generators.
Signature Algorithm
- Flag:
--sig-algo
- Valid inputs:
"ECDSA_P256", "ECDSA_secp256k1"
Specify the ECDSA signature algorithm for the key pair.
Flow supports the secp256k1 and P-256 curves.