• 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
          • Jubjub
            • Jubjub-abst
            • Jubjub-r-pointp
            • Jubjub-pointp
            • Jubjub-d
              • Jubjub-montgomery
              • Maybe-jubjub-pointp
              • Jubjub-point->u
              • Jubjub-q
              • Jubjub-point->v
              • Point-on-jubjub-p
              • Jubjub-rstar-pointp
              • Jubjub-add
              • Jubjub-r-properties
              • Jubjub-point-abscissa-is-not-1
              • Jubjub-mul
              • Jubjub-curve
              • Jubjub-a
              • Jubjub-neg
              • Jubjub-r
              • Jubjub-point-satisfies-curve-equation
              • Jubjub-h
              • Jubjub-mul-of-2
              • *jubjub-l*
            • Verify-zcash-r1cs
            • Lift-zcash-r1cs
            • Pedersen-hash
            • Zcash-gadgets
            • Bit/byte/integer-conversions
            • Constants
            • Blake2-hash
            • Randomness-beacon
          • 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
    • Jubjub

    Jubjub-d

    The Jubjub coefficient d_\mathbb{J} [ZPS:5.4.9.3].

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

    We show that this coefficient 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: jubjub-d

    (defun jubjub-d nil
      (declare (xargs :guard t))
      (let ((__function__ 'jubjub-d))
        (declare (ignorable __function__))
        (neg (div 10240 10241 (jubjub-q))
             (jubjub-q))))

    Theorem: return-type-of-jubjub-d

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

    Theorem: jubjub-d-not-zero

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

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

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

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

    (defthm not-pfield-squarep-of-jubjub-d
      (not (ecurve::pfield-squarep (jubjub-d)
                                   (jubjub-q))))