Updated encode_for_hash per @andrewwhitehead's proposal from here (including renaming the operation to serialize and definING SignatureToOctets and ProofToOctets based on serialize).
Added 2 new operations, get_domain and get_challenge. Their purpose is to simplify the core operations, since with the revision on encode_for_hash they would have become more complex (note proofGen will be 32 steps instead of 24 without those 2 operations).
NOTE: I would like to introduce a breaking change and put the PK at the end of the serialized array in get_domain (step 7), to be consistent with the “octet strings go at the end rule”. Not worth it now, but maybe will bundle it together with some other breaking changes at some point.
Not sure if the result is simpler overall but is more rigorous and much better defined IMO.
Fixes #225
encode_for_hash
per @andrewwhitehead's proposal from here (including renaming the operation to serialize and definINGSignatureToOctets
andProofToOctets
based onserialize
).get_domain
andget_challenge
. Their purpose is to simplify the core operations, since with the revision on encode_for_hash they would have become more complex (note proofGen will be 32 steps instead of 24 without those 2 operations).NOTE: I would like to introduce a breaking change and put the PK at the end of the serialized array in
get_domain
(step 7), to be consistent with the “octet strings go at the end rule”. Not worth it now, but maybe will bundle it together with some other breaking changes at some point.Not sure if the result is simpler overall but is more rigorous and much better defined IMO.