• 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
      • X86isa
      • Sha-2
      • Yul
      • Zcash
        • Jubjub
        • Verify-zcash-r1cs
        • Lift-zcash-r1cs
        • Pedersen-hash
          • Pedersen-segment-scalar
          • Pedersen-segment-point
          • Find-group-hash
          • Pedersen-point
          • Pedersen-enc
          • Group-hash
          • Coordinate-extract
          • Pedersen-segment-addend
          • Pedersen
            • Pedersen-pad
            • Pedersen-hash-injectivity-properties
            • Pedersen-hash-bound-properties
            • Pedersen-hash-image-properties
            • *pedersen-c*
          • Zcash-gadgets
          • Bit/byte/integer-conversions
          • Constants
          • Blake2-hash
          • Randomness-beacon
        • 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
    • Pedersen-hash

    Pedersen

    The function \mathsf{PedersenHash} [ZPS:5.4.1.7].

    Signature
    (pedersen d m) → hash
    Arguments
    d — Guard (byte-listp d).
    m — Guard (bit-listp m).
    Returns
    hash — Type (bit-listp hash).

    We return nil if, instead of a point, an error is returned. This is distinguished from a valid hash, which is not empty.

    Definitions and Theorems

    Function: pedersen

    (defun pedersen (d m)
      (declare (xargs :guard (and (byte-listp d) (bit-listp m))))
      (declare (xargs :guard (and (= (len d) 8) (consp m))))
      (let ((__function__ 'pedersen))
        (declare (ignorable __function__))
        (b* ((point (pedersen-point d m))
             ((unless (jubjub-pointp point)) nil))
          (coordinate-extract point))))

    Theorem: bit-listp-of-pedersen

    (defthm bit-listp-of-pedersen
      (b* ((hash (pedersen d m)))
        (bit-listp hash))
      :rule-classes :rewrite)