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
Problem: the server needs to know the ciphersuite and only works with one. This is because the Args/Output structs have FROST structs in them, which are (de)serialized as needed. This requires specifying a ciphersuite.
Solution: the server doesn't need to do the serialization roundtrip. It can receive FROST structs serialized and just pass them around.
Coding approach suggestion:
Change the FROST structs in server/src/types.go to use Vec<u8> instead, e.g. pub commitments: Vec<frost::round1::SigningCommitments> becomes pub commitments: Vec<Vec<u8>>.
By default serde encodes these Vec<u8> as integer arrays which is awkward. It's possible to encode them as hex strings (in human-readable formats like JSON) or directly binary. Check how we do that in SigningFormat::message field in frost-core for a reference on how to do that with serde(serialize_with).
For type safety it's possible to use newtypes for each struct, e.g. define a EncodedSigningCommitments(Vec<u8>) and use that instead.
The text was updated successfully, but these errors were encountered:
Problem: the server needs to know the ciphersuite and only works with one. This is because the Args/Output structs have FROST structs in them, which are (de)serialized as needed. This requires specifying a ciphersuite.
Solution: the server doesn't need to do the serialization roundtrip. It can receive FROST structs serialized and just pass them around.
Coding approach suggestion:
server/src/types.go
to useVec<u8>
instead, e.g.pub commitments: Vec<frost::round1::SigningCommitments>
becomespub commitments: Vec<Vec<u8>>
.Vec<u8>
as integer arrays which is awkward. It's possible to encode them as hex strings (in human-readable formats like JSON) or directly binary. Check how we do that inSigningFormat::message
field infrost-core
for a reference on how to do that withserde(serialize_with)
.EncodedSigningCommitments(Vec<u8>)
and use that instead.The text was updated successfully, but these errors were encountered: