Hawkynt

Longitudinal-Parity

Longitudinal parity check using XOR of all bytes for multi-byte error detection Fundamental error detection using XOR operations.

Properties

Property Value
Category Checksums
Sub-category Parity Check
Security status πŸŽ“ Educational Only
Complexity Beginner
Inventor Richard Hamming
Year 1950
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/checksum/parity.js

Security

Status: πŸŽ“ Educational Only

Known vulnerabilities

Issue Description Mitigation
Single Error Detection Only Can only detect odd numbers of bit errors, not even numbers β€”
No Correction Capability Can detect errors but cannot correct them β€”
Weak Against Burst Errors Poor performance against consecutive bit errors β€”

Documentation

References

Test vectors

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

Vector 1 β€” Empty data

Source: XOR of empty data is 0

Field Value
input (empty)
expected 00

Vector 2 β€” Bytes 0xAA, 0x55

Source: XOR result is 0xFF

Field Value
input aa55
expected ff

Vector 3 β€” Bytes 0x12, 0x34, 0x56

Source: XOR result is 0x70

Field Value
input 123456
expected 70

Vector 4 β€” Four bytes of 0xFF

Source: Even number of identical bytes XOR to 0

Field Value
input ffffffff
expected 00

← All algorithms