algopy_testing.op.crypto
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”ECDSA | Create a collection of name/value pairs. |
|---|---|
VrfVerify | Create a collection of name/value pairs. |
EC | Available values for the EC enum. |
EllipticCurve | |
MiMCConfigurations | Enum where members are also (and must be) strings |
Functions
Section titled “Functions”sha256(→ algopy_testing.primitives.Bytes) | |
|---|---|
sha3_256(→ algopy_testing.primitives.Bytes) | |
sumhash512(→ algopy_testing.primitives.Bytes) | |
keccak256(→ algopy_testing.primitives.Bytes) | |
sha512_256(→ algopy_testing.primitives.Bytes) | |
ed25519verify_bare(→ bool) | |
ed25519verify(→ bool) | |
ecdsa_verify(→ bool) | |
ecdsa_pk_recover(…) | |
ecdsa_pk_decompress(…) | |
falcon_verify(→ bool) | |
vrf_verify(→ tuple[algopy_testing.primitives.Bytes, bool]) | |
mimc(→ algopy_testing.primitives.Bytes) |
class ECDSA
Section titled “class ECDSA”Bases: enum.Enum
Create a collection of name/value pairs.
Example enumeration:
class Color(Enum): RED = 1 BLUE = 2 GREEN = 3Access them by:
- attribute access:
Color.RED<Color.RED: 1>
- value lookup:
Color(1)<Color.RED: 1>
- name lookup:
Color['RED']<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
len(Color)3list(Color)[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
Secp256k1 = 0
Section titled “Secp256k1 = 0”Secp256r1 = 1
Section titled “Secp256r1 = 1”class VrfVerify
Section titled “class VrfVerify”Bases: enum.Enum
Create a collection of name/value pairs.
Example enumeration:
class Color(Enum): RED = 1 BLUE = 2 GREEN = 3Access them by:
- attribute access:
Color.RED<Color.RED: 1>
- value lookup:
Color(1)<Color.RED: 1>
- name lookup:
Color['RED']<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
len(Color)3list(Color)[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
VrfAlgorand = 0
Section titled “VrfAlgorand = 0”sha256(a: Bytes | bytes) → Bytes
Section titled “sha256(a: Bytes | bytes) → Bytes”sha3_256(a: Bytes | bytes) → Bytes
Section titled “sha3_256(a: Bytes | bytes) → Bytes”sumhash512(_a: Bytes | bytes) → Bytes
Section titled “sumhash512(_a: Bytes | bytes) → Bytes”keccak256(a: Bytes | bytes) → Bytes
Section titled “keccak256(a: Bytes | bytes) → Bytes”sha512_256(a: Bytes | bytes) → Bytes
Section titled “sha512_256(a: Bytes | bytes) → Bytes”ed25519verify_bare(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool
Section titled “ed25519verify_bare(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool”ed25519verify(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool
Section titled “ed25519verify(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool”ecdsa_verify(v: ECDSA, a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes, d: Bytes | bytes, e: Bytes | bytes) → bool
Section titled “ecdsa_verify(v: ECDSA, a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes, d: Bytes | bytes, e: Bytes | bytes) → bool”ecdsa_pk_recover(v: ECDSA, a: Bytes | bytes, b: UInt64 | int, c: Bytes | bytes, d: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]
Section titled “ecdsa_pk_recover(v: ECDSA, a: Bytes | bytes, b: UInt64 | int, c: Bytes | bytes, d: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]”ecdsa_pk_decompress(v: ECDSA, a: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]
Section titled “ecdsa_pk_decompress(v: ECDSA, a: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]”falcon_verify(_a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → bool
Section titled “falcon_verify(_a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → bool”vrf_verify(_s: VrfVerify, _a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, bool]
Section titled “vrf_verify(_s: VrfVerify, _a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, bool]”class EC
Section titled “class EC”Bases: enum.StrEnum
Available values for the EC enum.
BN254g1 = ‘BN254g1’
Section titled “BN254g1 = ‘BN254g1’”BN254g2 = ‘BN254g2’
Section titled “BN254g2 = ‘BN254g2’”BLS12_381g1 = ‘BLS12_381g1’
Section titled “BLS12_381g1 = ‘BLS12_381g1’”BLS12_381g2 = ‘BLS12_381g2’
Section titled “BLS12_381g2 = ‘BLS12_381g2’”class EllipticCurve
Section titled “class EllipticCurve”map_to
Section titled “map_to”pairing_check
Section titled “pairing_check”scalar_mul
Section titled “scalar_mul”scalar_mul_multi
Section titled “scalar_mul_multi”subgroup_check
Section titled “subgroup_check”class MiMCConfigurations
Section titled “class MiMCConfigurations”Bases: enum.StrEnum
Enum where members are also (and must be) strings