CRC-16-SPI-Fujitsu
Polynomial checksums for detecting accidental errors, from CRC-3 to CRC-82
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About CRC-16-SPI-Fujitsu
CRC-16-SPI-Fujitsu is one of 113 Cyclic redundancy checks (CRC) variants in the NextSSL registry, a checksum / non-cryptographic hash. It produces a 2-byte (16-bit) output. Its registry entry cites CRC catalogue (reveng) CRC-16/SPI-FUJITSU. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
A cyclic redundancy check is an error-detecting code computed as the remainder of polynomial division over GF(2). CRCs are used everywhere data is stored or transmitted, from Ethernet frames and ZIP files to storage controllers and radio links. They are not cryptographic and provide no protection against deliberate modification.
A CRC treats the message as a polynomial with binary coefficients, multiplies it by x^n and divides by a fixed generator polynomial of degree n; the n-bit remainder is the check value. In practice it is computed with shift registers or lookup tables. A full CRC definition also fixes the initial register value, whether input and output bits are reflected, and a final XOR value, which is why many incompatible CRCs share the same width and polynomial.
NextSSL includes over a hundred CRC definitions matching the reveng CRC catalogue, from 3-bit to 82-bit widths: CRC-8 variants for automotive and smart-card buses, CRC-16 variants such as XMODEM, MODBUS, KERMIT and USB, CRC-32 as used by Ethernet, ZIP and PNG (ISO-HDLC), CRC-32C (Castagnoli, used by iSCSI, ext4 and SCTP), and CRC-64 variants including ECMA-182, XZ and NVMe. The identifiers follow the catalogue names.
A well-chosen CRC detects all burst errors shorter than its width and all errors with fewer bits than its Hamming distance for messages up to a certain length, which is why the choice of polynomial is tuned per application. CRC-32C has hardware instructions on modern x86 and ARM processors. Longer CRCs catch more errors.
History
1961–1961Cyclic redundancy checks published by W. Wesley Peterson
How it works
- Initialise an n-bit register to a defined value
- Shift message bits in, XORing the polynomial when the top bit is set
- Optionally reflect bits and apply a final XOR
- Output the n-bit remainder
Security notes
CRCs are not cryptographic. They are linear, so an attacker can modify data and adjust the CRC to match, or choose data with any desired CRC, with trivial effort. Use a MAC or authenticated encryption when integrity against an attacker is needed.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 2 | Output |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
value = root.call("checksum", "crc-16-spi-fujitsu", None, b"123456789")[0]
nextssl_root_checksum("crc-16-spi-fujitsu", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_checksum_in(reg::all(), Policy::Any, "crc-16-spi-fujitsu", &Params::new())?;
let value = alg.checksum(b"123456789")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other Cyclic redundancy checks (CRC) variants
112More checksums and non-cryptographic hashes
All 130Frequently asked questions
What is CRC-16-SPI-Fujitsu?
CRC-16-SPI-Fujitsu is a checksum in the Cyclic redundancy checks (CRC) family. A cyclic redundancy check is an error-detecting code computed as the remainder of polynomial division over GF(2).
What are the CRC-16-SPI-Fujitsu sizes?
In NextSSL, CRC-16-SPI-Fujitsu uses: output 2 bytes.
Who designed CRC-16-SPI-Fujitsu and when?
CRC-16-SPI-Fujitsu belongs to the Cyclic redundancy checks (CRC) family, first published in 1961 by W. Wesley Peterson. Its origin: reveng CRC catalogue; ISO 3309; ITU-T V.42; ECMA-182; RFC 3720.
Which standards define CRC-16-SPI-Fujitsu?
CRC-16-SPI-Fujitsu is referenced by CRC catalogue (reveng) CRC-16/SPI-FUJITSU.
Is CRC-16-SPI-Fujitsu safe to use?
CRC-16-SPI-Fujitsu is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).
What other Cyclic redundancy checks (CRC) variants are there?
NextSSL also registers crc-10-atm, crc-10-cdma2000, crc-10-gsm, crc-11-flexray, crc-11-umts, crc-12-cdma2000 and more in the Cyclic redundancy checks (CRC) family.
Related families
Mark Adler's fast 32-bit checksum used in the zlib format
Fletcher checksumsPosition-dependent sum checksums from 1982, cheaper than CRCs in software
Internet checksumThe 16-bit ones-complement checksum of IPv4, TCP, UDP and ICMP headers
HMAC_DRBGNIST SP 800-90A deterministic random bit generator built on HMAC
HMACThe standard way to build a MAC from a cryptographic hash (RFC 2104, FIPS 198-1)