eccrypt

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: ISC Imports: 10 Imported by: 2

README

EC Crypt 160/192/256/512-bit

ISC License GoDoc Go Report Card GitHub release (latest by date)

Elliptic curve-based Asymmetric Encryption Scheme
CMD Examples:
./ecdsacrypter -gen
./ecdsacrypter -enc -key $pubkey < plaintext.ext > ciphertext.ext 
./ecdsacrypter -dec -key $prvkey < ciphertext.ext 

License

This project is licensed under the ISC License.

Documentation

Overview

ECC 256-bit Asymmetric Encryption Scheme

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CipherMarshal

func CipherMarshal(data []byte) ([]byte, error)

func CipherUnmarshal

func CipherUnmarshal(data []byte) ([]byte, error)

func Decrypt

func Decrypt(priv *PrivateKey, data []byte, mode int) ([]byte, error)

func DecryptAsn1

func DecryptAsn1(pub *PrivateKey, data []byte) ([]byte, error)

func Encrypt

func Encrypt(pub *PublicKey, data []byte, random io.Reader, mode int) ([]byte, error)

func EncryptAsn1

func EncryptAsn1(pub *PublicKey, data []byte, rand io.Reader) ([]byte, error)

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	D *big.Int
}

func (*PrivateKey) DecryptAsn1

func (priv *PrivateKey) DecryptAsn1(data []byte) ([]byte, error)

func (*PrivateKey) Public

func (priv *PrivateKey) Public() crypto.PublicKey

type PublicKey

type PublicKey struct {
	elliptic.Curve
	X, Y *big.Int
}

func (*PublicKey) EncryptAsn1

func (pub *PublicKey) EncryptAsn1(data []byte, random io.Reader) ([]byte, error)

Directories

Path Synopsis
cmd
ecdsacrypter
Command-line ECDSA Asymmetric Crypter
Command-line ECDSA Asymmetric Crypter
ECC 160-bit Asymmetric Encryption Scheme
ECC 160-bit Asymmetric Encryption Scheme
ECC 192-bit Asymmetric Encryption Scheme
ECC 192-bit Asymmetric Encryption Scheme
ECC 512-bit Asymmetric Encryption Scheme
ECC 512-bit Asymmetric Encryption Scheme
Package ecdsa implements the Elliptic Curve Digital Signature Algorithm, as defined in FIPS 186-4 and SEC 1, Version 2.0.
Package ecdsa implements the Elliptic Curve Digital Signature Algorithm, as defined in FIPS 186-4 and SEC 1, Version 2.0.

Jump to

Keyboard shortcuts

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