6 ms·
This seems to work by "compressing the input digest to a fixed number of bytes, then mapping those bytes to one of 256 words." So since there are only 256 words
by lubutu 15y ago
This seems to work by "compressing the input digest to a fixed number of bytes, then mapping those bytes to one of 256 words." So since there are only 256 words you end up with a lot less information than you put in, unless you have some 16 words.
It would be better if we had a much larger dictionary, since we could map more bytes to a single word -- with a list of 65,536 words we would need only 8 words per 16 byte hash, which I think is a lot more manageable.
- zacharyvoase 15y agoI wouldn't mind using a list of 65,536 words, but I came up with the existing list by hand, and it took me a good half-hour. I guess it would be possible to generate a wordlist, or even combine phonemes to make fake but valid-sounding words (similar to a password generator), but for a proof-of-concept I feel it has value. Note that I never intended this to have all the uniqueness of the original digest. It's merely supposed to be 'good enough' for UI purposes.
- wisty 15y agoYou could use nltk's wordnet to generate a bunch of words of certain kinds. As a proof of concept, UNIX should have a list of words, probably in /usr/share/dict/words (OSX) or maybe /usr/dict/words. /usr/share/dict/words is likely to be pretty big, over 200k words, but it's still human readable. You could prune it by removing proper words (i.e. anything capitalized).
- muxxa 15y agoAlso might be a good idea to take the Metaphone of the words, and only select words from the dictionary that have unique metaphones.
- lubutu 15y agoI wonder how many bits of information could be packed into a single (nonsensical) syllable, without being too prone to misinterpretation. https://en.wikipedia.org/wiki/English_phonology#Phonotactics https://en.wikipedia.org/wiki/English_phonology#Phonotactics I think this is getting a little beyond my linguistics skills... Edit: I suppose which syllables are easily corruptable depends on the medium: written hashes would require a different set of graphemes than spoken hashes would phonemes, for example, while memorised hashes would likely be different again. I wonder if there's been any research or anything into this.