Key Types Overview
Hive accounts have four key types, each with different permissions:| Key Type | Permission Level | Use Cases |
|---|---|---|
| Owner | Highest | Change passwords, recover account, update authority |
| Active | High | Transfers, power up/down, witness votes, proposals |
| Posting | Medium | Post, comment, vote, follow, reblog |
| Memo | Special | Encrypt/decrypt private messages |
Generating Random Keys
Create a new cryptographically secure random key:Generate a random key
Key generation may take up to 250ms due to entropy collection for cryptographic security.
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