• 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
        • 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
          • 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
    • Pedersen-hash

    Group-hash

    The function \mathsf{GroupHash_\mathsf{URS}^{\mathbb{J}^{(r)*}}} [ZPS:5.4.9.5].

    Signature
    (group-hash d m) → point?
    Arguments
    d — Guard (byte-listp d).
    m — Guard (byte-listp m).
    Returns
    point? — Type (maybe-jubjub-pointp point?).

    [ZPS] allows the argument M to have any length, but there is a (large) limit (see guard of blake2s-256). The limit here must be diminished by 64, which is the length of \mathsf{URS}.

    Definitions and Theorems

    Function: group-hash

    (defun group-hash (d m)
     (declare (xargs :guard (and (byte-listp d) (byte-listp m))))
     (declare (xargs :guard (and (= (len d) 8)
                                 (<= (len m)
                                     (- blake::*max-input-bytes* 64)))))
     (let ((__function__ 'group-hash))
       (declare (ignorable __function__))
       (b* ((hash (blake2s-256 d (append *urs* m)))
            (point (jubjub-abst (leos2bsp hash)))
            ((unless (jubjub-pointp point)) nil)
            (qoint (jubjub-mul (jubjub-h) point))
            ((when (equal qoint (twisted-edwards-zero)))
             nil))
         qoint)))

    Theorem: maybe-jubjub-pointp-of-group-hash

    (defthm maybe-jubjub-pointp-of-group-hash
      (b* ((point? (group-hash d m)))
        (maybe-jubjub-pointp point?))
      :rule-classes :rewrite)