• 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
            • Definterface-hmac
            • Definterface-encrypt-block
            • Definterface-hash
            • Definterface-encrypt-init
            • Definterface-pbkdf2
            • Aes-256-cbc-pkcs7-interface
            • Aes-192-cbc-pkcs7-interface
            • Aes-128-cbc-pkcs7-interface
            • Aes-256-interface
            • Aes-192-interface
            • Aes-128-interface
            • Pbkdf2-hmac-sha-512-interface
            • Keccak-256-interface
            • Sha-256-interface
            • Keccak-512-interface
            • Ripemd-160-interface
            • Sha-512-interface
            • Pbkdf2-hmac-sha-256-interface
            • Hmac-sha-512-interface
              • Hmac-sha-256-interface
              • Secp256k1-interface
              • Secp256k1-ecdsa-interface
            • Sha-2
            • Keccak
            • Kdf
            • Mimc
            • Padding
            • Hmac
            • Elliptic-curves
            • 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
    • Interfaces

    Hmac-sha-512-interface

    HMAC-SHA-512 interface.

    HMAC stands for keyed-hash message authentication code. It is specified in IETF RFC 2104.

    We instantiate HMAC with the SHA-512 hash function, whose block size is 128 bytes and output size is 64 bytes according to FIPS 180-4.

    See also:

    • HMAC-SHA-512 executable specification
    • attaching HMAC-SHA-512 executable specification to this interface

    Definitions and Theorems

    Theorem: byte-list-of-hmac-sha-512

    (defthm byte-list-of-hmac-sha-512
      (byte-listp (hmac-sha-512 key text)))

    Theorem: len-of-hmac-sha-512

    (defthm len-of-hmac-sha-512
      (equal (len (hmac-sha-512 key text))
             64))

    Theorem: hmac-sha-512-of-byte-list-fix-key

    (defthm hmac-sha-512-of-byte-list-fix-key
      (equal (hmac-sha-512 (byte-list-fix key) text)
             (hmac-sha-512 key text)))

    Theorem: hmac-sha-512-byte-list-equiv-congruence-on-key

    (defthm hmac-sha-512-byte-list-equiv-congruence-on-key
      (implies (byte-list-equiv key key-equiv)
               (equal (hmac-sha-512 key text)
                      (hmac-sha-512 key-equiv text)))
      :rule-classes :congruence)

    Theorem: hmac-sha-512-of-byte-list-fix-text

    (defthm hmac-sha-512-of-byte-list-fix-text
      (equal (hmac-sha-512 key (byte-list-fix text))
             (hmac-sha-512 key text)))

    Theorem: hmac-sha-512-byte-list-equiv-congruence-on-text

    (defthm hmac-sha-512-byte-list-equiv-congruence-on-text
      (implies (byte-list-equiv text text-equiv)
               (equal (hmac-sha-512 key text)
                      (hmac-sha-512 key text-equiv)))
      :rule-classes :congruence)

    Theorem: true-listp-of-hmac-sha-512

    (defthm true-listp-of-hmac-sha-512
      (true-listp (hmac-sha-512 key text))
      :rule-classes :type-prescription)

    Theorem: consp-of-hmac-sha-512

    (defthm consp-of-hmac-sha-512
      (consp (hmac-sha-512 key text))
      :rule-classes :type-prescription)

    Theorem: byte-list64p-of-hmac-sha-512

    (defthm byte-list64p-of-hmac-sha-512
      (byte-list64p (hmac-sha-512 key text)))