Our ibe.Ciphertext struct can have variable size serialization, depending on the curve of the kyber.Point and the size of the hash used, etc.
|
type Ciphertext struct { |
|
// Random point rP |
|
U kyber.Point |
|
// Sigma attached to ID: sigma XOR H(rG_id) |
|
V []byte |
|
// ciphertext of the message M XOR H(sigma) |
|
W []byte |
|
} |
It would be nice to have a "good way" of encoding it and decoding it.
Otherwise all the users have to go through the painful process of re-implementing something like that, e.g.:
https://github.com/drand/tlock/blob/24c8c6e1b288fcd1a703da1db5606800b4607337/tlock.go#L216-L234
Our
ibe.Ciphertextstruct can have variable size serialization, depending on the curve of thekyber.Pointand the size of the hash used, etc.kyber/encrypt/ibe/ibe.go
Lines 15 to 22 in 23debab
It would be nice to have a "good way" of encoding it and decoding it.
Otherwise all the users have to go through the painful process of re-implementing something like that, e.g.:
https://github.com/drand/tlock/blob/24c8c6e1b288fcd1a703da1db5606800b4607337/tlock.go#L216-L234