Documentation ¶
Index ¶
Constants ¶
const ( // PrivateKeyLength is the length of the key seed. PrivateKeyLength = kyber1024.KeySeedSize // PublicKeyLength is the length of the Kyber-1024 public key. PublicKeyLength = kyber1024.PublicKeySize )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
PrivateKey represents a private key.
func NewPrivateKey ¶
func NewPrivateKey() (*PrivateKey, error)
NewPrivateKey generates a new random private key.
func NewPrivateKeyForSeed ¶
func NewPrivateKeyForSeed(keySeed []byte) (*PrivateKey, error)
NewPrivateKeyForSeed returns the instance private key for given bytes. Please use exactly 64 bytes.
func (*PrivateKey) Bytes ¶
func (privateKey *PrivateKey) Bytes() []byte
Bytes returns the bytes of the private key.
func (*PrivateKey) NewDecryptingReader ¶
NewDecryptingReader returns a new Reader that reads and decrypts data with the private key from src.
func (*PrivateKey) PublicKey ¶
func (privateKey *PrivateKey) PublicKey() (*PublicKey, error)
PublicKey returns the public key corresponding to the private key. The public key is derived from the private key.
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
PublicKey represents a public key.
func ParsePublicKey ¶
ParsePublicKey returns the instance of public key for given bytes. Please use exactly 32 bytes.
func (*PublicKey) NewEncryptingWriter ¶
func (publicKey *PublicKey) NewEncryptingWriter(dst io.Writer, compress bool) (io.WriteCloser, error)
NewEncryptingWriter returns a new WriteCloser that encrypts data with the public key and writes to dst.