0

I am using Reed-Solomon error correction in a Java project. The library I use is JavaReedSolomon (https://github.com/Backblaze/JavaReedSolomon). There is an example of decoding using JavaReedSolomon:

byte[][] shards = new byte[NUM_SHARDS][SHARD_SIZE];
//shards is the array containing all the shards
ReedSolomon reedSolomon = ReedSolomon.create(NUM_DATA_SHARDS, NUM_PARITY_SHARDS);
reedSolomon.decodeMissing(shards, shardPresent, 0, shardSize);

The array shardPresent represents which shards are sure to be correct, for example, if you are sure that the 4th shard is correct, then shardPresent[3] equals true.

My question is, does Reed-Solomon decoding necessarily need to know which shards are correct or it is just how this library implement it?

Yi Zhao
  • 346
  • 2
  • 13

1 Answers1

1

The answer is no: the decoding procedure can recover from both unknown and known errors (erasures). A Reed-Solomon code (in fact, any MDS code) can correct twice as many erasures as errors. There are multiple ways to determine the error locator.

It is likely the API in the library corresponds to its use case, i.e. there is probably some side-channel information about which parts of the data are correct.

Michael Foukarakis
  • 39,737
  • 6
  • 87
  • 123