BSD checksum with circular right rotation providing order-dependent error detection Classic Unix sum(1) algorithm for basic file integrity verification.
| Property | Value |
|---|---|
| Category | Checksums |
| Sub-category | Legacy Checksum |
| Security status | Not classified |
| Complexity | Beginner |
| Inventor | Bell Labs |
| Year | 1971 |
| Origin | πΊπΈ United States |
| Source | algorithms/checksum/unix-sum.js |
Status: not classified β treat as unverified.
| Issue | Description | Mitigation |
|---|---|---|
| Cryptographically Insecure | Trivially broken - use for compatibility only, never for security | β |
| Weak Error Detection | Poor error detection compared to CRC - many collisions possible | β |
| Predictable Output | Output can be easily predicted and manipulated by attackers | β |
4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Empty string
Source: BSD sum(1) standard test
| Field | Value |
|---|---|
input |
(empty) |
expected |
0000 |
Vector 2 β Single byte βaβ
Source: Educational test vector
| Field | Value |
|---|---|
input |
61 |
expected |
0061 |
Vector 3 β String βabcβ
Source: Educational test vector
| Field | Value |
|---|---|
input |
616263 |
expected |
40ac |
Vector 4 β Standard test phrase
Source: Educational test vector
| Field | Value |
|---|---|
input |
54686520717569636b2062726f776e20 666f78206a756d7073206f7665722074 6865206c617a7920646f67 |
expected |
c56e |