Documentation
¶
Index ¶
- func Ed25519Sign(prv *PrivateKey, message []byte) ([]byte, error)
- func Ed25519Verify(pub *PublicKey, message []byte, sig []byte) bool
- func GenerateEd25519KeyPair() (*PrivateKey, *PublicKey, error)
- func NewEd25519KeyFromSeed(seed []byte) (*PrivateKey, *PublicKey)
- type Ed25519Party
- func (party *Ed25519Party) Phase1(pub2 *edwards.PublicKey) *edwards.PublicKey
- func (party *Ed25519Party) Phase2(hash []byte) (*edwards.PublicKey, error)
- func (party *Ed25519Party) Phase3(pubnonce2 *edwards.PublicKey) *edwards.PublicKey
- func (party *Ed25519Party) Phase4(hash []byte, groupPubkey *edwards.PublicKey, groupPubnonce *edwards.PublicKey) ([]byte, error)
- func (party *Ed25519Party) Phase5(sigs ...[]byte) ([]byte, error)
- type KeyPair
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ed25519Sign ¶
func Ed25519Sign(prv *PrivateKey, message []byte) ([]byte, error)
Ed25519Sign -- sign.
func Ed25519Verify ¶
Ed25519Verify -- verfiy.
func GenerateEd25519KeyPair ¶
func GenerateEd25519KeyPair() (*PrivateKey, *PublicKey, error)
GenerateEd25519KeyPair -- generate prv/pub pair by random.
func NewEd25519KeyFromSeed ¶
func NewEd25519KeyFromSeed(seed []byte) (*PrivateKey, *PublicKey)
NewEd25519KeyFromSeed -- generate prv/pub pair by the seed hash.
Types ¶
type Ed25519Party ¶
type Ed25519Party struct {
// contains filtered or unexported fields
}
Ed25519Party -- Ed25519 party struct.
func NewEd25519Party ¶
func NewEd25519Party(prv *edwards.PrivateKey) *Ed25519Party
NewEd25519Party -- create new Ed25519Party.
func (*Ed25519Party) Phase1 ¶
func (party *Ed25519Party) Phase1(pub2 *edwards.PublicKey) *edwards.PublicKey
Phase1 -- return the aggregate public key.
func (*Ed25519Party) Phase2 ¶
func (party *Ed25519Party) Phase2(hash []byte) (*edwards.PublicKey, error)
Phase2 -- return the local RFC6979 nonce*G.
func (*Ed25519Party) Phase3 ¶
func (party *Ed25519Party) Phase3(pubnonce2 *edwards.PublicKey) *edwards.PublicKey
Phase3 -- returns the share nonce.
Click to show internal directories.
Click to hide internal directories.