Commit Graph

6 Commits

Author SHA1 Message Date
Jean-Philippe Bossuat
0f9e100596 [utils/structs]: expanded support for floats and integers. 2023-10-05 11:22:36 +02:00
Jean-Philippe Bossuat
c631457984 [utils/structs]: fixed error messages 2023-10-05 09:18:08 +02:00
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
Christian Mouchet
029e9d2c07 removed the Encode and Decode interface 2023-06-12 13:53:16 +02:00
Christian Mouchet
28d498ffc7 improved Vector, Matrix and Map types
Vector and Matrix now use []T and [][]T as underlying types, which makes them more versatile and easy to cast to from slices.
Map still uses map[K]V as map values cannot be addressed and this is anoying to use.
I also got rid of the Codec[T] type as it can be replaced with a 3-liner (i.e., equivalent to calling the Codex and checking the error).
There is also a small change of the OperendQ.Encode method that now uses OperandQ.WriteTo instead of OperandQ.Encode (since it is a bit fasterfor some reason...). This is an experiment and more work on the serialization is needed.
2023-06-07 20:18:13 +02:00
Jean-Philippe Bossuat
179d8cbdc8 [utils]: added structs 2023-04-04 13:40:31 +02:00