| 1 | package Crypt::OpenPGP::Words; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | our $VERSION = '1.21'; # VERSION | ||
| 6 | |||
| 7 | use parent qw( Crypt::OpenPGP::ErrorHandler ); | ||
| 8 | |||
| 9 | ## Biometric word lists as defined in manual for | ||
| 10 | ## PGPFreeware for Windows 6.5.1, Appendix D | ||
| 11 | |||
| 12 | ## Code based on Mike Dillon's PGPWords.pm | ||
| 13 | |||
| 14 | { | ||
| 15 | my @WORDS; | ||
| 16 | |||
| 17 | sub encode_hex { $_[0]->encode(pack 'H*', $_[1]) } | ||
| 18 | |||
| 19 | sub encode { | ||
| 20 | my $class = shift; | ||
| 21 | my($data) = @_; | ||
| 22 | my $toggle = 1; | ||
| 23 | map { $WORDS[$toggle = !$toggle][$_] } unpack 'C*', $data; | ||
| 24 | } | ||
| 25 | |||
| 26 | @WORDS = ( | ||
| 27 | |||
| 28 | ## Two-syllable words for encoding odd bytes | ||
| 29 | [ qw( | ||
| 30 | aardvark absurd accrue acme | ||
| 31 | adrift adult afflict ahead | ||
| 32 | aimless Algol allow alone | ||
| 33 | ammo ancient apple artist | ||
| 34 | assume Athens atlas Aztec | ||
| 35 | baboon backfield backward banjo | ||
| 36 | beaming bedlamp beehive beeswax | ||
| 37 | befriend Belfast berserk billiard | ||
| 38 | bison blackjack blockade blowtorch | ||
| 39 | bluebird bombast bookshelf brackish | ||
| 40 | breadline breakup brickyard briefcase | ||
| 41 | Burbank button buzzard cement | ||
| 42 | chairlift chatter checkup chisel | ||
| 43 | choking chopper Christmas clamshell | ||
| 44 | classic classroom cleanup clockwork | ||
| 45 | cobra commence concert cowbell | ||
| 46 | crackdown cranky crowfoot crucial | ||
| 47 | crumpled crusade cubic dashboard | ||
| 48 | deadbolt deckhand dogsled dragnet | ||
| 49 | drainage dreadful drifter dropper | ||
| 50 | drumbeat drunken Dupont dwelling | ||
| 51 | eating edict egghead eightball | ||
| 52 | endorse endow enlist erase | ||
| 53 | escape exceed eyeglass eyetooth | ||
| 54 | facial fallout flagpole flatfoot | ||
| 55 | flytrap fracture framework freedom | ||
| 56 | frighten gazelle Geiger glitter | ||
| 57 | glucose goggles goldfish gremlin | ||
| 58 | guidance hamlet highchair hockey | ||
| 59 | indoors indulge inverse involve | ||
| 60 | island jawbone keyboard kickoff | ||
| 61 | kiwi klaxon locale lockup | ||
| 62 | merit minnow miser Mohawk | ||
| 63 | mural music necklace Neptune | ||
| 64 | newborn nightbird Oakland obtuse | ||
| 65 | offload optic orca payday | ||
| 66 | peachy pheasant physique playhouse | ||
| 67 | Pluto preclude prefer preshrunk | ||
| 68 | printer prowler pupil puppy | ||
| 69 | python quadrant quiver quota | ||
| 70 | ragtime ratchet rebirth reform | ||
| 71 | regain reindeer rematch repay | ||
| 72 | retouch revenge reward rhythm | ||
| 73 | ribcage ringbolt robust rocker | ||
| 74 | ruffled sailboat sawdust scallion | ||
| 75 | scenic scorecard Scotland seabird | ||
| 76 | select sentence shadow shamrock | ||
| 77 | showgirl skullcap skydive slingshot | ||
| 78 | slowdown snapline snapshot snowcap | ||
| 79 | snowslide solo southward soybean | ||
| 80 | spaniel spearhead spellbind spheroid | ||
| 81 | spigot spindle spyglass stagehand | ||
| 82 | stagnate stairway standard stapler | ||
| 83 | steamship sterling stockman stopwatch | ||
| 84 | stormy sugar surmount suspense | ||
| 85 | sweatband swelter tactics talon | ||
| 86 | tapeworm tempest tiger tissue | ||
| 87 | tonic topmost tracker transit | ||
| 88 | trauma treadmill Trojan trouble | ||
| 89 | tumor tunnel tycoon uncut | ||
| 90 | unearth unwind uproot upset | ||
| 91 | upshot vapor village virus | ||
| 92 | Vulcan waffle wallet watchword | ||
| 93 | wayside willow woodlark Zulu | ||
| 94 | ) ], | ||
| 95 | |||
| 96 | ## Three-syllable words for encoding even bytes | ||
| 97 | [ qw( | ||
| 98 | adroitness adviser aftermath aggregate | ||
| 99 | alkali almighty amulet amusement | ||
| 100 | antenna applicant Apollo armistice | ||
| 101 | article asteroid Atlantic atmosphere | ||
| 102 | autopsy Babylon backwater barbecue | ||
| 103 | belowground bifocals bodyguard bookseller | ||
| 104 | borderline bottomless Bradbury bravado | ||
| 105 | Brazilian breakaway Burlington businessman | ||
| 106 | butterfat Camelot candidate cannonball | ||
| 107 | Capricorn caravan caretaker celebrate | ||
| 108 | cellulose certify chambermaid Cherokee | ||
| 109 | Chicago clergyman coherence combustion | ||
| 110 | commando company component concurrent | ||
| 111 | confidence conformist congregate consensus | ||
| 112 | consulting corporate corrosion councilman | ||
| 113 | crossover crucifix cumbersome customer | ||
| 114 | Dakota decadence December decimal | ||
| 115 | designing detector detergent determine | ||
| 116 | dictator dinosaur direction disable | ||
| 117 | disbelief disruptive distortion document | ||
| 118 | embezzle enchanting enrollment enterprise | ||
| 119 | equation equipment escapade Eskimo | ||
| 120 | everyday examine existence exodus | ||
| 121 | fascinate filament finicky forever | ||
| 122 | fortitude frequency gadgetry Galveston | ||
| 123 | getaway glossary gossamer graduate | ||
| 124 | gravity guitarist hamburger Hamilton | ||
| 125 | handiwork hazardous headwaters hemisphere | ||
| 126 | hesitate hideaway holiness hurricane | ||
| 127 | hydraulic impartial impetus inception | ||
| 128 | indigo inertia infancy inferno | ||
| 129 | informant insincere insurgent integrate | ||
| 130 | intention inventive Istanbul Jamaica | ||
| 131 | Jupiter leprosy letterhead liberty | ||
| 132 | maritime matchmaker maverick Medusa | ||
| 133 | megaton microscope microwave midsummer | ||
| 134 | millionaire miracle misnomer molasses | ||
| 135 | molecule Montana monument mosquito | ||
| 136 | narrative nebula newsletter Norwegian | ||
| 137 | October Ohio onlooker opulent | ||
| 138 | Orlando outfielder Pacific pandemic | ||
| 139 | Pandora paperweight paragon paragraph | ||
| 140 | paramount passenger pedigree Pegasus | ||
| 141 | penetrate perceptive performance pharmacy | ||
| 142 | phonetic photograph pioneer pocketful | ||
| 143 | politeness positive potato processor | ||
| 144 | provincial proximate puberty publisher | ||
| 145 | pyramid quantity racketeer rebellion | ||
| 146 | recipe recover repellent replica | ||
| 147 | reproduce resistor responsive retraction | ||
| 148 | retrieval retrospect revenue revival | ||
| 149 | revolver sandalwood sardonic Saturday | ||
| 150 | savagery scavenger sensation sociable | ||
| 151 | souvenir specialist speculate stethoscope | ||
| 152 | stupendous supportive surrender suspicious | ||
| 153 | sympathy tambourine telephone therapist | ||
| 154 | tobacco tolerance tomorrow torpedo | ||
| 155 | tradition travesty trombonist truncated | ||
| 156 | typewriter ultimate undaunted underfoot | ||
| 157 | unicorn unify universe unravel | ||
| 158 | upcoming vacancy vagabond vertigo | ||
| 159 | Virginia visitor vocalist voyager | ||
| 160 | warranty Waterloo whimsical Wichita | ||
| 161 | Wilmington Wyoming yesteryear Yucatan | ||
| 162 | ) ] | ||
| 163 | |||
| 164 | ); | ||
| 165 | } | ||
| 166 | |||
| 167 | 1; | ||
| 168 | __END__ |