Adler-32 checksum used in zlib, gzip and other compression formats Uses two 16-bit running sums with modulo 65521 for fast error detection.
| Property | Value |
|---|---|
| Category | Checksums |
| Sub-category | Simple Checksum |
| Security status | π Educational Only |
| Complexity | Beginner |
| Inventor | Mark Adler |
| Year | 1995 |
| Origin | πΊπΈ United States |
| Source | algorithms/checksum/adler.js |
Status: π Educational Only
| Issue | Description | Mitigation |
|---|---|---|
| Not Cryptographically Secure | Use cryptographic hash functions (SHA-256, SHA-3) for security purposes | β |
| Weak for Short Messages | Adler checksums can have poor distribution for very short inputs | β |
| Zero Byte Weakness | Sequences of zero bytes can produce predictable patterns | β |
5 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β Empty string
Source: RFC 1950 - empty string gives 1
| Field | Value |
|---|---|
input |
(empty) |
expected |
00000001 |
Vector 2 β Single byte βaβ
Source: RFC 1950 test vector
| Field | Value |
|---|---|
input |
61 |
expected |
00620062 |
Vector 3 β String βabcβ
Source: RFC 1950 test vector
| Field | Value |
|---|---|
input |
616263 |
expected |
024d0127 |
Vector 4 β String βmessage digestβ
Source: Educational test vector
| Field | Value |
|---|---|
input |
6d65737361676520646967657374 |
expected |
29750586 |
Vector 5 β Alphabet string
Source: Educational test vector
| Field | Value |
|---|---|
input |
6162636465666768696a6b6c6d6e6f707172737475767778797a |
expected |
90860b20 |