The class Secp256k1 implements methods to efficiently verify scalar point multiplications on the curve secp256k1.
All the methods implemented by Secp256k1 are class methods. The following public methods are implemented:
-
verify_base_point_multiplication: script used to verify that$Q = bG$ , where$G$ is the generator of secp256k1. -
verify_point_multiplication_up_to_sign: script used to verify that$Q = \pm bP$ , where$Q, P$ are points on secp256k1. -
verify_point_multiplication: script used to verify that$Q = bP$ , where$Q, P$ are points on secp256k1.
Some of the scripts above have restrictions on the point
The unlocking scripts for the methods contained in the class Secp256k1 can be generated using the unlocking keys found in src/zkscript/script_types/unlocking_keys/secp256k1.py. There are three unlocking keys, one for each script:
Secp256k1BasePointMultiplicationUnlockingKey, for the script generated by the methodverify_base_point_multiplication.Secp256k1PointMultiplicationUpToSignUnlockingKey, for the script generated by the methodverify_point_multiplication_up_to_sign.Secp256k1PointMultiplicationUnlockingKey, for the script generated by the methodverify_point_multiplication.