Hawkynt

Quadratic Residue Code

Cyclic codes constructed from quadratic residues in finite fields. For prime p ≑ Β±1 (mod 8), constructs (p, (p+1)/2) code with excellent distance properties. Binary Golay code is a famous QR code. Automorphism group includes field automorphisms. Used in deep space and satellite communications.

Properties

Property Value
Category Error Correction
Sub-category Cyclic Code
Security status πŸŽ“ Educational Only
Complexity Advanced
Inventor Andrew Gleason, Solomon Golomb
Year 1958
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/ecc/quadratic-residue-code.js

Security

Status: πŸŽ“ Educational Only

Known vulnerabilities

Issue Description Mitigation
Limited Code Lengths Only defined for specific prime lengths p ≑ Β±1 (mod 8), limiting flexibility. β€”
Complex Decoding Optimal decoding requires algebraic techniques more complex than simple codes. β€”

Documentation

References

Test vectors

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

Vector 1 β€” QR (7,4) all zeros

Field Value
input 00000000
expected 00000000000000

Vector 2 β€” QR (7,4) pattern 1000

Field Value
input 01000000
expected 01000000010100

Vector 3 β€” QR (7,4) pattern 0100

Field Value
input 00010000
expected 00010000000101

Vector 4 β€” QR (7,4) all ones

Field Value
input 01010101
expected 01010101010101

← All algorithms