sui keytool command provides tools for managing cryptographic keys in the Sui keystore.
Synopsis
Global Options
path
Path to the keystore file
boolean
Return command outputs in JSON format
Commands
update-alias
Update an old alias to a new one.string
required
Current alias to update
string
New alias. If not provided, a random one will be generated
convert
Convert private key from Hex or Base64 to Bech32 format.string
required
Private key in Hex or Base64 format
Hex private key import/export is deprecated. Use Bech32 format (starting with
suiprivkey) for all key operations.decode-or-verify-tx
Decode transaction bytes or verify a signature.string
required
Base64 encoded transaction bytes
GenericSignature
Signature to verify against the transaction
u64
default:"0"
Current epoch for verification
decode-multi-sig
Decode a MultiSig signature and optionally verify it.MultiSig
required
MultiSig signature to decode
string
Transaction bytes to verify against (optional)
u64
default:"0"
Current epoch for verification
generate
Generate a new keypair.SignatureScheme
required
Key scheme:
ed25519, secp256k1, or secp256r1DerivationPath
Optional derivation path. Defaults:
- ed25519:
m/44'/784'/0'/0'/0' - secp256k1:
m/54'/784'/0'/0/0 - secp256r1:
m/74'/784'/0'/0/0
string
Mnemonic word length:
word12, word15, word18, word21, or word24. Default: word12.key file in current directory with filename <address>.key.
import
Add a new key to Sui CLI Keystore.string
Alias for this address. Must start with a letter and contain only letters, digits, hyphens (-), or underscores (_)
string
required
Either a mnemonic phrase or Bech32 encoded private key (starting with
suiprivkey)SignatureScheme
required
Key scheme:
ed25519, secp256k1, or secp256r1DerivationPath
Optional derivation path (only for mnemonic import)
export
Export the private key of a given key identity.KeyIdentity
required
Address or alias of the key to export
list
List all keys in sui.keystore.boolean
Sort by alias instead of address
load-keypair
Read a keypair from a file.path
required
Path to keypair file
- SuiKeyPair: Base64 encoded 33-byte
flag || privkey - AuthorityKeyPair: Base64 encoded
privkey
show
Show the public key and scheme from a keypair file.path
required
Path to keypair file
sign
Create a signature using a private key.KeyIdentity
required
Address or alias of the signer
string
required
Base64 encoded BCS serialized transaction data
Intent
Intent for the signature. Default: transaction intent
sign-kms
Create a signature using AWS KMS.string
required
Base64 encoded BCS serialized transaction data
string
required
AWS KMS key ID
Intent
Intent for the signature
string
required
Base64 encoded public key
Requires AWS credentials configured in the environment.
multisig-address
Generate a MultiSig address.ThresholdUnit
required
Threshold for the MultiSig (minimum weight required)
PublicKey[]
required
List of public keys (Base64 encoded
flag || pk)WeightUnit[]
required
List of weights corresponding to each public key
multisig-combine-partial-sig
Combine partial signatures into a MultiSig signature.GenericSignature[]
required
List of participating signatures (Base64 encoded)
PublicKey[]
required
List of all public keys in the MultiSig
WeightUnit[]
required
List of weights for each public key
ThresholdUnit
required
Threshold for the MultiSig
unpack
Unpack a keypair and output to file.string
required
Base64 encoded 33-byte
flag || privkey<address>.key in the current directory.
Example:
zk-login-sign-and-execute-tx
Generate OAuth URL and execute a zkLogin transaction.u64
required
Maximum epoch for zkLogin signature validity
string
default:"devnet"
Network to use (devnet, testnet, mainnet)
boolean
default:"false"
Use a fixed keypair generated from [0; 32] seed
boolean
default:"false"
Use a multisig address with zklogin and a traditional keypair
boolean
default:"false"
Execute tx with the traditional sig (in the multisig), otherwise with the zklogin sig
- Generate OAuth URLs for various providers (Google, Twitch, Facebook, etc.)
- Prompt you to visit a URL and paste the redirect
- Generate zkLogin proof
- Execute a test transaction
zk-login-enter-token
Workaround for zkLogin when token pasting doesn’t work.string
required
Parsed JWT token
u64
required
Maximum epoch
string
required
JWT randomness
string
required
Ephemeral keypair as BigInt
SuiAddress
required
Ephemeral key identifier
string
default:"devnet"
Network to use
zk-login-sig-verify
Parse and verify a zkLogin signature.string
required
Base64 encoded zkLogin signature
string
Base64 encoded TransactionData or PersonalMessage
u8
required
0 for TransactionData, 3 for PersonalMessage
u64
Current epoch for verification
string
default:"devnet"
Network to verify the signature for
zk-login-insecure-sign-personal-message
TESTING ONLY: Generate a zkLogin signature for a personal message.string
required
Base64 encoded message to sign
u64
required
Maximum epoch for zkLogin signature validity
Key Schemes
Sui supports three signature schemes:ed25519
- Default derivation path:
m/44'/784'/0'/0'/0' - Recommended for: General use
- Advantages: Fast, small signatures
secp256k1
- Default derivation path:
m/54'/784'/0'/0/0 - Recommended for: Compatibility with Bitcoin/Ethereum tools
- Advantages: Wide ecosystem support
secp256r1
- Default derivation path:
m/74'/784'/0'/0/0 - Recommended for: Hardware security modules
- Advantages: NIST standard, hardware support