Skip to content

Order of hash function parameters in adaptor point#217

Open
raulcano wants to merge 1 commit intodiscreetlogcontracts:masterfrom
raulcano:adaptor_point_hash_params_order
Open

Order of hash function parameters in adaptor point#217
raulcano wants to merge 1 commit intodiscreetlogcontracts:masterfrom
raulcano:adaptor_point_hash_params_order

Conversation

@raulcano
Copy link
Copy Markdown

I discovered a very minor inconsistency in specs regarding the hash function in the adaptor points (aka tweak points or signature points).

  • In the introduction is described as S = R + H(R || P || m) * P (R before the P)
  • In the numeric outcome section is described as si * G = Ri + H(P, Ri, di)*P (P before the Ri)
  • In other sources (i.e. CryptoGarage), it's described as T = R + H(R || P || m)*P (R before the P)

Hence, for clarity and consistency, this pull request proposes to change the H(P, Ri, di) to H(Ri, P, di).

In all fairness, the notation H(P, Ri, di) does not imply that the byte chain will be built in the same order the parameters are present in the function call (the operator || implies concatenation, the comma , does not). However, for clarity, I believe we should make sure to use the same order and avoid potential confusion.

@Christewart
Copy link
Copy Markdown
Contributor

ACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants