• 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-order

    Order (i.e. number of points) of the BabyJubjub curve.

    Signature
    (baby-jubjub-order) → order
    Returns
    order — Type (natp order).

    BabyJubjub, as the twisted Edwards curve with a = 168700 and d = 168696, is birationally equivalent to the Montgomery curve with

    \begin{array}{l} A = 2(a+d)/(a-d) = 2*(168700 + 168696)/(168700 - 168696) = 168698 \\ B = 4/(a-d) = 1 \end{array}

    So the Montgomery curve is

    y^2 = x^3 + 168698x^2 + x

    Now, represent that in Weierstrass form:

    y^2 + a_1 x y + a_3 y = x^3 + a_2 x^2 + a_4 x + a_6

    We have:

    [a_1, a_2, a_3, a_4, a_6] = [0, 168698, 0, 1, 0]

    In Sage, which can be used at https://sagecell.sagemath.org, type this Sage code:

    P = 21888242871839275222246405745257275088548364400416034343698204186575808495617
    E = EllipticCurve(GF(P),[0,168698,0,1,0])
    E.cardinality()

    Clicking the `Evaluate' button will yield BabyJubjub order.

    Definitions and Theorems

    Function: baby-jubjub-order

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

    Theorem: natp-of-baby-jubjub-order

    (defthm natp-of-baby-jubjub-order
      (b* ((order (baby-jubjub-order)))
        (natp order))
      :rule-classes :rewrite)