Keccak-256 interface.
Keccak-256 is specified in the Keccak web site, in particular `The Keccak Reference' document, Version 3.0.
According to the aforementioned specification, the input of Keccak-256 is a sequence of any number of bits, or any number of bytes.
According to the aforementioned specification, the output of Keccak-256 is a sequence of exactly 256 bits, or 32 bytes.
See also:
Theorem:
(defthm bit-list-of-keccak-256-bits (bit-listp (keccak-256-bits bits)))
Theorem:
(defthm byte-list-of-keccak-256-bytes (byte-listp (keccak-256-bytes bytes)))
Theorem:
(defthm len-of-keccak-256-bits (equal (len (keccak-256-bits bits)) 256))
Theorem:
(defthm len-of-keccak-256-bytes (equal (len (keccak-256-bytes bytes)) 32))
Theorem:
(defthm keccak-256-bits-of-bit-list-fix-bits (equal (keccak-256-bits (acl2::bit-list-fix bits)) (keccak-256-bits bits)))
Theorem:
(defthm keccak-256-bits-bit-list-equiv-congruence-on-bits (implies (acl2::bit-list-equiv bits bits-equiv) (equal (keccak-256-bits bits) (keccak-256-bits bits-equiv))) :rule-classes :congruence)
Theorem:
(defthm keccak-256-bytes-of-byte-list-fix-bytes (equal (keccak-256-bytes (byte-list-fix bytes)) (keccak-256-bytes bytes)))
Theorem:
(defthm keccak-256-bytes-byte-list-equiv-congruence-on-bytes (implies (byte-list-equiv bytes bytes-equiv) (equal (keccak-256-bytes bytes) (keccak-256-bytes bytes-equiv))) :rule-classes :congruence)
Theorem:
(defthm true-listp-of-keccak-256-bits (true-listp (keccak-256-bits bits)) :rule-classes :type-prescription)
Theorem:
(defthm true-listp-of-keccak-256-bytes (true-listp (keccak-256-bytes bytes)) :rule-classes :type-prescription)
Theorem:
(defthm consp-of-keccak-256-bits (consp (keccak-256-bits bits)) :rule-classes :type-prescription)
Theorem:
(defthm consp-of-keccak-256-bytes (consp (keccak-256-bytes bytes)) :rule-classes :type-prescription)
Theorem:
(defthm byte-list32p-of-keccak-256-bytes (byte-list32p (keccak-256-bytes bytes)))