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
EcPublicKeys, EcPrivateKeys and EcSignatures need to be stored in state. Therefore need to be serialized.
The underlying objects (Pairings GroupElements and FieldElements) will know how to serialize themselves into byte arrays with the provided serialization mechanism from arkworks: https://github.com/arkworks-rs/algebra/blob/master/serialize/README.md
That byte array that is already canonically serialized needs to be appended with a value (the signature schema + some reserved bytes if decided) and returned in a way that will assure that it is produced deterministically.
This will not be exposed to the library's users. They don't need to know that protobuf will be used internally.
We should go over and talk about alternatives. We should also understand the effect of introducing something other than direct serialization for consumers of the signature and the ledger when reading the blockade.
The text was updated successfully, but these errors were encountered:
mxtartaglia-sl
changed the title
Decide and define Protobuf managment strategy for hedera-cryptography
Decide and define Protobuf managment strategy for hedera-cryptographyAug 28, 2024
mxtartaglia-sl
changed the title
Decide and define Protobuf managment strategy for hedera-cryptography
Decide and define PublicKeys, PrivateKeys and Signatures serialization Strategy
Sep 12, 2024
Serialization continue as planned, we will use the returned serialization from arkworks and append 1 byte to define the signature schema
We need to converge the hashing mechanism to whatever can be used in S.C. possibly using KECCAK as hashing function + some encoding / mapping mechanism to the curve compatible with what can be produced in a s.c.
This needs to be reviewed also by @rsinha . also cc: @AlfredoG87
EcPublicKey
s,EcPrivateKey
s andEcSignature
s need to be stored in state. Therefore need to be serialized.The underlying objects (Pairings
GroupElement
s andFieldElement
s) will know how to serialize themselves into byte arrays with the provided serialization mechanism fromarkworks
: https://github.com/arkworks-rs/algebra/blob/master/serialize/README.mdThat byte array that is already canonically serialized needs to be appended with a value (the signature schema + some reserved bytes if decided) and returned in a way that will assure that it is produced deterministically.
This will not be exposed to the library's users. They don't need to know that protobuf will be used internally.
A suggestion instead of having a protobuf structure directly in the code is to produce the
ByteString
https://protobuf.dev/reference/java/api-docs/com/google/protobuf/ByteString instead.We should go over and talk about alternatives. We should also understand the effect of introducing something other than direct serialization for consumers of the signature and the ledger when reading the blockade.
The text was updated successfully, but these errors were encountered: