From 35241caebedca796196b0fbe570604ab8b40ffad Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Jun 2026 14:27:30 +0000 Subject: [PATCH] =?UTF-8?q?fix(spec):=20correct=20CRC-64=20polynomial=20la?= =?UTF-8?q?bel=20in=20=C2=A78.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The constant 0x42F0E1EBA9EA3693 is the normal (non-reflected) polynomial of CRC-64/XZ, not the reflected one. Replace it with the actual reflected polynomial 0xC96C5795D7870F42 to match the convention already used for the two CRC-32 rows, and add a note mentioning the normal form for readers who need it (e.g. libraries that accept the normal poly). No on-disk format change; the check value 0x995DC9BBDF1939FA is unchanged. Fixes #2 https://claude.ai/code/session_01WvDqtNsESPu2XM4RuFWJ38 --- specs/PCF-spec-v1.0.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specs/PCF-spec-v1.0.txt b/specs/PCF-spec-v1.0.txt index de71a1e..fe25048 100644 --- a/specs/PCF-spec-v1.0.txt +++ b/specs/PCF-spec-v1.0.txt @@ -415,11 +415,12 @@ Table of Contents refin=true, refout=true, xorout=0xFFFFFFFF. CRC-64 (ID 3): CRC-64/XZ. - width=64, reflected poly 0x42F0E1EBA9EA3693, + width=64, reflected poly 0xC96C5795D7870F42, init=0xFFFFFFFFFFFFFFFF, refin=true, refout=true, xorout=0xFFFFFFFFFFFFFFFF. (This is the CRC-64 used by xz/liblzma and by .NET - System.IO.Hashing.Crc64. Check value for the ASCII + System.IO.Hashing.Crc64. Normal poly is + 0x42F0E1EBA9EA3693. Check value for the ASCII input "123456789" is 0x995DC9BBDF1939FA.) SHA-256 (ID 16) is the DEFAULT and RECOMMENDED algorithm. Algorithms with