The function
(blake2s-256 pers input) → output
This is the instantiation
[ZPS] puts no restrictions on the size of the data (i.e. input), but we follow the guard in the BLAKE2 library. The output must be 32 bytes, i.e. 256 bits.
We pass the empty list of bytes as both key and salt.
Function:
(defun blake2s-256 (pers input) (declare (xargs :guard (and (byte-listp pers) (byte-listp input)))) (declare (xargs :guard (and (= (len pers) 8) (< (len input) (- blake::*blake2s-max-data-byte-length* 64))))) (let ((__function__ 'blake2s-256)) (declare (ignorable __function__)) (blake::blake2s-extended input nil nil pers 32)))
Theorem:
(defthm byte-listp-of-blake2s-256 (b* ((output (blake2s-256 pers input))) (byte-listp output)) :rule-classes :rewrite)
Theorem:
(defthm len-of-blake2s-256 (b* ((?output (blake2s-256 pers input))) (equal (len output) 32)))