Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable and function naming #25

Closed
andrewwhitehead opened this issue Jan 10, 2022 · 2 comments
Closed

Variable and function naming #25

andrewwhitehead opened this issue Jan 10, 2022 · 2 comments
Assignees
Labels
core Associated to the core spec

Comments

@andrewwhitehead
Copy link
Contributor

The current draft uses the caret and tilde characters in variable naming, as they are in some of the source research. This causes issues with the markdown format of the specification in that it is burdensome and/or impossible to properly escape these characters.

I don't see any clear standards on variable or function naming in other IETF drafts. Variables may be upper-, lower-, camel-, or snake-cased. Functions can be camel-cased, snake-cased, or kebab-case (ie. HKDF-Extract).

Some suggestions for discussion:

  • name spec-internal variables and functions in snake case unless they represent an initialism (like DST) or are commonly capitalized (such as a field F or the set of integers Z). I think there is a tendency to use capitalized variables for elliptic curve points like A in the signature
  • name external functions according to their respective standards when possible, for example hash_to_curve
  • a trailing apostrophe is allowed in variable names, such as s' - precedent in hash-to-curve draft for example
  • for variables currently using ~ as a suffix use _b short for blinding factor
  • for variables currently using ^ as a suffix use _c short for commitment
@bumblefudge
Copy link
Contributor

See #17

@andrewwhitehead
Copy link
Contributor Author

I believe this has been resolved by other issues and PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Associated to the core spec
Projects
None yet
Development

No branches or pull requests

3 participants