Documentation ¶
Index ¶
- Variables
- func KeyGen() (sk *SKey, pk *PKey, err error)
- func KeyGenServer() (sk *SKey, pk *PKeyServer, err error)
- func PEKS(word []byte, server *PKeyServer, receiver *PKey, sender *SKey) ([]byte, error)
- func Test(ciphertext, trapdoor []byte, server *SKey) (ok bool, err error)
- func Trapdoor(word []byte, server *PKeyServer, sender *PKey, receiver *SKey) ([]byte, error)
- type EllipticKey
- type PKey
- type PKeyServer
- type SKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SizeG1 = 64 SizeG2 = 129 SizeGT = 384 SizeSK = 32 )
View Source
var ( ErrCiphertext = errors.New("invalid ciphertext") ErrTrapdoor = errors.New("invalid trapdoor") ErrRandom = errors.New("invalid source of randomness") )
View Source
var RandomSource = rand.Reader
Functions ¶
func KeyGenServer ¶
func KeyGenServer() (sk *SKey, pk *PKeyServer, err error)
Types ¶
type EllipticKey ¶
type PKeyServer ¶
func (*PKeyServer) Bytes ¶
func (pk *PKeyServer) Bytes() []byte
func (*PKeyServer) FromBytes ¶
func (pk *PKeyServer) FromBytes(m []byte) error
func (*PKeyServer) FromSKey ¶
func (pk *PKeyServer) FromSKey(sk *SKey) error
Click to show internal directories.
Click to hide internal directories.