Permutation.
(permute stat param) → new-stat
This is a wrapper of all-rounds that provides a more compact interface, consisting of a state vector and the parameters, whose components are passed to all-rounds.
Function:
(defun permute (stat param) (declare (xargs :guard (and (paramp param) (fe-listp stat (param->prime param))))) (declare (xargs :guard (equal (len stat) (param->size param)))) (let ((__function__ 'permute)) (declare (ignorable __function__)) (all-rounds stat (param->constants param) (param->alpha param) (param->partial-first-p param) (param->mds param) (param->full-rounds-half param) (param->partial-rounds param) (param->prime param))))
Theorem:
(defthm return-type-of-permute (implies (fe-listp stat (param->prime param)) (b* ((new-stat (permute stat param))) (fe-listp new-stat (param->prime param)))) :rule-classes :rewrite)
Theorem:
(defthm len-of-permute (implies (and (equal (len stat) (param->size param)) (paramp param)) (b* ((?new-stat (permute stat param))) (equal (len new-stat) (len stat)))))