HomePhabricator

[SECP256K1] Increase precision of g1 and g2

Description

[SECP256K1] Increase precision of g1 and g2

Summary:

This allows us to shift by 256+128 = 384 bits, which is a multiple of
the limb size of the scalar representation. This also happens to be the
most precision possible for g2 that still fits into a 256-bit value.

Partial backport 2/11 of secp256k1 PR830:
https://github.com/bitcoin-core/secp256k1/pull/830/commits/76ed922a5f09d63e0622825ca83d9301c1ef3efe

Test Plan:

ninja check-secp256k1

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8038

Details

Provenance
Russell O'Connor <roconnor@blockstream.io>Authored on Sep 21 2020, 15:40
FabienCommitted on Oct 22 2020, 19:52
FabienPushed on Oct 22 2020, 19:52
Reviewer
Restricted Project
Differential Revision
D8038: [SECP256K1] Increase precision of g1 and g2
Parents
rABCfea82d5ce4ee: [SECP256K1] Switch to our own memcmp function
Branches
Unknown
Tags
Unknown