Documentation ¶
Overview ¶
Package cryptoutil contains generic & stateless crypto helpers.
Index ¶
- Constants
- func ConcatAndHashSha256(slices ...[]byte) *[sha256.Size]byte
- func EdwardsToMontgomery(privKey crypto.PrivKey, pubKey crypto.PubKey) (*[32]byte, *[32]byte, error)
- func EdwardsToMontgomeryPriv(privKey crypto.PrivKey) (*[KeySize]byte, error)
- func EdwardsToMontgomeryPub(pubKey crypto.PubKey) (*[KeySize]byte, error)
- func GenerateNonce() (*[NonceSize]byte, error)
- func KeySliceToArray(keySlice []byte) (*[KeySize]byte, error)
- func NonceSliceToArray(nonceSlice []byte) (*[NonceSize]byte, error)
- func SeedFromEd25519PrivateKey(key crypto.PrivKey) ([]byte, error)
Constants ¶
View Source
const ( KeySize = 32 // Key size required by box NonceSize = 24 // Nonce size required by box )
Variables ¶
This section is empty.
Functions ¶
func ConcatAndHashSha256 ¶ added in v2.33.0
func EdwardsToMontgomery ¶
func EdwardsToMontgomery(privKey crypto.PrivKey, pubKey crypto.PubKey) (*[32]byte, *[32]byte, error)
EdwardsToMontgomery converts ed25519 priv/pub keys to X25519 keys
func EdwardsToMontgomeryPriv ¶ added in v2.33.0
EdwardsToMontgomeryPriv converts ed25519 priv key to X25519 priv key
func EdwardsToMontgomeryPub ¶ added in v2.33.0
EdwardsToMontgomeryPub converts ed25519 pub key to X25519 pub key
func GenerateNonce ¶ added in v2.33.0
func KeySliceToArray ¶ added in v2.33.0
func NonceSliceToArray ¶ added in v2.33.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.