dh

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptSymmetric

func DecryptSymmetric(key string, cyphertext []byte) ([]byte, error)

func DecryptWithDHKeyPair

func DecryptWithDHKeyPair(privateKey, publicKey string, cyphertext []byte) ([]byte, error)

DecryptWithDHKeyPair : 根据用户的私钥和对端的公钥生成ecdh密钥并进行对称解密

func EncryptSymmetric

func EncryptSymmetric(key string, plaintext []byte) ([]byte, error)

func EncryptWithDHKeyPair

func EncryptWithDHKeyPair(privateKey, publicKey string, plaintext []byte) ([]byte, error)

EncryptWithDHKeyPair : 根据用户的私钥和对端的公钥生成ecdh密钥并进行对称加密

func GenerateDHSessionKey

func GenerateDHSessionKey(privateKey, publicKey string) ([]byte, error)

GenerateDHSessionKey : 根据本端私钥和对端公钥生成ECDH会话密钥

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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