OTS

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

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

OTS

An Implementation of the one-time signature scheme from [Gro06].

Reference

[Gro06] J. Groth. Simulation-sound NIZK proofs for a practical language and constant size group signatures. ASIACRYPT ’06, LCNS 4284, pp. 444–459, Springer Verlag, 2006

Documentation

Index

Constants

View Source
const (
	G1Count = 1 << 1      //g1: *2
	G2Count = 1 << 2      //g2:  *4
	GTCount = 1<<2 + 1<<3 //gt:  *12
)

Variables

This section is empty.

Functions

func HashToZp

func HashToZp(bytestring []byte) *big.Int

Types

type Params

type Params struct {
	G *bn256.G1
}

G1 is faster than G2 and GT

func Setup

func Setup(r io.Reader) (*Params, error)

func (*Params) KeyGen

func (params *Params) KeyGen(r io.Reader) (*VerKey, *SignKey, error)

type SignKey

type SignKey struct {
	// contains filtered or unexported fields
}

func (*SignKey) Sign

func (sk *SignKey) Sign(r io.Reader, m []byte) (*Signature, error)

type Signature

type Signature struct {
	// contains filtered or unexported fields
}

func (*Signature) Verify

func (sig *Signature) Verify(params *Params, vk *VerKey, m []byte) bool

type VerKey

type VerKey struct {
	// contains filtered or unexported fields
}

func (*VerKey) Marshal

func (vk *VerKey) Marshal() []byte

func (*VerKey) Unmarshal

func (vk *VerKey) Unmarshal(ret []byte) (*VerKey, error)

Jump to

Keyboard shortcuts

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