0

Case: We want to Encode an 8 Character code to 10 Character code with adding 2 Forward Error Correcting Reed-Solomon Characters(so suffix 2 Error Correcting Chars). Example Code I'm using this Library C# FEC Reed-Solomon Library.

I'm having a problem with Choosing the correct Primitive Polynomial for the Galois Field for 36 Characters.

Can someone help me? The Method were the primitive polynomial is inputted

I have it working for a 32 char code and 64 char code. I now use the primitive polynomial:

  • 55 (decimal value of x^5 + x^4 + x^2 + x + 1) for 32 chars.

  • 67 (decimal value of x^6 + x + 1) for 64 chars

Requirements:

  • The 8 char code needs to be the same in the code as the first 8 chars of the encoded code.
  • We want a 36 character alphabet (A-Z, 0-9), 37 is also an option.
rcgldr
  • 27,407
  • 3
  • 36
  • 61
RennieM
  • 1
  • 3
  • 1
    The size of a finite field has to be a power of a prime. Since 36 = 2²×3² you can't get a Galois Field for that size. 37 is prime and should work better. 2 is a primitive root of GF(37) but I don't know how to explain that to your library. Could it be that the library only supports power of two fields? – MvG Mar 21 '23 at 12:51
  • @MvG Yeah indeed that's why i said 37 is also an option. I could be that the library only supports 2^x but it isn't written anywhere... It doesn't seem logical to me. – RennieM Mar 21 '23 at 13:45
  • Looking at [implementation](https://github.com/Sonic-The-Hedgehog-LNK1123/ReedSolomon/blob/cd9dad631ebfff23d57e3853b6357f25ae28cf95/ReedSolomon/GenericGF.cs#L137) I notice the amount of bit massaging which `multiplyNoLUT` performs, the `x &= size - 1` in particular. That doesn't sound like it could cater for non-power-of-two scenarios. – MvG Mar 21 '23 at 16:41
  • As implied by the other comments, use 67 (x^6 + x +1) for 6 bit field GF(2^6). You could create a custom library for GF(37), using 56 bit integers to represent 10 base 37 digits (which would use 53 of the 56 bits), but that would be awkward to deal with (most likely packing and unpacking 56 bit integers <=> 10 character strings). – rcgldr Mar 22 '23 at 15:02

0 Answers0