the algorithm is very simple... it turns your nsec into a giant 256 bit number, and then divides it over and over again by 2048, and the values that come out refer to a word in the BIP-39 word list and that's it... there is one extra 8 bits at the front, and i made it so the first (biggest, on the left) bit is always 1 so no matter what the first one returns something other than 0 because 0 is "abandon" and i don't like that word