docs: def _chien_search(self, sigma):
          '''Recall the definition of sigma, it has s roots. To find them, this
          function evaluates sigma at all 2^(c_exp-1) (ie: 255 for GF(2^8)) non-zero points to find the roots
          The inverse of the roots are X_i, the error locations
  
          Returns a list X of error locations, and a corresponding list j of
          error positions (the discrete log of the corresponding X value) The
          lists are up to s elements large.
          
          This is essentially an inverse Fourrier transform.
  
          Important technical math note: This implementation is not actually
          Chien's search. Chien's search is a way to evaluate the polynomial
          such that each evaluation only takes constant time. This here simply
          does 255 evaluations straight up, which is much less efficient.
          Said differently, we simply do a bruteforce search by trial substitution to find the zeros of this polynomial, which identifies the error locations.
          '''
          # TODO: find a more efficient algorithm, this is the slowest part of the whole decoding process (~2.5 ms, while any other part is only ~400microsec). Could try the Pruned FFT from "Simple Algorithms for BCH Decoding", by Jonathan Hong and Martin Vetterli, IEEE Transactions on Communications, Vol.43, No.8, August 1995
          X = []
          j = []
          p = GF2int(self.generator)
          # Try for each possible location
          for l in _range(1, self.gf2_charac+1): # range 1:256 is important: if you use range 0:255, if the last byte of the ecc symbols is corrupted, it won't be correctable! You need to use the range 1,256 to include this last byte.
              #l = (i+self.fcr)
              # These evaluations could be more efficient, but oh well
              if sigma.evaluate( p**l ) == 0: # If it's 0, then bingo! It's an error location
                  # Compute the error location polynomial X (will be directly used to compute the errors magnitudes inside the Forney algorithm)
                  X.append( p**(-l) )
                  # Compute the coefficient position (not the error position, it's actually the reverse: we compute the degree of the term where the error is located. To get the error position, just compute n-1-j).
                  # This is different than the notes, I think the notes were in error
                  # Notes said j values were just l, when it's actually 255-l
                  j.append(self.gf2_charac - l)
  
          # Sanity check: the number of errors/errata positions found should be exactly the same as the length of the errata locator polynomial
          errs_nb = len(sigma) - 1 # compute the exact number of errors/errata that this error locator should find
          if len(j) != errs_nb:
              raise RSCodecError("Too many (or few) errors found by Chien Search for the errata locator polynomial!")
  
          return X, j