cryptoutil

package
v2.214.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package cryptoutil contains generic & stateless crypto helpers.

Index

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 ConcatAndHashSha256(slices ...[]byte) *[sha256.Size]byte

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

func EdwardsToMontgomeryPriv(privKey crypto.PrivKey) (*[KeySize]byte, error)

EdwardsToMontgomeryPriv converts ed25519 priv key to X25519 priv key

func EdwardsToMontgomeryPub added in v2.33.0

func EdwardsToMontgomeryPub(pubKey crypto.PubKey) (*[KeySize]byte, error)

EdwardsToMontgomeryPub converts ed25519 pub key to X25519 pub key

func GenerateNonce added in v2.33.0

func GenerateNonce() (*[NonceSize]byte, error)

func KeySliceToArray added in v2.33.0

func KeySliceToArray(keySlice []byte) (*[KeySize]byte, error)

func NonceSliceToArray added in v2.33.0

func NonceSliceToArray(nonceSlice []byte) (*[NonceSize]byte, error)

func SeedFromEd25519PrivateKey

func SeedFromEd25519PrivateKey(key crypto.PrivKey) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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