Skip to content

Conversation

@tarcieri
Copy link
Member

Note: currently 64-bit only

Adds an initial scalar arithmetic backend combining crypto-bigint and elliptic_curve::ScalarCore-based functionality with arithmetic generated using the ff_derive crate for functions that crypto-bigint presently doesn't support.

Constants such as the multiplicative generator and root of unity calculated using SageMath:

sage: n = 0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973
sage: GF(n).primitive_element()
2
sage: s = 1
sage: t = (n - 1) >> s
sage: t
19701003098197239606139520050071806902539869635232723333973452639813829699556631784699478154076147456777216826971321
sage: power_mod(2,t,n)
39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942642

@tarcieri tarcieri force-pushed the p384/scalar-arithmetic branch 3 times, most recently from 8ad2497 to c4b8b1a Compare December 18, 2021 16:24
Note: currently 64-bit only

Adds an initial scalar arithmetic backend combining `crypto-bigint` and
`elliptic_curve::ScalarCore`-based functionality with arithmetic
generated using the `ff_derive` crate for functions that `crypto-bigint`
presently doesn't support.

Constants such as the multiplicative generator and root of unity
calculated using SageMath:

    sage: n = 0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973
    sage: GF(n).primitive_element()
    2
    sage: s = 1
    sage: t = (n - 1) >> s
    sage: t
    19701003098197239606139520050071806902539869635232723333973452639813829699556631784699478154076147456777216826971321
    sage: power_mod(2,t,n)
    39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942642
@tarcieri tarcieri force-pushed the p384/scalar-arithmetic branch from c4b8b1a to a71325d Compare December 18, 2021 16:26
@tarcieri tarcieri merged commit f0b91ab into master Dec 18, 2021
@tarcieri tarcieri deleted the p384/scalar-arithmetic branch December 18, 2021 16:43
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