Apply the S-box substitution to the state vector.
(sub-words stat alpha partial-first-p prime full-p) → new-stat
This is the
The substitution is full or partial,
depending on the
Function:
(defun sub-words (stat alpha partial-first-p prime full-p) (declare (xargs :guard (and (integerp alpha) (booleanp partial-first-p) (primep prime) (booleanp full-p) (fe-listp stat prime)))) (let ((__function__ 'sub-words)) (declare (ignorable __function__)) (if full-p (sub-words-full stat alpha prime) (sub-words-partial stat alpha partial-first-p prime))))
Theorem:
(defthm fe-listp-of-sub-words (implies (and (primep prime) (fe-listp stat prime)) (b* ((new-stat (sub-words stat alpha partial-first-p prime full-p))) (fe-listp new-stat prime))) :rule-classes :rewrite)
Theorem:
(defthm len-of-sub-words (b* ((?new-stat (sub-words stat alpha partial-first-p prime full-p))) (equal (len new-stat) (len stat))))