• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
          • R1cs
          • Interfaces
          • Sha-2
          • Keccak
          • Kdf
          • Mimc
          • Padding
          • Hmac
          • Elliptic-curves
            • Secp256k1-attachment
            • Twisted-edwards
              • Twisted-edwards-mul
              • Twisted-edwards-mul-fast
              • Twisted-edwards-add
              • Twisted-edwards-point-orderp
              • Twisted-edwards-add-associativity
              • Twisted-edwards-mul-distributivity-over-scalar-addition
              • Twisted-edwards-neg-inverse
              • Twisted-edwards-mul-fast-nonneg
              • Twisted-edwards-curve
                • Twisted-edwards-curve-fix
                • Twisted-edwards-curve-equiv
                • Twisted-edwards-curvep
                • Make-twisted-edwards-curve
                • Twisted-edwards-curve->p
                • Change-twisted-edwards-curve
                • Twisted-edwards-curve->d
                • Twisted-edwards-curve->a
              • Twisted-edwards-mul-nonneg
              • Birational-montgomery-twisted-edwards
              • Twisted-edwards-compress
              • Twisted-edwards-neg
              • Twisted-edwards-sub
              • Point-on-twisted-edwards-p
              • Twisted-edwards-curve-completep
              • Twisted-edwards-point-order-leastp
              • Twisted-edwards-only-points-with-x-0-or-y-1
              • Twisted-edwards-add-inverse-uniqueness
              • Twisted-edwards-distributivity-of-neg-over-add
              • Twisted-edwards-mul-associativity
              • Twisted-edwards-zero
              • Twisted-edwards-add-closure
              • Twisted-edwards-point-orderp-of-neg
              • Twisted-edwards-mul-of-mod-order
              • Twisted-edwards-zero-identity
              • Twisted-edwards-add-cancel-left
              • Twisted-edwards-mul-of-neg
              • Twisted-edwards-add-commutative
            • Montgomery
            • Short-weierstrass-curves
            • Birational-montgomery-twisted-edwards
            • Has-square-root?-satisfies-pfield-squarep
            • Secp256k1
            • Secp256k1-domain-parameters
            • Secp256k1-types
            • Pfield-squarep
            • Secp256k1-interface
            • Prime-field-extra-rules
            • Points
          • Attachments
          • Elliptic-curve-digital-signature-algorithm
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Twisted-edwards

Twisted-edwards-curve

Fixtype of elliptic curves over prime fields in twisted Edwards form.

This is a product type introduced by fty::defprod.

Fields
p — natp
a
d
Additional Requirements

The following invariant is enforced on the fields:

(and (dm::primep p) 
     (> p 2) 
     (fep a p) 
     (fep d p) 
     (not (equal a d)) 
     (not (equal a 0)) 
     (not (equal d 0))) 

This kind of curve is specified by the prime p and the coefficients a and d; see twisted-edwards. Thus, we formalize a curve as a triple of these numbers, via a fixtype product.

We require p to be a prime greater than 2; see twisted-edwards.

We require a and d to be in the prime field of p. We also require them to be distinct and non-zero.

To fix the three components to satisfy the requirements above, we pick 3 for p, 1 for a, and 2 for d.

Subtopics

Twisted-edwards-curve-fix
Fixing function for twisted-edwards-curve structures.
Twisted-edwards-curve-equiv
Basic equivalence relation for twisted-edwards-curve structures.
Twisted-edwards-curvep
Recognizer for twisted-edwards-curve structures.
Make-twisted-edwards-curve
Basic constructor macro for twisted-edwards-curve structures.
Twisted-edwards-curve->p
Get the p field from a twisted-edwards-curve.
Change-twisted-edwards-curve
Modifying constructor for twisted-edwards-curve structures.
Twisted-edwards-curve->d
Get the d field from a twisted-edwards-curve.
Twisted-edwards-curve->a
Get the a field from a twisted-edwards-curve.