SHA-256 interface.
SHA-256 is specified in the FIPS PUB 180-4 standard.
According to FIPS PUB 180-4,
the input of SHA-256 is a sequence of less than
According to FIPS PUB 180-4, the output of SHA-256 is a sequence of exactly 256 bits, or 32 bytes.
See also:
Theorem:
(defthm bit-list-of-sha-256-bits (bit-listp (sha-256-bits bits)))
Theorem:
(defthm byte-list-of-sha-256-bytes (byte-listp (sha-256-bytes bytes)))
Theorem:
(defthm len-of-sha-256-bits (equal (len (sha-256-bits bits)) 256))
Theorem:
(defthm len-of-sha-256-bytes (equal (len (sha-256-bytes bytes)) 32))
Theorem:
(defthm sha-256-bits-of-bit-list-fix-bits (equal (sha-256-bits (acl2::bit-list-fix bits)) (sha-256-bits bits)))
Theorem:
(defthm sha-256-bits-bit-list-equiv-congruence-on-bits (implies (acl2::bit-list-equiv bits bits-equiv) (equal (sha-256-bits bits) (sha-256-bits bits-equiv))) :rule-classes :congruence)
Theorem:
(defthm sha-256-bytes-of-byte-list-fix-bytes (equal (sha-256-bytes (byte-list-fix bytes)) (sha-256-bytes bytes)))
Theorem:
(defthm sha-256-bytes-byte-list-equiv-congruence-on-bytes (implies (byte-list-equiv bytes bytes-equiv) (equal (sha-256-bytes bytes) (sha-256-bytes bytes-equiv))) :rule-classes :congruence)
Theorem:
(defthm true-listp-of-sha-256-bits (true-listp (sha-256-bits bits)) :rule-classes :type-prescription)
Theorem:
(defthm true-listp-of-sha-256-bytes (true-listp (sha-256-bytes bytes)) :rule-classes :type-prescription)
Theorem:
(defthm consp-of-sha-256-bits (consp (sha-256-bits bits)) :rule-classes :type-prescription)
Theorem:
(defthm consp-of-sha-256-bytes (consp (sha-256-bytes bytes)) :rule-classes :type-prescription)
Theorem:
(defthm byte-list32p-of-sha-256-bytes (byte-list32p (sha-256-bytes bytes)))