Is there any syntax following the tag that could be included in the scan to reduce the chances of false matches?
________________________________ From: [email protected] <[email protected]> on behalf of Pádraig Brady <[email protected]> Sent: Tuesday, October 7, 2025 8:48 AM To: Collin Funk <[email protected]> Cc: [email protected] <[email protected]> Subject: Re: cksum: allow --algorithm={sha2,sha3} --check to work on base64 On 05/10/2025 21:19, Collin Funk wrote: > Pádraig Brady <[email protected]> writes: >> p.s. I notice another edge case with checking untagged base64 format. >> Theoretically a base64 checksum could start with SHA256 etc. >> which would currently cause cksum to treat it as misformatted line. > > I wonder how long it will take someone to run into that situation. According to this python script, 1 in every 64,527 files I think: tags = ["BSD", "SYSV", "CRC", "CRC32B", "MD5", "SHA1", "SHA224", "SHA256", "SHA384", "SHA512", "SHA2", "SHA3", "BLAKE2b", "SM3"] clash = 0.0 for tag in tags: clash += 1/(64**len(tag)) print(int(1/clash))
