The Reed-Sloane algorithm is an extension of the Berlekamp-Massey algorithm for use on sequences that take their values from the integers mod n.