Binary Golay code [23,12,7] is a perfect error-correcting code capable of correcting up to 3 bit errors or detecting up to 7 errors. Achieves the Hamming bound with 12 data bits encoded into 23-bit codewords. Used in NASA Voyager deep space missions and military communications (MIL-STD-188).
| Property | Value |
|---|---|
| Category | Error Correction |
| Sub-category | Perfect Codes |
| Security status | π‘οΈ Secure |
| Complexity | Intermediate |
| Inventor | Marcel J. E. Golay |
| Year | 1949 |
| Origin | πΊπΈ United States |
| Source | algorithms/ecc/golay.js |
| Parameter | Supported values |
|---|---|
| Block sizes | 12 bytes (96 bits) |
| Flag | Value |
|---|---|
supportsErrorDetection |
Yes |
supportsErrorCorrection |
Yes |
Status: π‘οΈ Secure
No vulnerabilities are recorded for this implementation.
4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 β All zeros test
| Field | Value |
|---|---|
input |
0000 |
expected |
000000 |
Vector 2 β Single bit pattern
Source: Systematic encoding with generator polynomial 0xC75
| Field | Value |
|---|---|
input |
0001 |
expected |
000c75 |
Vector 3 β All data bits set
| Field | Value |
|---|---|
input |
0fff |
expected |
7fffff |
Vector 4 β Alternating bit pattern
Source: Systematic encoding test
| Field | Value |
|---|---|
input |
0aaa |
expected |
555179 |