Checking the secret tag on a byte array #
untagSecret (in Pipeline) checks and removes the tag of the rebuilt bytes, given as a
List GF256: for qs3, the AMD tag over GF(2¹²⁸) and the token of every share. The list, its
16-byte blocks and the result each cost tens of megabytes for a 1 MiB secret.
untagBytes does the same on a ByteArray. The AMD tag is computed block by block, reading 16
bytes at a time from the array, and the secret is returned as a slice of the array.
The old formats are read from the array too: the AMD tag alone for qs2, and the CRC-32 of
qs1. untagBytes_eq proves it returns exactly what untagSecret returns on the list of the
bytes.