Documentation
¶
Index ¶
- Variables
- func DecodeArmor(armorStr string) (blockType string, headers map[string]string, data []byte, err error)
- func DecryptSymmetric(ciphertext []byte, secret []byte) (plaintext []byte, err error)
- func EncodeArmor(blockType string, headers map[string]string, data []byte) string
- func EncryptArmorPrivKey(privKeyBytes []byte, passphrase string, algo string) string
- func EncryptSymmetric(plaintext []byte, secret []byte) (ciphertext []byte)
- func UnarmorDecryptPrivKey(armorStr string, passphrase string) (privKey []byte, algo string, err error)
Constants ¶
This section is empty.
Variables ¶
var BcryptSecurityParameter = 12
BcryptSecurityParameter is security parameter var, and it can be changed within the lcd test. Making the bcrypt security parameter a var shouldn't be a security issue: One can't verify an invalid key by maliciously changing the bcrypt parameter during a runtime vulnerability. The main security threat this then exposes would be something that changes this during runtime before the user creates their key. This vulnerability must succeed to update this to that same value before every subsequent call to the keys command in future startups / or the attacker must get access to the filesystem. However, with a similar threat model (changing variables in runtime), one can cause the user to sign a different tx than what they see, which is a significantly cheaper attack then breaking a bcrypt hash. (Recall that the nonce still exists to break rainbow tables) For further notes on security parameter choice, see README.md
Functions ¶
func DecodeArmor ¶
func DecryptSymmetric ¶
secret must be 32 bytes long. Use something like Sha256(Bcrypt(passphrase)) The ciphertext is (secretbox.Overhead + 24) bytes longer than the plaintext.
func EncodeArmor ¶
func EncryptArmorPrivKey ¶
Encrypt and armor the private key.
func EncryptSymmetric ¶
secret must be 32 bytes long. Use something like Sha256(Bcrypt(passphrase)) The ciphertext is (secretbox.Overhead + 24) bytes longer than the plaintext.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package hd provides support for hierarchical deterministic wallets generation and derivation.
|
Package hd provides support for hierarchical deterministic wallets generation and derivation. |
|
Package keys provides common key management API.
|
Package keys provides common key management API. |
|
keys
|
|
|
internal/ecdsa
Package ECDSA implements Cosmos-SDK compatible ECDSA public and private key.
|
Package ECDSA implements Cosmos-SDK compatible ECDSA public and private key. |
|
secp256k1/internal/secp256k1
Package secp256k1 wraps the bitcoin secp256k1 C library.
|
Package secp256k1 wraps the bitcoin secp256k1 C library. |
|
secp256r1
Package secp256r1 implements Cosmos-SDK compatible ECDSA public and private key.
|
Package secp256r1 implements Cosmos-SDK compatible ECDSA public and private key. |