def to_affine
import bend-collections@1.0.0.0/src/crypto/secp256k1/point.bend as Pointimport Base
import bend-collections@1.0.0.0/src/crypto/secp256k1/field.bend as F
145# (X / Z, Y / Z); (0, 0) for the point at infinity
146def to_affine(p: Point) -> Affine:
147 match p:
148 case Point{x, y, z}: to_affine_z(x, y, F.inv(z))
Uses (4)
Used by (8)
- bend-collections@1.0.0.0/src/crypto/secp256k1/point:encode_uncompressed
- bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa:attempt_ok
- bend-collections@1.0.0.0/src/crypto/secp256k1/ecdsa:verify_rs
- bend-collections@1.0.0.0/src/crypto/secp256k1/point:encode_compressed
- bend-collections@1.0.0.0/src/crypto/secp256k1/schnorr:pubkey_d
- …