Constant-time MAC comparison
Your task
Implement a length-revealing-free equality routine used inside an auth check. Given two byte-value lists 'a' and 'b' (each element an int 0..255) representing a computed MAC and a provided MAC, return 1 if they are equal and 0 otherwise, but the comparison must accumulate differences over the FULL length rather than short-circuiting. If the lengths differ, return 0, but still fold every byte of the longer input into the accumulator (compare against 0 for missing positions) before returning, so the work done does not branch on the first mismatch. Return the int 1 or 0.
Examples
ct_equal(a: list[int], b: list[int]) -> intExample 1
Input
ct_equal([1, 2, 3], [1, 2, 3])Output
1