Documentation ¶
Overview ¶
Package ed25519 ed25519系统加密包
Index ¶
- Constants
- type Driver
- func (d Driver) GenKey() (crypto.PrivKey, error)
- func (d Driver) PrivKeyFromBytes(b []byte) (privKey crypto.PrivKey, err error)
- func (d Driver) PubKeyFromBytes(b []byte) (pubKey crypto.PubKey, err error)
- func (d Driver) SignatureFromBytes(b []byte) (sig crypto.Signature, err error)
- func (d Driver) Validate(msg, pub, sig []byte) error
- type PrivKeyEd25519
- type PubKeyEd25519
- type SignatureEd25519
- type SignatureS
Constants ¶
View Source
const ( Name = "ed25519" ID = 2 )
const
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct{}
Driver 驱动
func (Driver) PrivKeyFromBytes ¶
PrivKeyFromBytes 字节转为私钥
func (Driver) PubKeyFromBytes ¶
PubKeyFromBytes 字节转为公钥
func (Driver) SignatureFromBytes ¶
SignatureFromBytes 字节转为签名
type PrivKeyEd25519 ¶
type PrivKeyEd25519 [64]byte
PrivKeyEd25519 PrivKey
type PubKeyEd25519 ¶
type PubKeyEd25519 [32]byte
PubKeyEd25519 PubKey
func (PubKeyEd25519) Equals ¶
func (pubKey PubKeyEd25519) Equals(other crypto.PubKey) bool
Equals 相等
func (PubKeyEd25519) VerifyBytes ¶
func (pubKey PubKeyEd25519) VerifyBytes(msg []byte, sig crypto.Signature) bool
VerifyBytes 验证字节
type SignatureEd25519 ¶
type SignatureEd25519 [64]byte
SignatureEd25519 Signature
func (SignatureEd25519) Equals ¶
func (sig SignatureEd25519) Equals(other crypto.Signature) bool
Equals 相等
func (SignatureEd25519) String ¶
func (sig SignatureEd25519) String() string
Directories ¶
Path | Synopsis |
---|---|
Package ed25519 implements the Ed25519 signature algorithm.
|
Package ed25519 implements the Ed25519 signature algorithm. |
edwards25519
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
|
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519. |
Click to show internal directories.
Click to hide internal directories.