Files
lattigo/utils/structs/structs.go
Christian Mouchet 452757b0a9 centralized rlwe key-related structs in keys.go and used [2]ringqp.Poly as unerlying PublicKey type
The use of OperandQP for public key is correct but a bit of an overkill, especially since public-keys
must be of size two (which requires an additional check at cast/read/write anyway) and because they
should not require to serialize ciphertext-related metadata.
2023-06-12 18:09:22 +02:00

24 lines
458 B
Go

// Package structs implements helpers to generalize vectors and matrices of structs, as well as their serialization.
package structs
import (
"encoding"
"io"
)
type CopyNewer[V any] interface {
CopyNew() *V
}
type BinarySizer interface {
BinarySize() int
}
// BinarySerializer is a testing interface for byte encoding and decoding.
type BinarySerializer interface {
io.WriterTo
io.ReaderFrom
encoding.BinaryMarshaler
encoding.BinaryUnmarshaler
}