crypto

package
v0.49.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 ArmorInfoBytes added in v0.47.0

func ArmorInfoBytes(bz []byte) string

Armor the InfoBytes

func ArmorPubKeyBytes added in v0.47.0

func ArmorPubKeyBytes(bz []byte, algo string) string

Armor the PubKeyBytes

func EncryptArmorPrivKey added in v0.47.0

func EncryptArmorPrivKey(privKey cryptotypes.PrivKey, passphrase string, algo string) string

Encrypt and armor the private key.

func UnarmorDecryptPrivKey added in v0.47.0

func UnarmorDecryptPrivKey(armorStr string, passphrase string) (privKey cryptotypes.PrivKey, algo string, err error)

UnarmorDecryptPrivKey returns the privkey byte slice, a string of the algo type, and an error

func UnarmorInfoBytes added in v0.47.0

func UnarmorInfoBytes(armorStr string) ([]byte, error)

Unarmor the InfoBytes

func UnarmorPubKeyBytes added in v0.47.0

func UnarmorPubKeyBytes(armorStr string) (bz []byte, algo string, err error)

UnarmorPubKeyBytes returns the pubkey byte slice, a string of the algo type, and an error

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.
nolint
secp256r1
Package secp256r1 implements Cosmos-SDK compatible ECDSA public and private key.
Package secp256r1 implements Cosmos-SDK compatible ECDSA public and private key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL