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

feat: felt creation from bytes is infallible #16

Merged
merged 5 commits into from
Nov 22, 2023

Commits on Nov 14, 2023

  1. feat: felt creation from bytes is infallible

    Expose 4 ways to create a field element from arbitrary bytes:
    - `from_bytes_be`/`from_bytes_le`: take exactly 32 bytes and interpret
      them as a big/little endian number of 256 bits and then build a field
      element from it, modulo STARK prime (in whatever representation
      `Stark252PrimeField` uses, currently Montgomery);
    - `from_bytes_be_slice`/`from_bytes_le_slice`: take any number of bytes
      and interpret them as a big/little endian number modulo STARK prime by
      decomposing into 256 bits integers and multiplying by the appropriate
      factors.
    Oppen committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    772974f View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. Configuration menu
    Copy the full SHA
    2f87ed3 View commit details
    Browse the repository at this point in the history
  2. Doc

    Oppen committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    4b10fa6 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. Configuration menu
    Copy the full SHA
    adc5424 View commit details
    Browse the repository at this point in the history
  2. Example

    Oppen committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    9cfac8c View commit details
    Browse the repository at this point in the history