Skip to content

elliptic-curve: rename ElementBytes => FEBytes#288

Closed
tarcieri wants to merge 1 commit into
masterfrom
elliptic-curve/rename-febytes
Closed

elliptic-curve: rename ElementBytes => FEBytes#288
tarcieri wants to merge 1 commit into
masterfrom
elliptic-curve/rename-febytes

Conversation

@tarcieri

@tarcieri tarcieri commented Sep 4, 2020

Copy link
Copy Markdown
Member

Some type name bikeshedding...

It's not immediately clear that "Element" in ElementBytes refers to a field element.

This is a shorter alternative, although it uses an acronym for field element and therefore may be less clear.

@tarcieri tarcieri requested review from fjarri and str4d September 4, 2020 16:49
@tarcieri

tarcieri commented Sep 4, 2020

Copy link
Copy Markdown
Member Author

Going to leave this one open a bit to gauge what people think.

Comment thread elliptic-curve/src/lib.rs
pub type ElementBytes<C> = GenericArray<u8, <C as Curve>::FieldSize>;
/// Byte array containing a serialized field element, i.e. an element
/// of the given curve's base or scalar fields.
pub type FEBytes<C> = GenericArray<u8, <C as Curve>::FieldSize>;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@str4d I've noticed the ff and group crates use a "Repr" naming convention here... do you think something like FERepr would be better?

It's not immediately clear that "Element" in `ElementBytes` refers to a
field element.

This is a shorter alternative, although it uses an acronym for field
element and therefore may be less clear.
@tarcieri

tarcieri commented Sep 9, 2020

Copy link
Copy Markdown
Member Author

Closing in favor of #296

@tarcieri tarcieri closed this Sep 9, 2020
@tarcieri tarcieri deleted the elliptic-curve/rename-febytes branch September 9, 2020 16:25
dns2utf8 pushed a commit to dns2utf8/traits that referenced this pull request Jan 24, 2023
Bumps [zeroize](https://github.com/RustCrypto/utils) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](RustCrypto/utils@zeroize-v1.5.3...zeroize-v1.5.4)

---
updated-dependencies:
- dependency-name: zeroize
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

1 participant