You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When mapping from a gennaro BLS secret share to a blsful secret share, there is a failure in deserialization because there is no standardized way of doing this between the two crates. Blsful uses serde, whereas gennaro has no export option using the same serde methods for serialization. I imagine the same is true for the public key shares too.
If there can be a from_raw_be and from_from_compressed for secret shares and public shares, respectively, this should solve our issue.
The text was updated successfully, but these errors were encountered:
The secret from gennaro is just a scalar element whereas a secret share in blsful requires the identifier also. The easiest way to do this is to prepend the identifier as a byte to the secret share bytes.
let mut secret_share_bytes = Vec::with_capacity(33);
secret_share_bytes.push(1u8); // or whatever the identifier is
secret_share_bytes.extend_from_slice(&secret.to_be_bytes());
let secret_share: SecretShare = secret_share_bytes.try_into()?;
Notice the test here: https://github.com/webb-tools/gadget/pull/60/files#diff-859b3cbc12cbcc4dd8fd5b3fb2c3f70b07d5d7e136b769be36443976607dcfcaR330-R345
When mapping from a gennaro BLS secret share to a blsful secret share, there is a failure in deserialization because there is no standardized way of doing this between the two crates. Blsful uses serde, whereas gennaro has no export option using the same serde methods for serialization. I imagine the same is true for the public key shares too.
If there can be a
from_raw_be
andfrom_from_compressed
for secret shares and public shares, respectively, this should solve our issue.The text was updated successfully, but these errors were encountered: