6 ms·
Show HN: Improving on Daniel Bernstein's Libsecded
- bugfix-66 4y agoThis is an attempt to improve on djb's fantastic libsecded: https://pqsrc.cr.yp.to/libsecded-20220828/README.html https://pqsrc.cr.yp.to/libsecded-20220828/README.html We're using a novel Hamming code that doesn't require any interleaving, so the original data can be left unmodified. The new Hamming code is simple and easy to prove correct. Here is the checksum generator: https://bugfix-66.com/6956d0447254a7adce9531669bb2d24e3d2e981887d00767fb00ad6612a80486 https://bugfix-66.com/6956d0447254a7adce9531669bb2d24e3d2e98... Here is the corresponding SECDED scrubber, that uses the checksum to fix single bit flips and detect double bit flips: https://bugfix-66.com/f0a66d0ba87bd566172e5a880cdebd57c50bb80c160d57854f2f43fbb6a30f2e https://bugfix-66.com/f0a66d0ba87bd566172e5a880cdebd57c50bb8... Future work is to vectorize the index XOR loop (a tiny piece of code).