• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
          • R1cs
          • Interfaces
          • Sha-2
          • Keccak
          • Kdf
          • Mimc
          • Padding
          • Hmac
          • Elliptic-curves
            • Secp256k1-attachment
            • Twisted-edwards
            • Montgomery
            • Short-weierstrass-curves
            • Birational-montgomery-twisted-edwards
            • Has-square-root?-satisfies-pfield-squarep
            • Secp256k1
            • Secp256k1-domain-parameters
            • Secp256k1-types
              • Secp256k1-priv-key
                • Secp256k1-priv-key-p
                  • Secp256k1-priv-key-fix
                • Secp256k1-pub-key
                • Secp256k1-field
                • Secp256k1-point
                • Secp256k1-point-to-bytes
                • Secp256k1-point-infinityp
                • Secp256k1-point-generator
              • Pfield-squarep
              • Secp256k1-interface
              • Prime-field-extra-rules
              • Points
            • Attachments
            • Elliptic-curve-digital-signature-algorithm
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Secp256k1-priv-key

    Secp256k1-priv-key-p

    Recognizer for secp256k1-priv-key.

    Signature
    (secp256k1-priv-key-p x) → yes/no
    Returns
    yes/no — Type (booleanp yes/no).

    Definitions and Theorems

    Function: secp256k1-priv-key-p

    (defun secp256k1-priv-key-p (x)
      (declare (xargs :guard t))
      (integer-range-p 1 (secp256k1-group-prime)
                       x))

    Theorem: booleanp-of-secp256k1-priv-key-p

    (defthm booleanp-of-secp256k1-priv-key-p
      (b* ((yes/no (secp256k1-priv-key-p x)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: posp-and-below-order-when-secp256k1-priv-key-p

    (defthm posp-and-below-order-when-secp256k1-priv-key-p
     (implies
      (secp256k1-priv-key-p privkey)
      (and
       (posp privkey)
       (<
        privkey
        115792089237316195423570985008687907852837564279074904382605163141518161494337)))
     :rule-classes :tau-system)