Key Types Overview
Hive accounts have four key types, each with different permissions:Generating Random Keys
Create a new cryptographically secure random key:1
Generate a random key
Key generation may take up to 250ms due to entropy collection for cryptographic security.
2
Get the public key
3
Store safely
Deriving Keys from Username and Password
Hive uses a deterministic key derivation scheme. You can generate the same keys from a username, password, and role:Creating Keys from a Seed
Generate deterministic keys from a seed string or bytes:The seed is hashed with SHA256 to produce the private key. The same seed always produces the same key.
Loading Existing Keys
Import keys from WIF (Wallet Import Format) strings:Working with Public Keys
Derive public keys from private keys:Secure Key Storage
Environment Variables
Store keys in environment variables:Encrypted Storage
For production applications, use encrypted key storage:Key Security Best Practices
Signing Messages
Sign arbitrary 32-byte hashes:Shared Secrets (ECDH)
Compute shared secrets for memo encryption:Shared secrets are used internally by the Memo class for encrypted messages. See the Memo Encryption guide for details.
Key Validation
Validate key format on import:Complete Key Management Example
Next Steps
- Learn about Memo Encryption for private messages
- Set up Multi-signature transactions
- Explore API Calls to query blockchain data