Hawkynt

Ternary Golay Code

Perfect [11,6,5] ternary linear code over GF(3) with 729 codewords. Can correct 2 ternary symbol errors. Minimum distance 5. One of only five perfect codes. Discovered by Marcel Golay in 1949. Used in quantum computing and magic state distillation. Quadratic residue code construction.

Properties

Property Value
Category Error Correction
Sub-category Perfect Code
Security status πŸŽ“ Educational Only
Complexity Advanced
Inventor Marcel J. E. Golay
Year 1949
Origin πŸ‡¨πŸ‡­ Switzerland
Source algorithms/ecc/ternary-golay.js

Security

Status: πŸŽ“ Educational Only

Known vulnerabilities

Issue Description Mitigation
Fixed Parameters Only defined for [11,6,5] parameters, cannot be extended or shortened. β€”
Ternary Alphabet Requires ternary symbols (0,1,2) instead of binary, complicating hardware implementation. β€”

Documentation

References

Test vectors

4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” Ternary Golay all zeros

Field Value
input 000000000000
expected 0000000000000000000000

Vector 2 β€” Ternary Golay pattern [1,0,0,0,0,0]

Field Value
input 010000000000
expected 0100000000000101020201

Vector 3 β€” Ternary Golay pattern [0,1,0,0,0,0]

Field Value
input 000100000000
expected 0001000000000102010102

Vector 4 β€” Ternary Golay pattern [2,1,0,0,0,0]

Field Value
input 020100000000
expected 0201000000000001020201

← All algorithms