def is_high
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/scalar.bend as Scalarimport Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/limbs.bend as L
115# a > n / 2 (n is odd), i.e. 2 a >= n + 1 = 2^256 - cm1: the carry out of
116# 2 a + cm1
117def is_high(a: List<&2, Nat>) -> Bool:
118 Bool.not(L.ltm(cm1(), L.scal(2n, a)))
Uses (7)
Used by (5)
- bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa:verify_q
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fwrap:is_high_s
- bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa:finish
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/psign:fin_g
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/pver:vq