• 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
          • Mmp-trees
          • Semaphore
            • Verify-semaphore-r1cs
            • Mimc
            • Semaphore-specification
              • Prime-field-abbreviations
              • Pedersen-hash
              • Pedersen-hash-base-points
              • Baby-jubjub
                • Baby-jubjub-order
                • Baby-jubjub-prime
                • Baby-jubjub-order/8
                • Baby-jubjub-d
                  • Baby-jubjub-pointp
                  • Baby-jubjub-mul
                  • Baby-jubjub-curve
                  • Baby-jubjub-a
                  • Point-on-baby-jubjub-p
                  • Baby-jubjub-add
              • Semaphore-proofs
            • Database
            • Cryptography
            • Rlp
            • Transactions
            • Hex-prefix
            • Basics
            • Addresses
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Baby-jubjub

    Baby-jubjub-d

    The coefficient d of the twisted Edwards equation of BabyJubjub.

    Signature
    (baby-jubjub-d) → d
    Returns
    d — Type (fep d (baby-jubjub-prime)).

    This is not zero, is different from a, and is not a square. We show that it is not a square using Euler's criterion: we use the fast modular exponentiation operation from the arithmetic-3 library to calculate the modular exponentiation of the coefficient, which must be different from 1 in order for the criterion to apply.

    Definitions and Theorems

    Function: baby-jubjub-d

    (defun baby-jubjub-d nil
      (declare (xargs :guard t))
      (let ((acl2::__function__ 'baby-jubjub-d))
        (declare (ignorable acl2::__function__))
        168696))

    Theorem: return-type-of-baby-jubjub-d

    (defthm return-type-of-baby-jubjub-d
      (b* ((d (baby-jubjub-d)))
        (fep d (baby-jubjub-prime)))
      :rule-classes :rewrite)

    Theorem: baby-jubjub-d-not-zero

    (defthm baby-jubjub-d-not-zero
      (not (equal (baby-jubjub-d) 0)))

    Theorem: baby-jubjub-d-not-equal-to-a

    (defthm baby-jubjub-d-not-equal-to-a
      (not (equal (baby-jubjub-d)
                  (baby-jubjub-a))))

    Theorem: not-pfield-squarep-of-baby-jubjub-d

    (defthm not-pfield-squarep-of-baby-jubjub-d
      (not (pfield-squarep (baby-jubjub-d)
                           (baby-jubjub-prime))))