mirror of
https://github.com/tuneinsight/lattigo.git
synced 2025-09-13 03:27:14 +00:00
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.
24 lines
458 B
Go
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
|
|
}
|