curve

package module
v0.0.0-...-b919ae3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: GPL-3.0 Imports: 3 Imported by: 1

README

curve25519-go

Package curve is a thin wrapper around the libsignal curve25519 implementation. It aims to be the Go equivalent of https://github.com/signalapp/curve25519-java

License

Copyright 2019 Lars Jellema Copyright 2015-2016 Open Whisper Systems

Licensed under the GPLv3, see LICENSE.

Documentation

Overview

Package curve is a thin wrapper around the libsignal curve25519 implementation. It aims to be the Go equivalent of https://github.com/signalapp/curve25519-java

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeypair

func GenerateKeypair() (privKey PrivateKey, pubKey PublicKey, err error)

Types

type CError

type CError struct {
	Fn   string
	Code int
}

func (CError) Error

func (err CError) Error() string

type PrivateKey

type PrivateKey []byte

func GeneratePrivateKey

func GeneratePrivateKey() (key PrivateKey, err error)

func (PrivateKey) CalculateAgreement

func (privateKey PrivateKey) CalculateAgreement(publicKey PublicKey) (sharedKey []byte, err error)

func (PrivateKey) CalculateSignature

func (key PrivateKey) CalculateSignature(message []byte) (signature []byte, err error)

func (PrivateKey) CalculateVrfSignature

func (key PrivateKey) CalculateVrfSignature(message []byte, random_data []byte) (signature []byte, err error)

func (PrivateKey) GeneratePublicKey

func (privateKey PrivateKey) GeneratePublicKey() (publicKey PublicKey, err error)

type PublicKey

type PublicKey []byte

func (PublicKey) VerifySignature

func (key PublicKey) VerifySignature(message []byte, signature []byte) (good bool, err error)

func (PublicKey) VerifyVrfSignature

func (key PublicKey) VerifyVrfSignature(message []byte, signature []byte) (vrfOutput []byte, err error)

Jump to

Keyboard shortcuts

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