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