• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • 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
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Baby-jubjub

    Baby-jubjub-prime

    The prime that defines the field over which BabyJubjub is defined.

    This is primes::bn-254-group-prime, but we introduce BabyJubjub-specific nullary function and constant for it here.

    Decimal value: 21888242871839275222246405745257275088548364400416034343698204186575808495617

    Hex value: #x30644E72E131A029B85045B68181585D2833E84879B9709143E1F593F0000001

    This prime is 254 bits long.

    The fact that this prime mod 4 is 1 is relevant for EdDSA.

    The fact that this prime mod 8 is 1 means there is no simple formula for modular square root. However, there are reasonably efficient algorithms that require a starting non-residue. For a fixed prime we can often get a starting non-residue from the table in https://en.wikipedia.org/wiki/Quadratic_residue. It is the case that 5 is a quadratic non-residue for this prime.