algorand / pixel

Algorand's implementation of pixel consensus signature
MIT License
19 stars 4 forks source link

serializations #8

Closed zhenfeizhang closed 5 years ago

zhenfeizhang commented 5 years ago

Group elements

ciphersuite id

Maps a u8 to a set of parameters

Example (to be decided):

CSID Curve PK Generator hash to field deterministic randomness
0x00 BLS12-381 PK in G1 non-randomized generator bls' hash to field function true

Parameters

|ciphersuite id| d | serialize(g2) | serialize(h) | serialize(h0) | ... | serialize(hd)

public key

subsecretkey

secret key

note: the time stamp is not stored for secret key. It can be obtained from its first ssk.

signature

|ciphersuite id| time |sigma1|sigma2|

hoeteck commented 5 years ago

There's no need to standardize serialization of secret keys and sub secret key, since these are internal to the implementation.

For public keys and signatures, I don't really have an opinion, but it'd make sense to follow whatever is done for BLS signatures, etc. :)

For h, h0, h1, etc, we should fix some special string, and then run hash_to_Gx(string | counter).

zhenfeizhang commented 5 years ago

Thanks! Will follow BLS signature's encoding. And also use hash to group to generate the public parameters.

zhenfeizhang commented 5 years ago

Use the serialization method in the main body of this ticket.