:py:mod:`ggmpc.curves` ====================== .. py:module:: ggmpc.curves .. autoapi-nested-parse:: Supported elliptic curves. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ggmpc.curves.Curve Attributes ~~~~~~~~~~ .. autoapisummary:: ggmpc.curves.secp256k1 ggmpc.curves.ed25519 .. py:class:: Curve(scalar_random, scalar_add, scalar_sub, scalar_mul, scalar_reduce, scalar_negate, scalar_invert, scalar_mul_base, point_add, point_mul, order, hash, verify) Elliptic curve parameters. :param scalar_random: Function that returns a random field element. :type scalar_random: function :param scalar_add: Function that returns the sum of two field elements modulo the order of the curve. :type scalar_add: function :param scalar_sub: Function that returns the difference of two field elements modulo the order of the curve. :type scalar_sub: function :param scalar_mul: Function that returns the product of two field elements modulo the order of the curve. :type scalar_mul: function :param scalar_reduce: Function that reduces a scalar modulo the order of the curve. :type scalar_reduce: function :param scalar_invert: Function that returns the modular multiplicative inverse of a field element. :type scalar_invert: function :param scalar_negate: Function that returns the negated field element modulo the order of the curve. :type scalar_negate: function :param scalar_mul_base: Function that multiplies the curve generator by a field element. :type scalar_mul_base: function :param point_add: Function that adds two group elements. :type point_add: function :param point_mul: Function that multiplies a group element by a field element. :type point_mul: function :param order: Function that returns the order of the curve. :type order: function :param hash: A hash function using a `hashlib`-like interface. :type hash: function :param verify: Function that verifies a signature. :type verify: function .. py:data:: secp256k1 Secp256k1 ECDSA curve. .. py:data:: ed25519 Ed25519 EdDSA curve.