Verifies a Bech32 checksum.
(bech32m-verify-checksum hrp data) → y/n
Verifies that the last 6 bytes of
Function:
(defun bech32m-verify-checksum (hrp data) (declare (xargs :guard (and (stringp hrp) (unsigned-byte-listp 8 data)))) (let ((__function__ 'bech32m-verify-checksum)) (declare (ignorable __function__)) (and (hrp-valid-p hrp) (<= 6 (len data)) (warrant bvshr) (warrant bvand) (equal (bech32-polymod (append (bech32-hrp-expand hrp) data)) *bech32m-const*))))
Theorem:
(defthm booleanp-of-bech32m-verify-checksum (b* ((y/n (bech32m-verify-checksum hrp data))) (booleanp y/n)) :rule-classes :rewrite)