Hawkynt

Golay

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).

Properties

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

Parameters

Parameter Supported values
Block sizes 12 bytes (96 bits)

Capabilities

Flag Value
supportsErrorDetection Yes
supportsErrorCorrection Yes

Security

Status: πŸ›‘οΈ Secure

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

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

← All algorithms