HMAC-SHA-256 interface.
We instantiate HMAC with the SHA-256 hash, whose block size is 64 bytes according to FIPS 180-4.
Theorem:
(defthm byte-list-of-hmac-sha-256 (byte-listp (hmac-sha-256 key text)))
Theorem:
(defthm len-of-hmac-sha-256 (equal (len (hmac-sha-256 key text)) 32))
Theorem:
(defthm hmac-sha-256-of-byte-list-fix-key (equal (hmac-sha-256 (byte-list-fix key) text) (hmac-sha-256 key text)))
Theorem:
(defthm hmac-sha-256-byte-list-equiv-congruence-on-key (implies (byte-list-equiv key key-equiv) (equal (hmac-sha-256 key text) (hmac-sha-256 key-equiv text))) :rule-classes :congruence)
Theorem:
(defthm hmac-sha-256-of-byte-list-fix-text (equal (hmac-sha-256 key (byte-list-fix text)) (hmac-sha-256 key text)))
Theorem:
(defthm hmac-sha-256-byte-list-equiv-congruence-on-text (implies (byte-list-equiv text text-equiv) (equal (hmac-sha-256 key text) (hmac-sha-256 key text-equiv))) :rule-classes :congruence)
Theorem:
(defthm true-listp-of-hmac-sha-256 (true-listp (hmac-sha-256 key text)) :rule-classes :type-prescription)
Theorem:
(defthm consp-of-hmac-sha-256 (consp (hmac-sha-256 key text)) :rule-classes :type-prescription)
Theorem:
(defthm byte-list32p-of-hmac-sha-256 (byte-list32p (hmac-sha-256 key text)))