crypto

package
v0.0.0-...-836323f Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(key []byte, ciphertext []byte) (plaintext []byte)

func AesEncrypt

func AesEncrypt(key []byte, plaintext []byte) (ciphertext []byte)

func PKCS7Padding

func PKCS7Padding(plaintext []byte) []byte

func PKCS7UnPadding

func PKCS7UnPadding(plaintext []byte) []byte

func Prng

func Prng(length uint64) []byte

func ThresholdDecrypt

func ThresholdDecrypt(ctx context.Context, shares []DecryptionShare, ciphertext, netPubKeySet string) ([]byte, error)

func ThresholdEncrypt

func ThresholdEncrypt(ctx context.Context, subPubKey []byte, message []byte) ([]byte, error)

Types

type DecryptionShare

type DecryptionShare struct {
	Index uint8
	Share string
}

Jump to

Keyboard shortcuts

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