New port numbers
[electrum-nvc.git] / lib / mnemonic.py
1 #!/usr/bin/env python
2 #
3 # Electrum - lightweight Bitcoin client
4 # Copyright (C) 2011 thomasv@gitorious
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19
20
21 # list of words from http://en.wiktionary.org/wiki/Wiktionary:Frequency_lists/Contemporary_poetry
22
23 words = [
24 "like",
25 "just",
26 "love",
27 "know",
28 "never",
29 "want",
30 "time",
31 "out",
32 "there",
33 "make",
34 "look",
35 "eye",
36 "down",
37 "only",
38 "think",
39 "heart",
40 "back",
41 "then",
42 "into",
43 "about",
44 "more",
45 "away",
46 "still",
47 "them",
48 "take",
49 "thing",
50 "even",
51 "through",
52 "long",
53 "always",
54 "world",
55 "too",
56 "friend",
57 "tell",
58 "try",
59 "hand",
60 "thought",
61 "over",
62 "here",
63 "other",
64 "need",
65 "smile",
66 "again",
67 "much",
68 "cry",
69 "been",
70 "night",
71 "ever",
72 "little",
73 "said",
74 "end",
75 "some",
76 "those",
77 "around",
78 "mind",
79 "people",
80 "girl",
81 "leave",
82 "dream",
83 "left",
84 "turn",
85 "myself",
86 "give",
87 "nothing",
88 "really",
89 "off",
90 "before",
91 "something",
92 "find",
93 "walk",
94 "wish",
95 "good",
96 "once",
97 "place",
98 "ask",
99 "stop",
100 "keep",
101 "watch",
102 "seem",
103 "everything",
104 "wait",
105 "got",
106 "yet",
107 "made",
108 "remember",
109 "start",
110 "alone",
111 "run",
112 "hope",
113 "maybe",
114 "believe",
115 "body",
116 "hate",
117 "after",
118 "close",
119 "talk",
120 "stand",
121 "own",
122 "each",
123 "hurt",
124 "help",
125 "home",
126 "god",
127 "soul",
128 "new",
129 "many",
130 "two",
131 "inside",
132 "should",
133 "true",
134 "first",
135 "fear",
136 "mean",
137 "better",
138 "play",
139 "another",
140 "gone",
141 "change",
142 "use",
143 "wonder",
144 "someone",
145 "hair",
146 "cold",
147 "open",
148 "best",
149 "any",
150 "behind",
151 "happen",
152 "water",
153 "dark",
154 "laugh",
155 "stay",
156 "forever",
157 "name",
158 "work",
159 "show",
160 "sky",
161 "break",
162 "came",
163 "deep",
164 "door",
165 "put",
166 "black",
167 "together",
168 "upon",
169 "happy",
170 "such",
171 "great",
172 "white",
173 "matter",
174 "fill",
175 "past",
176 "please",
177 "burn",
178 "cause",
179 "enough",
180 "touch",
181 "moment",
182 "soon",
183 "voice",
184 "scream",
185 "anything",
186 "stare",
187 "sound",
188 "red",
189 "everyone",
190 "hide",
191 "kiss",
192 "truth",
193 "death",
194 "beautiful",
195 "mine",
196 "blood",
197 "broken",
198 "very",
199 "pass",
200 "next",
201 "forget",
202 "tree",
203 "wrong",
204 "air",
205 "mother",
206 "understand",
207 "lip",
208 "hit",
209 "wall",
210 "memory",
211 "sleep",
212 "free",
213 "high",
214 "realize",
215 "school",
216 "might",
217 "skin",
218 "sweet",
219 "perfect",
220 "blue",
221 "kill",
222 "breath",
223 "dance",
224 "against",
225 "fly",
226 "between",
227 "grow",
228 "strong",
229 "under",
230 "listen",
231 "bring",
232 "sometimes",
233 "speak",
234 "pull",
235 "person",
236 "become",
237 "family",
238 "begin",
239 "ground",
240 "real",
241 "small",
242 "father",
243 "sure",
244 "feet",
245 "rest",
246 "young",
247 "finally",
248 "land",
249 "across",
250 "today",
251 "different",
252 "guy",
253 "line",
254 "fire",
255 "reason",
256 "reach",
257 "second",
258 "slowly",
259 "write",
260 "eat",
261 "smell",
262 "mouth",
263 "step",
264 "learn",
265 "three",
266 "floor",
267 "promise",
268 "breathe",
269 "darkness",
270 "push",
271 "earth",
272 "guess",
273 "save",
274 "song",
275 "above",
276 "along",
277 "both",
278 "color",
279 "house",
280 "almost",
281 "sorry",
282 "anymore",
283 "brother",
284 "okay",
285 "dear",
286 "game",
287 "fade",
288 "already",
289 "apart",
290 "warm",
291 "beauty",
292 "heard",
293 "notice",
294 "question",
295 "shine",
296 "began",
297 "piece",
298 "whole",
299 "shadow",
300 "secret",
301 "street",
302 "within",
303 "finger",
304 "point",
305 "morning",
306 "whisper",
307 "child",
308 "moon",
309 "green",
310 "story",
311 "glass",
312 "kid",
313 "silence",
314 "since",
315 "soft",
316 "yourself",
317 "empty",
318 "shall",
319 "angel",
320 "answer",
321 "baby",
322 "bright",
323 "dad",
324 "path",
325 "worry",
326 "hour",
327 "drop",
328 "follow",
329 "power",
330 "war",
331 "half",
332 "flow",
333 "heaven",
334 "act",
335 "chance",
336 "fact",
337 "least",
338 "tired",
339 "children",
340 "near",
341 "quite",
342 "afraid",
343 "rise",
344 "sea",
345 "taste",
346 "window",
347 "cover",
348 "nice",
349 "trust",
350 "lot",
351 "sad",
352 "cool",
353 "force",
354 "peace",
355 "return",
356 "blind",
357 "easy",
358 "ready",
359 "roll",
360 "rose",
361 "drive",
362 "held",
363 "music",
364 "beneath",
365 "hang",
366 "mom",
367 "paint",
368 "emotion",
369 "quiet",
370 "clear",
371 "cloud",
372 "few",
373 "pretty",
374 "bird",
375 "outside",
376 "paper",
377 "picture",
378 "front",
379 "rock",
380 "simple",
381 "anyone",
382 "meant",
383 "reality",
384 "road",
385 "sense",
386 "waste",
387 "bit",
388 "leaf",
389 "thank",
390 "happiness",
391 "meet",
392 "men",
393 "smoke",
394 "truly",
395 "decide",
396 "self",
397 "age",
398 "book",
399 "form",
400 "alive",
401 "carry",
402 "escape",
403 "damn",
404 "instead",
405 "able",
406 "ice",
407 "minute",
408 "throw",
409 "catch",
410 "leg",
411 "ring",
412 "course",
413 "goodbye",
414 "lead",
415 "poem",
416 "sick",
417 "corner",
418 "desire",
419 "known",
420 "problem",
421 "remind",
422 "shoulder",
423 "suppose",
424 "toward",
425 "wave",
426 "drink",
427 "jump",
428 "woman",
429 "pretend",
430 "sister",
431 "week",
432 "human",
433 "joy",
434 "crack",
435 "grey",
436 "pray",
437 "surprise",
438 "dry",
439 "knee",
440 "less",
441 "search",
442 "bleed",
443 "caught",
444 "clean",
445 "embrace",
446 "future",
447 "king",
448 "son",
449 "sorrow",
450 "chest",
451 "hug",
452 "remain",
453 "sat",
454 "worth",
455 "blow",
456 "daddy",
457 "final",
458 "parent",
459 "tight",
460 "also",
461 "create",
462 "lonely",
463 "safe",
464 "cross",
465 "dress",
466 "evil",
467 "silent",
468 "bone",
469 "fate",
470 "perhaps",
471 "anger",
472 "class",
473 "scar",
474 "snow",
475 "tiny",
476 "tonight",
477 "continue",
478 "control",
479 "dog",
480 "edge",
481 "mirror",
482 "month",
483 "suddenly",
484 "comfort",
485 "given",
486 "loud",
487 "quickly",
488 "gaze",
489 "plan",
490 "rush",
491 "stone",
492 "town",
493 "battle",
494 "ignore",
495 "spirit",
496 "stood",
497 "stupid",
498 "yours",
499 "brown",
500 "build",
501 "dust",
502 "hey",
503 "kept",
504 "pay",
505 "phone",
506 "twist",
507 "although",
508 "ball",
509 "beyond",
510 "hidden",
511 "nose",
512 "taken",
513 "fail",
514 "float",
515 "pure",
516 "somehow",
517 "wash",
518 "wrap",
519 "angry",
520 "cheek",
521 "creature",
522 "forgotten",
523 "heat",
524 "rip",
525 "single",
526 "space",
527 "special",
528 "weak",
529 "whatever",
530 "yell",
531 "anyway",
532 "blame",
533 "job",
534 "choose",
535 "country",
536 "curse",
537 "drift",
538 "echo",
539 "figure",
540 "grew",
541 "laughter",
542 "neck",
543 "suffer",
544 "worse",
545 "yeah",
546 "disappear",
547 "foot",
548 "forward",
549 "knife",
550 "mess",
551 "somewhere",
552 "stomach",
553 "storm",
554 "beg",
555 "idea",
556 "lift",
557 "offer",
558 "breeze",
559 "field",
560 "five",
561 "often",
562 "simply",
563 "stuck",
564 "win",
565 "allow",
566 "confuse",
567 "enjoy",
568 "except",
569 "flower",
570 "seek",
571 "strength",
572 "calm",
573 "grin",
574 "gun",
575 "heavy",
576 "hill",
577 "large",
578 "ocean",
579 "shoe",
580 "sigh",
581 "straight",
582 "summer",
583 "tongue",
584 "accept",
585 "crazy",
586 "everyday",
587 "exist",
588 "grass",
589 "mistake",
590 "sent",
591 "shut",
592 "surround",
593 "table",
594 "ache",
595 "brain",
596 "destroy",
597 "heal",
598 "nature",
599 "shout",
600 "sign",
601 "stain",
602 "choice",
603 "doubt",
604 "glance",
605 "glow",
606 "mountain",
607 "queen",
608 "stranger",
609 "throat",
610 "tomorrow",
611 "city",
612 "either",
613 "fish",
614 "flame",
615 "rather",
616 "shape",
617 "spin",
618 "spread",
619 "ash",
620 "distance",
621 "finish",
622 "image",
623 "imagine",
624 "important",
625 "nobody",
626 "shatter",
627 "warmth",
628 "became",
629 "feed",
630 "flesh",
631 "funny",
632 "lust",
633 "shirt",
634 "trouble",
635 "yellow",
636 "attention",
637 "bare",
638 "bite",
639 "money",
640 "protect",
641 "amaze",
642 "appear",
643 "born",
644 "choke",
645 "completely",
646 "daughter",
647 "fresh",
648 "friendship",
649 "gentle",
650 "probably",
651 "six",
652 "deserve",
653 "expect",
654 "grab",
655 "middle",
656 "nightmare",
657 "river",
658 "thousand",
659 "weight",
660 "worst",
661 "wound",
662 "barely",
663 "bottle",
664 "cream",
665 "regret",
666 "relationship",
667 "stick",
668 "test",
669 "crush",
670 "endless",
671 "fault",
672 "itself",
673 "rule",
674 "spill",
675 "art",
676 "circle",
677 "join",
678 "kick",
679 "mask",
680 "master",
681 "passion",
682 "quick",
683 "raise",
684 "smooth",
685 "unless",
686 "wander",
687 "actually",
688 "broke",
689 "chair",
690 "deal",
691 "favorite",
692 "gift",
693 "note",
694 "number",
695 "sweat",
696 "box",
697 "chill",
698 "clothes",
699 "lady",
700 "mark",
701 "park",
702 "poor",
703 "sadness",
704 "tie",
705 "animal",
706 "belong",
707 "brush",
708 "consume",
709 "dawn",
710 "forest",
711 "innocent",
712 "pen",
713 "pride",
714 "stream",
715 "thick",
716 "clay",
717 "complete",
718 "count",
719 "draw",
720 "faith",
721 "press",
722 "silver",
723 "struggle",
724 "surface",
725 "taught",
726 "teach",
727 "wet",
728 "bless",
729 "chase",
730 "climb",
731 "enter",
732 "letter",
733 "melt",
734 "metal",
735 "movie",
736 "stretch",
737 "swing",
738 "vision",
739 "wife",
740 "beside",
741 "crash",
742 "forgot",
743 "guide",
744 "haunt",
745 "joke",
746 "knock",
747 "plant",
748 "pour",
749 "prove",
750 "reveal",
751 "steal",
752 "stuff",
753 "trip",
754 "wood",
755 "wrist",
756 "bother",
757 "bottom",
758 "crawl",
759 "crowd",
760 "fix",
761 "forgive",
762 "frown",
763 "grace",
764 "loose",
765 "lucky",
766 "party",
767 "release",
768 "surely",
769 "survive",
770 "teacher",
771 "gently",
772 "grip",
773 "speed",
774 "suicide",
775 "travel",
776 "treat",
777 "vein",
778 "written",
779 "cage",
780 "chain",
781 "conversation",
782 "date",
783 "enemy",
784 "however",
785 "interest",
786 "million",
787 "page",
788 "pink",
789 "proud",
790 "sway",
791 "themselves",
792 "winter",
793 "church",
794 "cruel",
795 "cup",
796 "demon",
797 "experience",
798 "freedom",
799 "pair",
800 "pop",
801 "purpose",
802 "respect",
803 "shoot",
804 "softly",
805 "state",
806 "strange",
807 "bar",
808 "birth",
809 "curl",
810 "dirt",
811 "excuse",
812 "lord",
813 "lovely",
814 "monster",
815 "order",
816 "pack",
817 "pants",
818 "pool",
819 "scene",
820 "seven",
821 "shame",
822 "slide",
823 "ugly",
824 "among",
825 "blade",
826 "blonde",
827 "closet",
828 "creek",
829 "deny",
830 "drug",
831 "eternity",
832 "gain",
833 "grade",
834 "handle",
835 "key",
836 "linger",
837 "pale",
838 "prepare",
839 "swallow",
840 "swim",
841 "tremble",
842 "wheel",
843 "won",
844 "cast",
845 "cigarette",
846 "claim",
847 "college",
848 "direction",
849 "dirty",
850 "gather",
851 "ghost",
852 "hundred",
853 "loss",
854 "lung",
855 "orange",
856 "present",
857 "swear",
858 "swirl",
859 "twice",
860 "wild",
861 "bitter",
862 "blanket",
863 "doctor",
864 "everywhere",
865 "flash",
866 "grown",
867 "knowledge",
868 "numb",
869 "pressure",
870 "radio",
871 "repeat",
872 "ruin",
873 "spend",
874 "unknown",
875 "buy",
876 "clock",
877 "devil",
878 "early",
879 "false",
880 "fantasy",
881 "pound",
882 "precious",
883 "refuse",
884 "sheet",
885 "teeth",
886 "welcome",
887 "add",
888 "ahead",
889 "block",
890 "bury",
891 "caress",
892 "content",
893 "depth",
894 "despite",
895 "distant",
896 "marry",
897 "purple",
898 "threw",
899 "whenever",
900 "bomb",
901 "dull",
902 "easily",
903 "grasp",
904 "hospital",
905 "innocence",
906 "normal",
907 "receive",
908 "reply",
909 "rhyme",
910 "shade",
911 "someday",
912 "sword",
913 "toe",
914 "visit",
915 "asleep",
916 "bought",
917 "center",
918 "consider",
919 "flat",
920 "hero",
921 "history",
922 "ink",
923 "insane",
924 "muscle",
925 "mystery",
926 "pocket",
927 "reflection",
928 "shove",
929 "silently",
930 "smart",
931 "soldier",
932 "spot",
933 "stress",
934 "train",
935 "type",
936 "view",
937 "whether",
938 "bus",
939 "energy",
940 "explain",
941 "holy",
942 "hunger",
943 "inch",
944 "magic",
945 "mix",
946 "noise",
947 "nowhere",
948 "prayer",
949 "presence",
950 "shock",
951 "snap",
952 "spider",
953 "study",
954 "thunder",
955 "trail",
956 "admit",
957 "agree",
958 "bag",
959 "bang",
960 "bound",
961 "butterfly",
962 "cute",
963 "exactly",
964 "explode",
965 "familiar",
966 "fold",
967 "further",
968 "pierce",
969 "reflect",
970 "scent",
971 "selfish",
972 "sharp",
973 "sink",
974 "spring",
975 "stumble",
976 "universe",
977 "weep",
978 "women",
979 "wonderful",
980 "action",
981 "ancient",
982 "attempt",
983 "avoid",
984 "birthday",
985 "branch",
986 "chocolate",
987 "core",
988 "depress",
989 "drunk",
990 "especially",
991 "focus",
992 "fruit",
993 "honest",
994 "match",
995 "palm",
996 "perfectly",
997 "pillow",
998 "pity",
999 "poison",
1000 "roar",
1001 "shift",
1002 "slightly",
1003 "thump",
1004 "truck",
1005 "tune",
1006 "twenty",
1007 "unable",
1008 "wipe",
1009 "wrote",
1010 "coat",
1011 "constant",
1012 "dinner",
1013 "drove",
1014 "egg",
1015 "eternal",
1016 "flight",
1017 "flood",
1018 "frame",
1019 "freak",
1020 "gasp",
1021 "glad",
1022 "hollow",
1023 "motion",
1024 "peer",
1025 "plastic",
1026 "root",
1027 "screen",
1028 "season",
1029 "sting",
1030 "strike",
1031 "team",
1032 "unlike",
1033 "victim",
1034 "volume",
1035 "warn",
1036 "weird",
1037 "attack",
1038 "await",
1039 "awake",
1040 "built",
1041 "charm",
1042 "crave",
1043 "despair",
1044 "fought",
1045 "grant",
1046 "grief",
1047 "horse",
1048 "limit",
1049 "message",
1050 "ripple",
1051 "sanity",
1052 "scatter",
1053 "serve",
1054 "split",
1055 "string",
1056 "trick",
1057 "annoy",
1058 "blur",
1059 "boat",
1060 "brave",
1061 "clearly",
1062 "cling",
1063 "connect",
1064 "fist",
1065 "forth",
1066 "imagination",
1067 "iron",
1068 "jock",
1069 "judge",
1070 "lesson",
1071 "milk",
1072 "misery",
1073 "nail",
1074 "naked",
1075 "ourselves",
1076 "poet",
1077 "possible",
1078 "princess",
1079 "sail",
1080 "size",
1081 "snake",
1082 "society",
1083 "stroke",
1084 "torture",
1085 "toss",
1086 "trace",
1087 "wise",
1088 "bloom",
1089 "bullet",
1090 "cell",
1091 "check",
1092 "cost",
1093 "darling",
1094 "during",
1095 "footstep",
1096 "fragile",
1097 "hallway",
1098 "hardly",
1099 "horizon",
1100 "invisible",
1101 "journey",
1102 "midnight",
1103 "mud",
1104 "nod",
1105 "pause",
1106 "relax",
1107 "shiver",
1108 "sudden",
1109 "value",
1110 "youth",
1111 "abuse",
1112 "admire",
1113 "blink",
1114 "breast",
1115 "bruise",
1116 "constantly",
1117 "couple",
1118 "creep",
1119 "curve",
1120 "difference",
1121 "dumb",
1122 "emptiness",
1123 "gotta",
1124 "honor",
1125 "plain",
1126 "planet",
1127 "recall",
1128 "rub",
1129 "ship",
1130 "slam",
1131 "soar",
1132 "somebody",
1133 "tightly",
1134 "weather",
1135 "adore",
1136 "approach",
1137 "bond",
1138 "bread",
1139 "burst",
1140 "candle",
1141 "coffee",
1142 "cousin",
1143 "crime",
1144 "desert",
1145 "flutter",
1146 "frozen",
1147 "grand",
1148 "heel",
1149 "hello",
1150 "language",
1151 "level",
1152 "movement",
1153 "pleasure",
1154 "powerful",
1155 "random",
1156 "rhythm",
1157 "settle",
1158 "silly",
1159 "slap",
1160 "sort",
1161 "spoken",
1162 "steel",
1163 "threaten",
1164 "tumble",
1165 "upset",
1166 "aside",
1167 "awkward",
1168 "bee",
1169 "blank",
1170 "board",
1171 "button",
1172 "card",
1173 "carefully",
1174 "complain",
1175 "crap",
1176 "deeply",
1177 "discover",
1178 "drag",
1179 "dread",
1180 "effort",
1181 "entire",
1182 "fairy",
1183 "giant",
1184 "gotten",
1185 "greet",
1186 "illusion",
1187 "jeans",
1188 "leap",
1189 "liquid",
1190 "march",
1191 "mend",
1192 "nervous",
1193 "nine",
1194 "replace",
1195 "rope",
1196 "spine",
1197 "stole",
1198 "terror",
1199 "accident",
1200 "apple",
1201 "balance",
1202 "boom",
1203 "childhood",
1204 "collect",
1205 "demand",
1206 "depression",
1207 "eventually",
1208 "faint",
1209 "glare",
1210 "goal",
1211 "group",
1212 "honey",
1213 "kitchen",
1214 "laid",
1215 "limb",
1216 "machine",
1217 "mere",
1218 "mold",
1219 "murder",
1220 "nerve",
1221 "painful",
1222 "poetry",
1223 "prince",
1224 "rabbit",
1225 "shelter",
1226 "shore",
1227 "shower",
1228 "soothe",
1229 "stair",
1230 "steady",
1231 "sunlight",
1232 "tangle",
1233 "tease",
1234 "treasure",
1235 "uncle",
1236 "begun",
1237 "bliss",
1238 "canvas",
1239 "cheer",
1240 "claw",
1241 "clutch",
1242 "commit",
1243 "crimson",
1244 "crystal",
1245 "delight",
1246 "doll",
1247 "existence",
1248 "express",
1249 "fog",
1250 "football",
1251 "gay",
1252 "goose",
1253 "guard",
1254 "hatred",
1255 "illuminate",
1256 "mass",
1257 "math",
1258 "mourn",
1259 "rich",
1260 "rough",
1261 "skip",
1262 "stir",
1263 "student",
1264 "style",
1265 "support",
1266 "thorn",
1267 "tough",
1268 "yard",
1269 "yearn",
1270 "yesterday",
1271 "advice",
1272 "appreciate",
1273 "autumn",
1274 "bank",
1275 "beam",
1276 "bowl",
1277 "capture",
1278 "carve",
1279 "collapse",
1280 "confusion",
1281 "creation",
1282 "dove",
1283 "feather",
1284 "girlfriend",
1285 "glory",
1286 "government",
1287 "harsh",
1288 "hop",
1289 "inner",
1290 "loser",
1291 "moonlight",
1292 "neighbor",
1293 "neither",
1294 "peach",
1295 "pig",
1296 "praise",
1297 "screw",
1298 "shield",
1299 "shimmer",
1300 "sneak",
1301 "stab",
1302 "subject",
1303 "throughout",
1304 "thrown",
1305 "tower",
1306 "twirl",
1307 "wow",
1308 "army",
1309 "arrive",
1310 "bathroom",
1311 "bump",
1312 "cease",
1313 "cookie",
1314 "couch",
1315 "courage",
1316 "dim",
1317 "guilt",
1318 "howl",
1319 "hum",
1320 "husband",
1321 "insult",
1322 "led",
1323 "lunch",
1324 "mock",
1325 "mostly",
1326 "natural",
1327 "nearly",
1328 "needle",
1329 "nerd",
1330 "peaceful",
1331 "perfection",
1332 "pile",
1333 "price",
1334 "remove",
1335 "roam",
1336 "sanctuary",
1337 "serious",
1338 "shiny",
1339 "shook",
1340 "sob",
1341 "stolen",
1342 "tap",
1343 "vain",
1344 "void",
1345 "warrior",
1346 "wrinkle",
1347 "affection",
1348 "apologize",
1349 "blossom",
1350 "bounce",
1351 "bridge",
1352 "cheap",
1353 "crumble",
1354 "decision",
1355 "descend",
1356 "desperately",
1357 "dig",
1358 "dot",
1359 "flip",
1360 "frighten",
1361 "heartbeat",
1362 "huge",
1363 "lazy",
1364 "lick",
1365 "odd",
1366 "opinion",
1367 "process",
1368 "puzzle",
1369 "quietly",
1370 "retreat",
1371 "score",
1372 "sentence",
1373 "separate",
1374 "situation",
1375 "skill",
1376 "soak",
1377 "square",
1378 "stray",
1379 "taint",
1380 "task",
1381 "tide",
1382 "underneath",
1383 "veil",
1384 "whistle",
1385 "anywhere",
1386 "bedroom",
1387 "bid",
1388 "bloody",
1389 "burden",
1390 "careful",
1391 "compare",
1392 "concern",
1393 "curtain",
1394 "decay",
1395 "defeat",
1396 "describe",
1397 "double",
1398 "dreamer",
1399 "driver",
1400 "dwell",
1401 "evening",
1402 "flare",
1403 "flicker",
1404 "grandma",
1405 "guitar",
1406 "harm",
1407 "horrible",
1408 "hungry",
1409 "indeed",
1410 "lace",
1411 "melody",
1412 "monkey",
1413 "nation",
1414 "object",
1415 "obviously",
1416 "rainbow",
1417 "salt",
1418 "scratch",
1419 "shown",
1420 "shy",
1421 "stage",
1422 "stun",
1423 "third",
1424 "tickle",
1425 "useless",
1426 "weakness",
1427 "worship",
1428 "worthless",
1429 "afternoon",
1430 "beard",
1431 "boyfriend",
1432 "bubble",
1433 "busy",
1434 "certain",
1435 "chin",
1436 "concrete",
1437 "desk",
1438 "diamond",
1439 "doom",
1440 "drawn",
1441 "due",
1442 "felicity",
1443 "freeze",
1444 "frost",
1445 "garden",
1446 "glide",
1447 "harmony",
1448 "hopefully",
1449 "hunt",
1450 "jealous",
1451 "lightning",
1452 "mama",
1453 "mercy",
1454 "peel",
1455 "physical",
1456 "position",
1457 "pulse",
1458 "punch",
1459 "quit",
1460 "rant",
1461 "respond",
1462 "salty",
1463 "sane",
1464 "satisfy",
1465 "savior",
1466 "sheep",
1467 "slept",
1468 "social",
1469 "sport",
1470 "tuck",
1471 "utter",
1472 "valley",
1473 "wolf",
1474 "aim",
1475 "alas",
1476 "alter",
1477 "arrow",
1478 "awaken",
1479 "beaten",
1480 "belief",
1481 "brand",
1482 "ceiling",
1483 "cheese",
1484 "clue",
1485 "confidence",
1486 "connection",
1487 "daily",
1488 "disguise",
1489 "eager",
1490 "erase",
1491 "essence",
1492 "everytime",
1493 "expression",
1494 "fan",
1495 "flag",
1496 "flirt",
1497 "foul",
1498 "fur",
1499 "giggle",
1500 "glorious",
1501 "ignorance",
1502 "law",
1503 "lifeless",
1504 "measure",
1505 "mighty",
1506 "muse",
1507 "north",
1508 "opposite",
1509 "paradise",
1510 "patience",
1511 "patient",
1512 "pencil",
1513 "petal",
1514 "plate",
1515 "ponder",
1516 "possibly",
1517 "practice",
1518 "slice",
1519 "spell",
1520 "stock",
1521 "strife",
1522 "strip",
1523 "suffocate",
1524 "suit",
1525 "tender",
1526 "tool",
1527 "trade",
1528 "velvet",
1529 "verse",
1530 "waist",
1531 "witch",
1532 "aunt",
1533 "bench",
1534 "bold",
1535 "cap",
1536 "certainly",
1537 "click",
1538 "companion",
1539 "creator",
1540 "dart",
1541 "delicate",
1542 "determine",
1543 "dish",
1544 "dragon",
1545 "drama",
1546 "drum",
1547 "dude",
1548 "everybody",
1549 "feast",
1550 "forehead",
1551 "former",
1552 "fright",
1553 "fully",
1554 "gas",
1555 "hook",
1556 "hurl",
1557 "invite",
1558 "juice",
1559 "manage",
1560 "moral",
1561 "possess",
1562 "raw",
1563 "rebel",
1564 "royal",
1565 "scale",
1566 "scary",
1567 "several",
1568 "slight",
1569 "stubborn",
1570 "swell",
1571 "talent",
1572 "tea",
1573 "terrible",
1574 "thread",
1575 "torment",
1576 "trickle",
1577 "usually",
1578 "vast",
1579 "violence",
1580 "weave",
1581 "acid",
1582 "agony",
1583 "ashamed",
1584 "awe",
1585 "belly",
1586 "blend",
1587 "blush",
1588 "character",
1589 "cheat",
1590 "common",
1591 "company",
1592 "coward",
1593 "creak",
1594 "danger",
1595 "deadly",
1596 "defense",
1597 "define",
1598 "depend",
1599 "desperate",
1600 "destination",
1601 "dew",
1602 "duck",
1603 "dusty",
1604 "embarrass",
1605 "engine",
1606 "example",
1607 "explore",
1608 "foe",
1609 "freely",
1610 "frustrate",
1611 "generation",
1612 "glove",
1613 "guilty",
1614 "health",
1615 "hurry",
1616 "idiot",
1617 "impossible",
1618 "inhale",
1619 "jaw",
1620 "kingdom",
1621 "mention",
1622 "mist",
1623 "moan",
1624 "mumble",
1625 "mutter",
1626 "observe",
1627 "ode",
1628 "pathetic",
1629 "pattern",
1630 "pie",
1631 "prefer",
1632 "puff",
1633 "rape",
1634 "rare",
1635 "revenge",
1636 "rude",
1637 "scrape",
1638 "spiral",
1639 "squeeze",
1640 "strain",
1641 "sunset",
1642 "suspend",
1643 "sympathy",
1644 "thigh",
1645 "throne",
1646 "total",
1647 "unseen",
1648 "weapon",
1649 "weary"
1650 ]
1651
1652
1653
1654 n = 1626
1655
1656 # Note about US patent no 5892470: Here each word does not represent a given digit.
1657 # Instead, the digit represented by a word is variable, it depends on the previous word.
1658
1659 def mn_encode( message ):
1660     assert len(message) % 8 == 0
1661     out = []
1662     for i in range(len(message)/8):
1663         word = message[8*i:8*i+8]
1664         x = int(word, 16)
1665         w1 = (x%n)
1666         w2 = ((x/n) + w1)%n
1667         w3 = ((x/n/n) + w2)%n
1668         out += [ words[w1], words[w2], words[w3] ]
1669     return out
1670
1671 def mn_decode( wlist ):
1672     out = ''
1673     for i in range(len(wlist)/3):
1674         word1, word2, word3 = wlist[3*i:3*i+3]
1675         w1 =  words.index(word1)
1676         w2 = (words.index(word2))%n
1677         w3 = (words.index(word3))%n
1678         x = w1 +n*((w2-w1)%n) +n*n*((w3-w2)%n)
1679         out += '%08x'%x
1680     return out
1681
1682
1683 if __name__ == '__main__':
1684     import sys
1685     if len( sys.argv ) == 1:
1686         print 'I need arguments: a hex string to encode, or a list of words to decode'
1687     elif len( sys.argv ) == 2:
1688         print ' '.join(mn_encode(sys.argv[1]))
1689     else:
1690         print mn_decode(sys.argv[1:])