diff --git a/Cargo.lock b/Cargo.lock index dcb10a5af..14cbed1f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -416,6 +416,7 @@ dependencies = [ "ethcore-ipc 1.4.0", "ethcore-util 1.4.0", "ethjson 0.1.0", + "ethstore 0.1.0", "ethsync 1.4.0", "json-ipc-server 0.2.4 (git+https://github.com/ethcore/json-ipc-server.git)", "jsonrpc-core 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -505,6 +506,8 @@ name = "ethstore" version = "0.1.0" dependencies = [ "ethkey 0.2.0", + "itertools 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ethcore/src/account_provider.rs b/ethcore/src/account_provider.rs index 88f7b6f4f..6a6ece81d 100644 --- a/ethcore/src/account_provider.rs +++ b/ethcore/src/account_provider.rs @@ -191,6 +191,18 @@ impl AccountProvider { Ok(Address::from(address).into()) } + /// Import a new presale wallet. + pub fn import_presale(&self, presale_json: &[u8], password: &str) -> Result { + let address = try!(self.sstore.import_presale(presale_json, password)); + Ok(Address::from(address).into()) + } + + /// Import a new presale wallet. + pub fn import_wallet(&self, json: &[u8], password: &str) -> Result { + let address = try!(self.sstore.import_wallet(json, password)); + Ok(Address::from(address).into()) + } + /// Returns addresses of all accounts. pub fn accounts(&self) -> Result, Error> { let accounts = try!(self.sstore.accounts()).into_iter().map(|a| H160(a.into())).collect(); diff --git a/ethkey/Cargo.toml b/ethkey/Cargo.toml index c7b99e45c..f7b4f51b8 100644 --- a/ethkey/Cargo.toml +++ b/ethkey/Cargo.toml @@ -5,7 +5,7 @@ authors = ["debris "] [dependencies] rand = "0.3.14" -lazy_static = "0.2.1" +lazy_static = "0.2" tiny-keccak = "1.0" eth-secp256k1 = { git = "https://github.com/ethcore/rust-secp256k1" } rustc-serialize = "0.3" diff --git a/ethstore/Cargo.toml b/ethstore/Cargo.toml index 24dd41e14..dd6a391e6 100644 --- a/ethstore/Cargo.toml +++ b/ethstore/Cargo.toml @@ -16,6 +16,8 @@ rust-crypto = "0.2.36" tiny-keccak = "1.0" docopt = { version = "0.6", optional = true } time = "0.1.34" +lazy_static = "0.2" +itertools = "0.4" [build-dependencies] serde_codegen = { version = "0.7", optional = true } diff --git a/ethstore/res/wordlist.txt b/ethstore/res/wordlist.txt new file mode 100644 index 000000000..f330038cf --- /dev/null +++ b/ethstore/res/wordlist.txt @@ -0,0 +1,7530 @@ +station +acting +accept +blow +strange +saved +conversation +plane +mama +yesterday +lied +quick +lately +stuck +lovely +security +report +difference +rid +store +bag +bought +ball +single +doubt +listening +major +walking +cops +blue +deep +dangerous +park +sleeping +shh +record +lord +moved +join +key +captain +card +crime +gentlemen +willing +window +return +walked +guilty +likes +fighting +difficult +soul +joke +service +magic +favorite +uncle +promised +public +bother +island +seriously +cell +lead +knowing +broken +advice +somehow +paid +losing +push +helped +killing +usually +earlier +boss +beginning +liked +innocent +doc +rules +summer +cop +learned +thirty +risk +letting +speaking +officer +ridiculous +support +afternoon +born +dreams +apologize +seat +nervous +across +song +charge +patient +boat +brain +hide +detective +general +planning +nine +huge +breakfast +horrible +age +awful +pleasure +driving +hanging +picked +system +sell +quit +apparently +dying +notice +congratulations +chief +faith +gay +month +visit +letter +decide +double +sad +press +forward +fool +showed +smell +seemed +spell +memory +pictures +slow +seconds +hungry +board +position +hearing +kitchen +force +fly +during +space +realized +experience +kick +others +grab +discuss +third +cat +fifty +responsible +miles +fat +reading +idiot +yep +rock +rich +suddenly +agent +bunch +destroy +bucks +track +shoes +scene +peace +arms +demon +low +consider +papers +medical +incredible +witch +drunk +attorney +tells +knock +ways +belle +cash +gives +department +nose +turns +keeps +beer +jealous +drug +sooner +cares +plenty +extra +tea +won +attack +ground +whose +outta +weekend +matters +wrote +type +gosh +opportunity +king +impossible +books +machine +waste +pretend +named +danger +wall +jump +eating +proof +complete +slept +career +arrest +star +breathe +perfectly +warm +pulled +twice +easier +killer +dating +suit +romantic +drugs +comfortable +powers +finds +checked +fit +divorce +begin +ourselves +closer +ruin +although +smile +laugh +fish +treat +fear +otherwise +excited +mail +hiding +cost +green +stole +noticed +fired +excellent +lived +bringing +pop +piper +bottom +note +sudden +church +bathroom +flight +honestly +sing +foot +games +glass +remind +bank +charges +witness +finding +places +tree +dare +hardly +interest +steal +princess +silly +contact +teach +shop +plus +colonel +fresh +trial +invited +roll +radio +art +reach +heh +dirty +choose +emergency +dropped +butt +credit +obvious +cry +locked +loving +positive +nuts +agreed +price +goodbye +condition +guard +grow +cake +mood +total +crap +crying +belong +lay +partner +trick +pressure +ohh +arm +dressed +cup +lies +bus +taste +neck +south +nurse +raise +land +cross +lots +mister +carry +group +whoever +drinking +breaking +file +lock +computer +wine +closed +writing +spot +paying +study +assume +asleep +turning +legal +justice +bedroom +shower +camera +fill +reasons +forty +bigger +nope +keys +breath +doctors +pants +freak +level +movies +gee +action +area +folks +cream +ugh +continue +focus +wild +truly +desk +convince +client +threw +band +hurts +spending +field +allow +grand +answers +shirt +chair +allowed +rough +doin +sees +government +ought +empty +round +lights +insane +hall +hat +bastard +wind +shows +aware +dealing +pack +meaning +flowers +tight +hurting +ship +subject +guest +chicken +pal +match +arrested +sun +confused +surgery +expecting +deacon +unfortunately +goddamn +lab +passed +bottle +beyond +whenever +pool +opinion +naked +held +common +starts +jerk +secrets +falling +played +necessary +barely +dancing +health +tests +copy +video +cousin +planned +dry +ahem +twelve +simply +skin +often +fifteen +spirit +speech +names +issue +orders +nah +final +results +code +believed +complicated +umm +research +nowhere +escape +biggest +restaurant +page +grateful +usual +burn +address +within +someplace +screw +everywhere +train +film +regret +goodness +mistakes +heaven +details +responsibility +suspect +corner +hero +dumb +terrific +mission +further +gas +whoo +hole +memories +truck +following +ended +teeth +ruined +split +bear +airport +bite +smoke +older +liar +horse +showing +van +project +cards +desperate +themselves +search +pathetic +damage +spoke +quickly +scare +beach +brown +afford +vote +settle +gold +mentioned +due +passion +stayed +rule +checking +tie +hired +upon +rush +heads +concern +blew +natural +champagne +connection +tickets +finger +happiness +form +saving +kissing +hated +personally +suggest +prepared +build +leg +onto +leaves +downstairs +ticket +taught +loose +holy +staff +sea +planet +duty +convinced +throwing +defense +kissed +legs +according +loud +practice +bright +babies +army +warning +miracle +carrying +flying +blind +queen +ugly +shopping +hates +monster +sight +vampire +bride +coat +account +states +clearly +celebrate +brilliant +wanting +add +moon +lips +custody +center +screwed +buying +size +toast +thoughts +student +stories +however +professional +stars +reality +birth +attitude +advantage +grandfather +sold +opened +grandma +beg +changes +someday +grade +cheese +roof +pizza +brothers +signed +bird +ahh +marrying +powerful +grown +grandmother +fake +opening +expected +eventually +ideas +exciting +covered +familiar +bomb +television +harmony +color +heavy +schedule +records +dollar +capable +master +numbers +practically +including +correct +clue +forgotten +immediately +appointment +social +nature +ú +deserves +west +teacher +threat +bloody +lonely +ordered +shame +local +jacket +hook +destroyed +scary +loser +investigation +above +invite +shooting +merry +port +precious +lesson +criminal +growing +caused +victim +professor +followed +funeral +dean +considering +burning +couch +strength +harder +loss +view +beauty +sisters +several +pushed +written +shock +pushing +heat +chocolate +greatest +miserable +nightmare +energy +brings +character +became +famous +enemy +crash +chances +sending +recognize +healthy +boring +feed +engaged +percent +headed +lines +treated +purpose +north +knife +rights +drag +fan +badly +speed +hire +curious +paint +pardon +built +behavior +closet +candy +warn +gorgeous +post +milk +survive +forced +daria +victoria +operation +suck +offered +ends +dump +rent +marshall +remembered +lieutenant +trade +thanksgiving +rain +revenge +physical +available +program +prefer +spare +pray +disappeared +aside +statement +sometime +animal +sugar +meat +fantastic +breathing +laughing +itself +tip +stood +market +affair +ours +depends +cook +babe +main +woods +protecting +jury +national +brave +storm +large +prince +interview +roger +football +fingers +murdered +sexy +explanation +process +picking +based +style +stone +pieces +blah +assistant +stronger +block +aah +bullshit +pie +handsome +unbelievable +anytime +nearly +shake +cars +wherever +serve +pulling +points +medicine +facts +waited +lousy +circumstances +stage +disappointed +weak +trusted +license +nothin +community +trey +trash +understanding +slip +cab +sounded +awake +friendship +stomach +weapon +threatened +mystery +official +dick +regular +river +valley +understood +contract +bud +sexual +race +basically +switch +lake +frankly +issues +cheap +lifetime +deny +painting +ear +clock +baldwin +weight +garbage +tear +ears +dig +bullet +selling +setting +indeed +gus +changing +singing +tiny +particular +draw +decent +susan +super +spring +santos +avoid +messed +united +filled +touched +score +disappear +stranger +exact +pills +kicked +harm +recently +snow +fortune +strike +pretending +raised +annie +slayer +monkey +insurance +fancy +sydney +drove +cared +belongs +nights +shape +dogs +lorelai +jackie +base +maggie +lift +lewis +stock +fashion +freedom +timing +johnny +guarantee +chest +bridge +woke +tabitha +source +patients +theory +lisa +camp +original +juice +burned +access +watched +heading +selfish +oil +drinks +wise +failed +period +doll +committed +elevator +freeze +noise +exist +science +pair +edge +wasting +sat +player +ceremony +cartman +pig +uncomfortable +peg +guns +vacation +staring +files +bike +weather +mostly +stress +sucks +permission +arrived +thrown +possibility +faster +example +borrow +release +ate +notes +joy +hoo +library +junior +property +negative +fabulous +event +doors +screaming +vision +member +bone +battle +safety +term +devil +meal +fellow +asshole +apology +anger +honeymoon +wet +bail +parking +fucked +non +hung +protection +manager +fixed +families +dawn +sports +campaign +map +wash +stolen +sensitive +stealing +photo +chose +lets +comfort +worrying +whom +pocket +bleeding +students +shoulder +ignore +fourth +neighborhood +talent +tied +garage +dies +demons +travel +success +dumped +witches +training +rude +crack +model +bothering +radar +grew +willow +remain +soft +meantime +gimme +connected +chase +kinds +cast +cancer +v +sky +likely +fate +buried +hug +driver +concentrate +throat +prom +messages +east +unit +intend +crew +ashamed +somethin +midnight +manage +guilt +weapons +terms +interrupt +guts +tongue +distance +conference +treatment +shoe +basement +sentence +purse +glasses +cabin +universe +towards +repeat +mirror +wound +tall +reaction +odd +engagement +therapy +letters +emotional +runs +magazine +jeez +decisions +soup +thrilled +society +managed +sue +stake +rex +chef +moves +awesome +genius +extremely +entirely +tory +nasty +moments +expensive +counting +shots +kidnapped +square +cleaning +shift +plate +impressed +smells +trapped +male +tour +knocked +charming +attractive +argue +puts +whip +language +heck +embarrassed +settled +package +laid +animals +hitting +disease +bust +stairs +alarm +pure +nail +nerve +incredibly +hill +walks +lane +dirt +bond +stamp +becoming +terribly +friendly +easily +damned +jobs +suffering +disgusting +washington +stopping +deliver +riding +helps +federal +disaster +bars +crossed +rate +create +trap +claim +talks +eggs +effect +chick +turkey +threatening +spoken +snake +introduce +rescue +confession +embarrassing +bags +lover +impression +gate +fantasy +reputation +balls +attacked +among +knowledge +presents +inn +chat +suffer +bryant +argument +talkin +crowd +homework +fought +coincidence +cancel +accepted +rip +pride +solve +hopefully +pounds +pine +mate +illegal +generous +tommy +streets +matt +director +glen +con +separate +outfit +maid +bath +punch +phil +mayor +helen +freaked +begging +recall +enjoying +bug +prepare +parts +wheel +signal +nikki +direction +defend +signs +painful +caroline +yourselves +walls +rat +maris +amount +suspicious +hearts +flat +cooking +button +warned +sixty +pity +parties +crisis +rae +coach +abbott +row +baseball +yelling +leads +awhile +pen +confidence +offering +falls +carter +image +farm +pleased +panic +monday +hers +gettin +smith +role +refuse +determined +jane +grandpa +progress +mexico +testify +passing +military +choices +artist +william +uhh +gym +cruel +wings +traffic +pink +bodies +mental +gentleman +coma +poison +cutting +proteus +guests +expert +bull +benefit +bell +faces +cases +mimi +ghost +led +jumped +toilet +secretary +sneak +q +mix +marty +firm +agreement +privacy +dates +anniversary +smoking +reminds +pot +created +twins +swing +successful +season +scream +considered +solid +options +flash +commitment +senior +ill +crush +ambulance +wallet +discovered +officially +gang +til +rise +reached +eleven +option +laundry +former +assure +stays +skip +hunt +fail +accused +wide +challenge +popular +learning +discussion +clinic +plant +exchange +betrayed +bro +sticking +university +target +members +lower +bored +mansion +soda +silver +sheriff +suite +handled +busted +senator +load +happier +younger +studying +romance +procedure +ocean +section +winter +sec +commit +bones +assignment +suicide +spread +minds +fishing +swim +ending +bat +yell +llanview +league +chasing +seats +proper +holiday +command +believes +humor +hopes +fifth +winning +solution +leader +yellow +sharp +sale +lawyers +giant +nor +material +latest +ash +highly +escaped +audience +winner +parent +burns +tricks +insist +dropping +cheer +medication +higher +flesh +district +wood +routine +cookies +century +shared +sandwich +psycho +handed +false +beating +appear +adult +warrant +spike +garden +awfully +odds +article +treating +thin +suggesting +fever +female +sweat +silent +specific +clever +sweater +request +prize +mall +tries +mile +manning +fully +estate +diamond +union +sharing +assuming +judgment +goodnight +divorced +quality +despite +surely +steps +jet +confess +mountain +math +listened +comin +answered +vulnerable +bless +dreaming +rooms +chip +zero +potential +pissed +kills +grant +wolf +tears +knees +chill +blonde +brains +agency +degree +unusual +joint +rob +packed +dreamed +cure +covering +newspaper +lookin +coast +grave +egg +direct +cheating +breaks +quarter +orange +mixed +locker +gifts +brand +awkward +toy +rare +policy +pilar +joking +competition +classes +assumed +reasonable +dozen +curse +quartermaine +millions +dessert +rolling +detail +alien +served +delicious +closing +vampires +released +ancient +wore +value +tail +site +secure +salad +murderer +hits +toward +spit +screen +pilot +penny +offense +dust +conscience +bread +answering +admitted +lame +invitation +hidden +grief +smiling +path +homer +destiny +del +stands +bowl +pregnancy +prisoner +delivery +guards +desire +virus +shrink +influence +freezing +concert +wreck +partners +chain +birds +walker +wire +technically +presence +blown +anxious +cave +version +mickey +holidays +cleared +wishes +survived +caring +candles +bound +related +charm +apple +yup +pulse +jumping +jokes +frame +boom +vice +performance +occasion +silence +opera +opal +nonsense +frightened +downtown +internet +slipped +holly +duck +dimera +blowing +session +relationships +kidnapping +actual +spin +classic +civil +tool +packing +education +blaming +wrap +obsessed +fruit +torture +personality +location +loan +effort +commander +trees +rocks +owner +fairy +banks +network +per +necessarily +county +contest +chuck +seventy +print +motel +fallen +directly +underwear +grams +exhausted +believing +particularly +freaking +carefully +trace +touching +messing +committee +smooth +recovery +intention +enter +consequences +belt +standard +sacrifice +marina +courage +butter +officers +enjoyed +lack +buck +attracted +appears +bay +yard +returned +remove +nut +carried +testimony +intense +granted +violence +heal +defending +attempt +unfair +relieved +political +loyal +approach +slowly +plays +normally +buzz +alcohol +actor +surprises +psychiatrist +pre +plain +attic +uniform +terrified +sons +pet +cleaned +threaten +teaching +mum +motion +fella +enemies +desert +collection +incident +failure +satisfied +imagination +hooked +headache +forgetting +counselor +acted +opposite +highest +gross +golden +equipment +badge +tennis +visiting +studio +naturally +frozen +commissioner +sakes +labor +glory +appropriate +trunk +armed +twisted +thousands +received +dunno +costume +temporary +sixteen +impressive +zone +kitty +kicking +junk +hon +grabbed +unlike +understands +mercy +describe +priest +clients +cable +owns +affect +witnesses +starving +instincts +happily +discussing +deserved +strangers +leading +intelligence +host +authority +surveillance +cow +commercial +admire +shadow +questioning +fund +dragged +barn +object +deeply +amp +wrapped +wasted +tense +sport +route +reports +plastic +hoped +fellas +election +roommate +pierce +mortal +fascinating +chosen +stops +shown +arranged +abandoned +sides +delivered +china +becomes +arrangements +agenda +hunting +began +theater +series +literally +propose +honesty +basketball +underneath +forces +soldier +services +sauce +review +promises +lecture +eighty +brandy +bills +windows +torn +shocked +relief +horses +golf +explained +counter +design +circle +victims +transfer +response +channel +backup +identity +differently +campus +spy +ninety +interests +guide +elliot +deck +biological +pheebs +minor +ease +creep +waitress +skills +telephone +photos +ripped +raising +scratch +rings +prints +flower +wave +thee +arguing +royal +laws +figures +asks +writer +reception +pin +oops +diner +annoying +agents +taggert +goal +council +mass +ability +sergeant +international +gig +blast +basic +wing +tradition +towel +earned +clown +rub +habit +customers +creature +counts +actions +snap +react +prime +paranoid +pace +wha +handling +eaten +dahlia +therapist +comment +charged +tax +sink +reporter +nurses +beats +priority +interrupting +gain +fed +warehouse +virgin +shy +pattern +loyalty +inspector +events +candle +pleasant +media +excuses +duke +castle +threats +permanent +guessing +financial +demand +basket +assault +tend +praying +motive +los +unconscious +trained +museum +alley +tracks +swimming +range +nap +mysterious +unhappy +tone +switched +liberty +bang +award +neighbor +loaded +gut +childhood +causing +swore +sample +piss +hundreds +balance +background +toss +mob +misery +central +boots +thief +squeeze +potter +lobby +hah +geez +exercise +ego +drama +patience +noble +indian +forth +facing +engine +booked +boo +songs +poker +eighteen +cookie +bury +perform +everyday +digging +creepy +compared +wondered +trail +saint +rotten +liver +hmmm +drawn +device +whore +magical +village +march +journey +fits +discussed +zombie +supply +moral +helpful +attached +slut +searching +flew +depressed +aliens +aisle +underground +pro +drew +daughters +cris +amen +vows +proposal +pit +neighbors +darn +clay +cents +arrange +annulment +uses +useless +squad +represent +product +joined +afterwards +adventure +resist +protected +net +fourteen +celebrating +piano +inch +flag +debt +darkness +violent +tag +sand +gum +dammit +strip +hip +celebration +below +reminded +palace +claims +replace +phones +paperwork +mighty +emotions +typical +stubborn +stable +pound +pillow +papa +mature +lap +designed +current +bum +tension +tank +suffered +stroke +steady +provide +overnight +meanwhile +chips +beef +wins +suits +carol +boxes +salt +express +collect +tragedy +therefore +spoil +realm +profile +degrees +wipe +surgeon +stretch +stepped +nephew +neat +limo +fox +confident +anti +victory +perspective +designer +climb +angels +title +suggested +punishment +finest +occurred +hint +furniture +blanket +twist +trigger +surrounded +surface +proceed +lip +jersey +fries +worries +refused +niece +handy +gloves +soap +signature +disappoint +crawl +convicted +zoo +result +pages +lit +flip +counsel +cheers +doubts +crimes +accusing +shaking +remembering +phase +kit +hallway +halfway +bothered +useful +popcorn +makeup +madam +gather +cowboy +concerns +cameras +blackmail +symptoms +rope +ordinary +imagined +concept +cigarette +barb +supportive +memorial +explosion +yay +woo +trauma +ouch +furious +cheat +avoiding +whew +thick +oooh +boarding +approve +urgent +shhh +misunderstanding +minister +drawer +sin +phony +joining +jam +interfere +governor +chapter +catching +bargain +warren +tragic +schools +respond +punish +penthouse +hop +angle +thou +sherry +remains +rach +ohhh +insult +bugs +beside +begged +absolute +strictly +socks +senses +ups +sneaking +yah +worthy +serving +reward +polite +checks +tale +physically +instructions +fooled +blows +tabby +internal +bitter +adorable +tested +suggestion +string +mouse +marks +jewelry +debate +com +alike +pitch +jacks +fax +distracted +shelter +lovers +lessons +hart +goose +foreign +escort +average +twin +testing +damnit +constable +circus +audition +tune +shoulders +mud +mask +helpless +feeding +explains +dated +sucked +robbery +objection +kirk +behave +valuable +shadows +creative +courtroom +confusing +beast +tub +talented +struck +smarter +mistaken +customer +bizarre +scaring +punk +motherfucker +holds +focused +alert +activity +vecchio +sticks +singer +reverend +highway +foolish +compliment +blessed +bastards +attend +scheme +aid +worker +wheelchair +protective +poetry +gentle +script +reverse +picnic +knee +intended +construction +cage +wives +voices +toes +stink +scares +pour +effects +cheated +tower +slide +ruining +recent +jewish +filling +exit +cruise +cottage +corporate +cats +upside +supplies +proves +parked +instance +grounds +diary +complaining +basis +wounded +politics +confessed +wicked +pipe +merely +massage +data +colors +chop +budget +brief +spill +prayer +costs +chicks +betray +begins +arrangement +waiter +sucker +scam +rats +fraud +flu +brush +adopted +tables +sympathy +pill +pee +lean +filthy +cliff +burger +web +seventeen +landed +expression +entrance +employee +drawing +cap +bunny +bracelet +thirteen +scout +principal +pays +fairly +facility +deeper +arrive +unique +tracking +spite +shed +recommend +oughta +nanny +naive +menu +grades +diet +corn +authorities +separated +roses +patch +grey +dime +devastated +description +tap +subtle +include +garrison +citizen +bullets +beans +pile +metal +las +executive +confirm +capital +adults +toe +strings +parade +harbor +bow +borrowed +booth +toys +straighten +steak +status +remote +premonition +poem +planted +honored +youth +specifically +meetings +exam +daily +convenient +traveling +matches +laying +insisted +crystal +apply +units +technology +steel +muscle +dish +aitoro +sis +sales +legend +kindly +grandson +donor +wheels +temper +teenager +strategy +proven +mothers +monitor +iron +houses +eternity +denial +couples +backwards +tent +swell +noon +happiest +gotcha +episode +drives +bacon +thinkin +spirits +potion +holes +fence +dial +affairs +acts +whatsoever +ward +rehearsal +proved +overheard +nuclear +lemme +leather +hostage +hammer +faced +discover +constant +bench +tryin +taxi +shove +sets +moron +limits +impress +gray +entitled +connect +pussy +needle +limit +lad +intelligent +instant +forms +disagree +tiger +stinks +recover +losers +groom +gesture +developed +constantly +blocks +bartender +tunnel +suspects +sealed +removed +paradise +legally +illness +hears +dresses +aye +vehicle +thy +teachers +sheet +receive +psychic +denied +teenage +rabbit +puppy +knocking +judging +bible +behalf +accidentally +waking +ton +superior +slack +seek +rumor +manners +homeless +hollow +hills +desperately +critical +coward +theme +tapes +sheets +referring +personnel +item +gear +majesty +forest +fans +exposed +cried +tons +spells +producer +launch +jay +instinct +extreme +belief +quote +motorcycle +convincing +appeal +advance +greater +fashioned +empire +aids +accomplished +grip +bump +upsetting +soldiers +scheduled +production +needing +invisible +forgiveness +feds +complex +compare +cloud +champion +bothers +blank +treasure +tooth +territory +sacred +inviting +inner +earn +compromise +cocktail +tramp +temperature +signing +messenger +landing +jabot +intimate +dignity +dealt +souls +root +informed +gods +entertainment +dressing +cigarettes +blessing +billion +upper +manner +lightning +leak +fond +alternative +seduce +players +operate +modern +liquor +fingerprints +enchantment +butters +stuffed +filed +emotionally +division +conditions +uhm +transplant +tips +powder +passes +oxygen +nicely +lunatic +hid +drill +designs +complain +announcement +visitors +unfortunate +slap +pumpkin +prayers +plug +organization +opens +oath +mutual +hockey +graduate +confirmed +broad +yacht +spa +remembers +horn +fried +extraordinary +bait +appearance +abuse +sworn +stare +safely +reunion +plot +burst +aha +experiment +experienced +dive +commission +chaos +cells +aboard +returning +lesbian +independent +expose +environment +buddies +trusting +spider +smaller +mountains +booze +tattoo +sweep +sore +scudder +properly +parole +effective +ditch +decides +canceled +bulldog +bra +speaks +rubber +reaching +glow +foundation +wears +thirsty +skull +scotch +ringing +dorm +dining +bend +unexpected +systems +sob +pat +pancakes +harsh +flattered +existence +ahhh +troubles +proposed +fights +favourite +eats +driven +computers +chin +bravo +seal +rage +causes +bubble +border +undercover +spoiled +shine +rug +identify +destroying +deputy +deliberately +conspiracy +clothing +thoughtful +similar +sandwiches +plates +nails +miracles +investment +fridge +drank +contrary +beloved +allergic +washed +stalking +solved +sack +misses +forgiven +earl +cuz +bent +approval +practical +organized +jungle +involve +industry +fuel +dragging +dancer +cotton +cooked +possession +pointing +foul +editor +dull +beneath +ages +peanut +horror +heels +grass +faking +deaf +stunt +portrait +painted +jealousy +hopeless +fears +cuts +conclusion +volunteer +sword +scenario +satellite +necklace +crashed +chapel +accuse +teddy +restraining +naughty +humans +homicide +helicopter +formal +firing +shortly +safer +missy +diamonds +devoted +auction +videotape +tore +stores +reservations +pops +appetite +wounds +vanquish +symbol +prevent +patrol +ironic +flow +fathers +excitement +anyhow +tearing +sends +rape +laughed +function +core +charmed +carpet +bowling +belly +sub +shark +dealer +cooperate +bachelor +accomplish +wakes +struggle +spotted +sorts +reservation +fort +coke +ashes +yards +votes +tastes +supposedly +loft +intentions +integrity +wished +towels +suspected +slightly +qualified +profit +log +investigating +inappropriate +immediate +ginger +companies +backed +sunset +pan +owned +nation +lipstick +lawn +compassion +cafeteria +belonged +affected +scarf +precisely +obsession +management +loses +lighten +infection +granddaughter +explode +chemistry +balcony +storage +spying +publicity +exists +employees +depend +cue +cracked +conscious +aww +ally +ace +accounts +absurd +vicious +tools +strongly +rap +potato +invented +hood +forbid +directions +defendant +bare +announce +screwing +samples +salesman +rounds +robbed +leap +lakeview +insanity +injury +genetic +freaks +fighter +document +burden +swallow +slave +reveal +religious +possibilities +martini +kidnap +gown +entering +chairs +wishing +statue +stalker +setup +serial +sandy +punished +dramatic +dismissed +criminals +carver +blade +seventh +regrets +raped +quarters +produce +pony +lamp +dentist +anyways +anonymous +added +tech +semester +risks +regarding +owes +magazines +machines +lungs +explaining +delicate +tricked +oldest +eager +doomed +coffin +click +cafe +buttons +bureau +adoption +traditional +surrender +stones +stab +sickness +scum +loop +independence +generation +floating +envelope +entered +combination +chamber +casino +worn +vault +sunshine +sorel +pretended +potatoes +plea +photograph +petty +payback +misunderstood +kiddo +healing +fiancée +cascade +capeside +application +stabbed +remarkable +random +guitar +frog +cabinet +brat +wrestling +sixth +scale +privilege +pencil +passionate +nerves +lawsuit +kidney +disturbed +crossing +cozy +avatar +associate +tire +shirts +required +posted +oven +ordering +mill +journal +gallery +delay +clubs +risky +purple +nest +monsters +honorable +grounded +gene +favour +electric +culture +closest +breast +breakdown +attempted +placed +conflict +bald +actress +abandon +wisdom +steam +scar +pole +duh +collar +worthless +warlock +sucking +standards +resources +photographs +introduced +injured +graduation +enormous +disturbing +disturb +distract +deals +conclusions +baker +vodka +situations +require +muffin +mid +measure +dishes +crawling +congress +briefcase +wiped +whistle +sits +roast +rented +pigs +penis +massive +link +flirting +existed +deposit +damaged +bottles +unknown +types +topic +robin +riot +overreacting +minimum +logical +impact +hostile +embarrass +casual +beacon +amusing +altar +values +ultimate +skinny +recognized +maintain +goods +covers +battery +survival +skirt +shave +prisoners +porch +med +ghosts +favors +drops +dizzy +chili +breasts +begun +beaten +advise +transferred +strikes +rehab +raw +photographer +peaceful +leery +kraft +hooker +heavens +fortunately +fooling +expectations +draft +citizens +cigar +active +weakness +ski +ships +ranch +practicing +musical +movement +individual +homes +executed +examine +documents +cranes +column +bribe +beers +task +species +sail +rum +resort +rash +prescription +operating +hush +fuzzy +fragile +forensics +expense +drugged +differences +cows +conduct +comic +bingo +bells +avenue +attacking +assigned +visitor +suitcase +sources +sorta +scan +rod +payment +motor +mini +manticore +inspired +insecure +imagining +hardest +gamble +clerk +yea +wrist +tube +starters +silk +pump +pale +nicer +haul +guardian +flies +dodge +demands +boot +arts +thumb +limited +lighter +elders +connections +shooter +quietly +pulls +lion +idiots +factor +erase +denying +attacks +ankle +amnesia +accepting +ooo +hunter +heartbeat +gal +fry +confront +backing +register +phrase +operations +minus +meets +legitimate +hurricane +fixing +communication +bucket +boats +auto +arrogant +tuna +supper +studies +slightest +sins +sayin +recipe +pier +paternity +mason +lamb +kisses +humiliating +genuine +catholic +snack +rational +pointed +passport +minded +guessed +fiancé +display +dip +advanced +weddings +unh +tumor +teams +reported +marco +humiliated +hee +destruction +copies +closely +bid +banana +august +aspirin +academy +wig +throughout +spray +picks +occur +logic +knight +fields +eyed +equal +drowning +contacts +ritual +perfume +hiring +hating +ham +generally +fusion +error +elected +docks +creatures +visions +thanking +thankful +sock +replaced +reed +nineteen +fork +comedy +analysis +throws +teenagers +studied +stressed +slice +shore +rolls +requires +plead +palm +ladder +kicks +ford +detectives +assured +widow +tissue +tellin +shallow +responsibilities +repay +rejected +permanently +howdy +hack +girlfriends +deadly +comforting +ceiling +bonus +verdict +maintenance +jar +insensitive +heather +factory +aim +triple +spilled +respected +recovered +messy +interrupted +entry +blond +bleed +benefits +wardrobe +takin +significant +objective +murders +foster +doo +ding +chart +backs +airplane +workers +waves +underestimate +ties +soccer +registered +multiple +justify +harmless +frustrated +fold +convention +communicate +bugging +attraction +arson +whack +tits +salary +rumors +residence +obligation +medium +liking +development +develop +dearest +congratulate +alliance +vengeance +severe +rack +puzzle +puerto +guidance +fires +dickie +courtesy +caller +bounce +blamed +wizard +tops +repair +quiz +prep +involves +headquarters +curiosity +codes +circles +bears +barbecue +troops +spinning +scores +pursue +psychotic +groups +cough +claimed +accusations +shares +rushing +resent +laughs +gathered +freshman +envy +drown +chemical +branch +asses +sofa +scientist +poster +models +islands +highness +drain +dock +cha +apologies +welfare +theirs +stat +stall +spots +somewhat +solo +realizes +psych +mmmm +jazz +hawk +fools +finishing +beard +album +wee +understandable +unable +treats +theatre +succeed +stir +relaxed +makin +inches +gratitude +faithful +bin +accent +zip +witter +wandering +shell +regardless +racing +que +locate +inevitable +griffin +deed +crushed +controlling +western +taxes +smelled +sheep +settlement +rocky +robe +retired +poet +opposed +marked +gossip +gambling +determine +cosmetics +cent +accidents +tricky +surprising +stiff +sincere +shield +rushed +rice +resume +reporting +refrigerator +reference +preparing +nightmares +mijo +ignoring +hunch +fog +fireworks +drowned +crown +cooperation +brass +accurate +whispering +sophisticated +religion +luggage +lemon +investigate +hike +explore +emotion +dragon +creek +crashing +contacted +complications +cherry +acid +z +shining +rolled +righteous +reconsider +inspiration +goody +geek +frightening +festival +ethics +creeps +courthouse +camping +assistance +affection +vow +protest +lodge +haircut +forcing +eternal +essay +chairman +baked +apologized +vibe +stud +stargate +sailor +respects +receipt +operator +mami +includes +hats +goat +exclusive +destructive +define +defeat +cheek +adore +adopt +warrior +voted +tracked +signals +shorts +reminding +relative +pond +ninth +floors +dough +creations +continues +cancelled +barrel +tuck +snuck +slight +reporters +rear +pressing +novel +newspapers +magnificent +madame +lick +lazy +goddess +glorious +fiancee +candidate +brick +bits +activities +visitation +teen +scholarship +sane +previous +kingdom +kindness +flames +sunny +shoulda +rescued +mattress +lounge +lobster +lifted +label +importantly +glove +enterprises +disappointment +condo +cemetery +beings +admitting +yelled +waving +spoon +screech +satisfaction +requested +reads +plants +nun +navy +nailed +elephant +described +dedicated +certificate +centuries +annual +worm +tick +resting +primary +polish +monkeys +marvelous +fuss +funds +defensive +compete +chased +bush +balloon +sailing +provided +pockets +filing +depression +conversations +consideration +consciousness +worlds +innocence +indicate +fucker +freaky +forehead +bam +appeared +aggressive +trailer +summers +slam +retirement +quitting +pry +porn +narrow +levels +inform +fee +encourage +dug +delighted +daylight +danced +currently +confidential +chew +aunts +washing +warden +tossed +temple +spectra +permit +mistress +marrow +lined +implying +hatred +grill +formula +efforts +corpse +clues +sober +relatives +promotion +peel +offended +morgue +larger +infected +humanity +eww +electricity +electrical +distraction +chopper +cart +broadcast +wired +violation +suspended +sting +promising +harassment +glue +gathering +deer +cursed +controlled +content +combat +calendar +brutal +bing +assets +warlocks +wagon +unpleasant +tan +robot +proving +priorities +pepper +observation +lease +killers +grows +flame +domestic +divine +disappearance +depressing +thrill +terminal +sitter +ribs +offers +naw +flush +exception +earrings +deadline +corporal +collapsed +update +snapped +smack +offices +melt +madness +figuring +eagle +delusional +coulda +burnt +actors +trips +tender +sperm +specialist +scientific +satan +realise +pork +popped +planes +interrogation +institution +included +gates +esteem +communications +choosing +choir +undo +pres +prayed +plague +manipulate +lifestyle +lance +insulting +honour +detention +delightful +daisy +coffeehouse +chess +betrayal +apologizing +adjust +wrecked +wont +whipped +rides +reminder +psychological +principle +monsieur +injuries +fame +faint +confusion +clouds +bon +bake +sang +nearest +industries +illusion +execution +distress +definition +cutter +creating +correctly +complaint +chickens +blocked +trophy +tortured +structure +rot +risking +pointless +pearl +household +heir +handing +eighth +dumping +cups +alibi +absence +vital +towers +thus +struggling +shiny +risked +refer +mummy +mint +keeper +involvement +hose +hobby +fortunate +fitting +curtain +counseling +coats +addition +wit +transport +technical +rode +puppet +prior +opportunities +modeling +memo +liquid +irresponsible +humiliation +hiya +freakin +fez +felony +choke +blackmailing +appreciated +tabloid +suspicion +recovering +rally +psychology +pledge +panicked +nursery +louder +jeans +investigator +identified +homecoming +height +graduated +frustrating +fabric +dot +distant +cock +buys +busting +buff +wax +sleeve +pudding +products +philosophy +japan +irony +hospitals +dope +declare +autopsy +workin +torch +substitute +scandal +prick +limb +leaf +laser +hysterical +growth +goddamnit +fetch +dimension +crowded +cousins +clip +climbing +bonding +bee +approved +yeh +woah +veronica +ultimately +trusts +terror +roller +returns +negotiate +millennium +marsh +majority +lethal +length +iced +fantasies +element +deeds +cigars +bore +babysitter +sponge +sleepy +questioned +peek +outrageous +nigger +medal +insulted +grudge +established +driveway +deserted +definite +capture +beep +wires +weed +suggestions +searched +owed +originally +nickname +lighting +lend +films +drunken +demanding +conviction +characters +bumped +weigh +weasel +valentine +touches +tempted +supreme +shout +rocket +resolve +relate +poisoned +pip +occasionally +meals +maker +invitations +intruder +haunted +fur +footage +depending +bonds +bogus +autograph +apples +affects +tolerate +stepping +spontaneous +southern +sleeps +probation +presentation +performed +identical +herb +fist +cycle +cooler +banner +associates +yankee +streak +spectacular +sector +muscles +lasted +increase +hostages +heroin +havin +hardware +habits +fisher +encouraging +cult +consult +burgers +boyfriends +bailed +baggage +association +wealthy +watches +versus +troubled +torturing +teasing +sweetest +stations +sip +rag +qualities +postpone +pad +overwhelmed +maniac +impulse +hut +follows +duchess +classy +charging +celebrity +amazed +slater +scenes +rising +revealed +representing +policeman +offensive +mug +hypocrite +humiliate +hideous +hairy +finals +experiences +courts +costumes +captured +bolt +bluffing +betting +bein +bedtime +alpha +alcoholic +waters +visual +vegetable +tray +suspicions +sticky +spreading +splendid +smiles +shrimp +shouting +roots +ransom +pressed +nooo +jew +intent +grieving +gladly +fling +eliminate +disorder +cocaine +chancellor +cereal +arrives +aaah +yum +technique +subway +strain +statements +sonofabitch +servant +roads +resident +republican +paralyzed +orb +lotta +locks +guaranteed +dummy +discipline +despise +dental +corporation +cherish +carries +briefing +bluff +batteries +atmosphere +assholes +whatta +tux +sounding +servants +rifle +presume +mamie +handwriting +goals +gin +gale +fainted +elements +dried +cape +allright +allowing +acknowledge +whiskey +whacked +toxic +skating +shepherd +reliable +quicker +penalty +panel +overwhelming +nearby +lining +importance +ike +harassing +global +fatal +endless +elsewhere +dolls +convict +butler +bold +ballet +ñ +whatcha +unlikely +spiritual +shutting +separation +rusty +recording +positively +overcome +mount +method +manual +helmet +goddam +failing +essence +dose +diagnosis +cured +claiming +bully +airline +ahold +yearbook +various +triangle +tempting +shelf +rig +pursuit +prosecution +pouring +possessed +partnership +november +humble +greedy +countries +wonders +tsk +thorough +spine +shotgun +reckless +railroad +psychiatric +meaningless +latte +jammed +ignored +fiance +exposure +exhibit +evidently +duties +contempt +compromised +capacity +cans +weekends +urge +thunder +theft +suing +shipment +scissors +responding +refuses +proposition +porter +noises +matching +marine +located +leon +legacy +ink +hormones +hail +grandchildren +godfather +gently +establish +eastern +darryl +contracts +compound +worldwide +smashed +sexually +sentimental +senor +scored +nicest +marketing +manipulated +jaw +intern +handcuffs +framed +errands +entertaining +discovery +crib +carriage +barge +awards +attending +ambassador +videos +tab +spends +slipping +seated +rubbing +rely +reject +recommendation +reckon +ratings +headaches +float +embrace +corners +whining +turner +sweating +sole +skipped +rolf +restore +receiving +population +pep +olive +mountie +motives +listens +jeep +heroes +controls +cleaner +cheerleader +wooden +unnecessary +stunning +slim +shipping +scent +quest +praise +pose +luxury +loosen +info +hum +hottest +haunt +gracious +git +forgiving +fleet +errand +emperor +cakes +blames +abortion +worship +theories +strict +sketch +shifts +plotting +physician +perimeter +passage +pals +mere +meg +mattered +longest +jews +interference +grease +eyewitness +enthusiasm +encounter +diapers +artists +strongest +shaken +serves +punched +projects +portal +outer +nazi +jewels +concrete +colleagues +catches +carrot +bearing +backyard +academic +winds +whisper +volume +terrorists +sabotage +pope +pea +organs +needy +mock +mentor +measures +listed +lex +cuff +civilization +breeze +articles +yummy +writes +woof +valid +skipper +sands +rarely +rabbi +prank +performing +obnoxious +mates +improve +hereby +gabby +faked +cheeks +cellar +whitelighter +void +trucks +tomato +substance +strangle +sour +skill +senate +purchase +native +muffins +maximum +interfering +hoh +fiction +exotic +demonic +colored +clearing +civilian +buildings +brooks +boutique +winters +trading +terrace +speaker +smoked +skiing +seed +righty +relations +quack +published +preliminary +pact +outstanding +opinions +knot +ketchup +items +examined +disappearing +coin +circuit +assist +administration +violet +uptight +ticking +terrifying +tease +swamp +secretly +rejection +reflection +realizing +rays +partly +mentally +jurisdiction +doubted +deception +crucial +congressman +cheesy +chambers +bitches +arrival +visited +toto +supporting +stalling +shook +scouts +scoop +ribbon +reserve +raid +notion +income +immune +hay +expects +edition +destined +constitution +classroom +boobs +bets +bathing +appreciation +appointed +accomplice +wander +shoved +sewer +seeking +scroll +retire +peach +paintings +nude +lasts +fugitive +freezer +discount +cranky +crank +clowns +clearance +buffalo +bodyguard +anxiety +accountant +whoops +volunteered +terrorist +tales +talents +stinking +snakes +sessions +salmon +resolved +remotely +protocol +nickel +nana +garlic +foreman +decency +cord +beds +beam +areas +altogether +uniforms +tremendous +summit +squash +restaurants +rank +profession +popping +peanuts +outa +observe +myrtle +lung +largest +hangs +feelin +experts +enforcement +encouraged +economy +dudes +donation +disguise +curb +continued +competitive +businessman +bites +balloons +antique +advertising +ads +toothbrush +retreat +represents +realistic +profits +predict +panties +lust +lid +landlord +hourglass +hesitate +focusing +equally +consolation +champ +babbling +aged +tipped +stranded +smartest +rhythm +replacement +repeating +puke +psst +paycheck +overreacted +mechanic +macho +ling +leadership +juvenile +images +grocery +freshen +disposal +cuffs +consent +cartoon +caffeine +broom +biology +arguments +agrees +vanished +unfinished +tobacco +tin +tasty +syndrome +stack +sells +ripping +pinch +missiles +isolated +flattering +expenses +dinners +cos +colleague +ciao +buh +attorneys +woulda +whereabouts +wars +waitin +visits +truce +tripped +tee +tasted +steer +ruling +poisoning +pirate +nursing +manipulative +immature +husbands +heel +granddad +delivering +deaths +condoms +butts +automatically +anchor +addict +trashed +tournament +throne +slick +sausage +raining +prices +pasta +needles +leaning +leaders +judges +ideal +detector +coolest +casting +bean +battles +batch +approximately +appointments +almighty +achieve +vegetables +trapper +swinging +sum +spark +ruled +revolution +principles +perfection +pains +momma +mole +meow +jelly +interviews +initiative +hairs +getaway +employment +den +cracking +counted +compliments +behold +verge +tougher +timer +tapped +taped +surf +superman +stakes +specialty +snooping +shoots +semi +rendezvous +pentagon +passenger +leverage +jeopardize +janitor +grandparents +forbidden +fink +examination +communist +clueless +cities +cattle +bidding +arriving +adding +ungrateful +unacceptable +tutor +soviet +shorter +shaped +serum +scuse +savings +pub +pajamas +mouths +mojo +modest +methods +lure +jackass +irrational +galaxy +doom +depth +cries +classified +bombs +beautifully +arresting +approaching +vessel +variety +traitor +sympathetic +smug +smash +rental +prostitute +premonitions +physics +monk +mild +jumps +inventory +ing +improved +horny +doe +developing +darlin +committing +banging +asap +amendment +worms +violated +vent +traumatic +traced +tow +sweaty +shaft +recommended +rainbow +overboard +literature +insight +healed +haven +grasp +fluid +experiencing +era +crappy +crab +chunk +awww +applied +witnessed +traveled +stain +shack +reacted +pronounce +presented +poured +pervert +occupied +moms +marriages +kings +jabez +invested +handful +gob +gag +flipped +flick +fireplace +expertise +embarrassment +drum +disappears +concussion +bruises +brakes +twisting +tide +swept +summon +splitting +sneaky +sloppy +settling +scientists +reschedule +regard +purposes +notch +mustard +moose +les +improvement +hooray +grabbing +extend +exquisite +disrespect +complaints +armor +amateur +wheat +voting +sustained +stripper +straw +slapped +shipped +shattered +ruthless +refill +recorded +payroll +numb +mourning +marijuana +manly +iris +involving +hunk +graham +fountain +fellows +entertain +earthquake +drift +dreadful +doorstep +confirmation +chops +appreciates +announced +vague +tires +stressful +stem +stashed +stash +sensed +preoccupied +predictable +noticing +madly +halls +gunshot +embassy +dozens +dork +confuse +cleaners +charade +chalk +cappuccino +breed +bouquet +amulet +addiction +warming +villa +unlock +transition +satisfy +sacrificed +relaxing +lone +input +fudge +elaborate +concerning +completed +channels +category +cal +blocking +blend +blankets +addicted +yuck +voters +professionals +positions +mode +jolly +initial +hunger +hamburger +greeting +greet +gravy +gram +finance +dreamt +dice +declared +collecting +caution +bicycle +backpack +agreeing +writers +whale +tribe +taller +supervisor +starling +sacrifices +radiation +queens +poo +phew +outcome +ounce +monty +missile +meter +likewise +irrelevant +gran +felon +feature +favorites +farther +fade +experiments +erased +easiest +disk +disco +convenience +conceived +compassionate +challenged +cane +backstage +agony +adores +veins +tweek +thieves +surgical +sunrise +strangely +recital +proposing +productive +meaningful +marching +kitten +immunity +hassle +goddamned +frighten +directors +dearly +comments +closure +cease +bomber +ambition +wage +unstable +sweetness +stinky +salvage +richer +refusing +raging +pumping +pressuring +pookie +petition +nations +mortals +lowlife +jus +juicy +intimidated +intentionally +inspire +forgave +fart +devotion +despicable +deciding +dash +comfy +breach +bark +alternate +aaaah +twilight +switching +swallowed +stove +slot +screamed +scars +relevant +pounding +poof +pipes +persons +pawn +losses +legit +invest +generations +farewell +experimental +difficulty +curtains +civilized +championship +caviar +carnival +canyon +boost +blues +bliss +token +tends +temporarily +superstition +supernatural +sunk +stream +stocks +spinner +sadness +reduced +recorder +rang +psyched +presidential +owners +objects +motivated +microwave +lands +hallelujah +gap +fraternity +engines +dutch +dryer +cocoa +chewing +brake +bounty +additional +acceptable +unbelievably +survivor +smiled +smelling +sized +simpler +sentenced +respectable +remarks +registration +premises +passengers +organ +occasional +indication +gutter +grabs +goo +fulfill +flashlight +courses +chains +boxing +blooded +blink +blessings +beware +bands +advised +von +uhhh +turf +swings +software +slips +shovel +shocking +resistance +puff +privately +mirrors +lyrics +locking +karma +instrument +historical +heartless +fras +echo +decades +comparison +childish +cardiac +brace +blunt +admission +vanilla +utterly +ticked +tequila +suspension +stunned +sadly +resolution +reserved +purely +opponent +noted +mankind +lowest +kiddin +jerks +hitch +flirt +fare +extension +establishment +equals +dismiss +delayed +decade +christening +casket +broker +breakup +biting +antibiotics +accusation +abducted +witchcraft +traded +titan +thread +spelling +smelly +sharks +runnin +remaining +punching +protein +printed +paramedics +newest +murdering +masks +marathon +laptop +intact +ins +initials +heights +grampa +diaper +democracy +deceased +choking +charms +careless +bushes +buns +bummed +accounting +travels +shred +saves +saddle +rethink +regards +references +razor +precinct +pistol +persuade +patterns +meds +manipulating +llanfair +leash +housing +hearted +guarantees +fucks +folk +flown +feast +extent +educated +disgrace +determination +deposition +coverage +corridor +burial +bronze +bookstore +boil +abilities +werewolf +vitals +veil +trespassing +teaches +sidewalk +sensible +punishing +overtime +optimistic +occasions +obsessing +oak +notify +mornin +jeopardy +injection +hilarious +distinct +directed +desires +dee +dame +curve +confide +cone +challenging +cautious +alter +yada +wilderness +vindictive +vial +venture +tomb +teeny +subjects +stroll +sittin +scrub +rebuild +posters +parallel +ordeal +orbit +nuns +northern +intimacy +inheritance +feather +farmer +fails +exploded +donate +distracting +digger +despair +democratic +defended +crackers +commercials +ammunition +wildwind +virtue +thoroughly +tails +spicy +sketches +sights +sheer +shaving +seize +scarecrow +refreshing +prosecute +possess +platter +napkin +misplaced +merchandise +membership +loony +jinx +herr +heroic +fag +facial +efficient +corps +clan +bummer +boundaries +attract +arrow +ambitious +abbey +waits +virtually +syrup +solitary +shuttle +resignation +resemblance +reacting +pursuing +premature +pod +mortgage +journalist +honors +gravity +genes +flashes +erm +contribution +cheque +charts +cargo +awright +acquainted +wrapping +vest +untie +salute +ruins +resign +realised +priceless +pike +partying +myth +moonlight +lightly +lifting +keen +insisting +glowing +generator +flowing +explosives +employer +cutie +confronted +clause +cinnamon +buts +breakthrough +blouse +ballistic +assassin +antidote +analyze +allowance +adjourned +vet +unto +understatement +tucked +touchy +toll +subconscious +sparky +sequence +screws +sarge +roommates +reaches +programs +pitcher +ping +offend +nerd +knives +kin +jasmine +irresistible +inherited +incapable +hostility +goddammit +fuse +funky +frat +equation +digital +curfew +craft +chow +centered +blackmailed +allows +alleged +wealth +watcher +walkin +turtle +transmission +text +starve +sleigh +sarcastic +recess +rebound +rebel +procedures +pirates +pinned +parlor +outfits +livin +issued +institute +industrial +hoops +heartache +haired +fundraiser +dynamite +doorman +documentary +discreet +d +detect +cracks +cracker +considerate +climbed +chilly +catering +author +apophis +vacuum +urine +tunnels +tanks +strung +stitches +sordid +sark +referred +protector +portion +phoned +pets +paths +moss +mat +lengths +kindergarten +hostess +flaw +flavor +diving +discharge +consumed +confidentiality +cannon +bourbon +blizzard +automatic +amongst +yankees +woody +urban +tactics +straightened +spooky +specials +spaghetti +soil +prettier +powerless +por +poems +playin +playground +paranoia +mutant +mainly +lions +knox +jacqueline +instantly +hopeful +havoc +francis +exaggerating +evaluation +engage +eavesdropping +doughnuts +diversion +delight +deepest +dang +cutest +condom +companion +comb +bela +behaving +avoided +aspen +anyplace +agh +accessory +zap +workout +whereas +translate +titanic +stuffing +stoned +speeding +slime +royalty +polls +plaza +personalities +payments +musician +maze +marital +magician +lurking +lottery +leonardo +journalism +interior +imaginary +hog +hatch +guinea +greetings +fairwinds +ethical +equipped +environmental +elegant +elbow +customs +cuban +credibility +credentials +consistent +collapse +cloth +claws +cinderella +chopped +challenges +bridal +boards +bedside +babysitting +authorized +assumption +ant +alvarez +youngest +witty +vast +unforgivable +underworld +tempt +tabs +succeeded +splash +sophomore +shade +selfless +secrecy +santiago +runway +restless +programming +professionally +okey +nolan +movin +metaphor +messes +meltdown +lecter +jeanne +incoming +hence +glenn +gasoline +gained +funding +episodes +diefenbaker +curl +contain +comedian +collected +coconut +cam +buckle +assembly +ancestors +admired +adjustment +acceptance +weekly +warmth +venice +umbrella +tropical +thumbs +throats +slippery +shitty +seduced +reform +ranger +queer +poll +parenting +onion +noses +mobile +luckiest +hartford +graveyard +gifted +francine +footsteps +dimeras +dale +cynical +corleone +cement +bulls +bloom +assassination +wedded +watson +voyage +volunteers +verbal +unpredictable +tuned +triumph +trevor +stoop +stamps +slides +sinking +rio +rigged +regulations +region +promoted +plumbing +pimp +nell +masters +lingerie +layer +jules +hankey +greed +fluffy +flood +everwood +essential +elope +dresser +departure +dat +dances +custom +creation +coup +chauffeur +bulletin +bugged +brian +bouncing +bimbo +website +veal +tubes +temptation +supported +strangest +slammed +selection +sarcasm +sanity +sandra +rib +primitive +platform +pending +partial +packages +orderly +obsessive +newbie +nevertheless +murderers +motto +meteor +inconvenience +hottie +glimpse +froze +fiber +faggot +execute +etc +ensure +drivers +dispute +damages +crop +courageous +consulate +closes +bosses +bees +amends +wuss +wacky +unemployed +traces +testifying +tendency +syringe +symphony +stew +startled +sorrow +sleazy +shaky +screams +runner +rsquo +riddle +remark +rangers +poop +poke +pickup +nutty +mentioning +mend +menace +inspiring +impulsive +housekeeper +harvest +formed +foam +fingernails +economic +divide +conditioning +chronic +bass +baking +whine +utter +thug +submit +strap +starved +sniffing +sedative +reversed +rated +publishing +programmed +picket +paged +online +nowadays +mines +jumbo +joni +invasion +hound +homosexual +homo +hips +gilbert +forgets +flipping +flea +flatter +enters +dwell +dumpster +ducks +devlin +dent +consultant +clayton +choo +bikini +beale +banking +assignments +apartments +ants +affecting +advisor +vile +unreasonable +tossing +thanked +stereo +steals +souvenir +screening +scratched +rep +psychopath +proportion +peyton +outs +operative +obstruction +obey +neutral +maxwell +lump +lockdown +insists +harass +gloat +flights +filth +extended +electronic +edgy +donkey +diseases +didn +curtis +coroner +confessing +cologne +cedar +bruise +betraying +bailing +attempting +appealing +adebisi +wrath +wandered +waist +vain +traps +transportation +trainer +sushi +stepfather +rye +publicly +presidents +poking +obligated +monroe +medina +marshal +lemonade +instructed +hooks +heavenly +hash +halt +grim +engineer +employed +doggie +diplomatic +dilemma +crazed +contagious +coaster +cheering +carved +carpenter +butch +bundle +bubbles +blanks +approached +appearances +wrench +vomit +thingy +stadium +speeches +smashing +savior +rogue +robbing +reflect +raft +qualify +pumped +pillows +piggy +peep +pageant +packs +neo +neglected +montana +marcie +madonna +loneliness +liberal +jaye +intrude +indicates +helluva +hawkeye +gregory +gardener +freely +forresters +fatass +err +eleanor +drooling +continuing +cassandra +betcha +apollo +addressed +acquired +vase +tiffany +supermarket +squat +spitting +spice +spaces +slaves +showers +sanchez +rhyme +relieve +receipts +radical +racket +purchased +preserve +portland +pictured +pause +overdue +officials +nod +motivation +morgendorffer +lacking +kidnapper +introduction +insect +hunters +horns +feminine +eyeballs +dumps +disc +disappointing +difficulties +crock +convertible +context +claw +clamp +canned +cambias +bishop +bathtub +avanya +artery +andre +weep +warmer +vendetta +tenth +suspense +summoned +spiders +sings +reiber +reader +raving +pushy +produced +poverty +postponed +poppy +ohhhh +noooo +mold +mice +laughter +johnnie +incompetent +hugging +horizon +grove +groceries +frequency +fastest +drip +dinosaur +differ +delta +copper +communicating +clare +chi +carrier +brody +beliefs +bats +bases +auntie +adios +wraps +wiser +willingly +weirdest +waltz +voila +timmih +thinner +swelling +swat +steroids +slate +sentinel +sensitivity +scrape +rookie +rehearse +quarterback +prophecy +organic +mercedes +matched +ledge +justified +insults +increased +immortal +heavily +hateful +handles +francie +feared +einstein +doorway +decorations +colour +chatting +buyer +buckaroo +bedrooms +batting +askin +ammo +admiral +wrestle +wolves +velvet +tutoring +subpoena +stein +span +scratching +requests +privileges +pager +mart +manor +madman +knicks +kel +intriguing +idiotic +hotels +grape +granger +goofy +flexible +enlighten +dum +donuts +demonstrate +dairy +corrupt +combined +brunch +bridesmaid +barking +architect +applause +alongside +ale +acquaintance +yuh +wretched +tango +superficial +sufficient +sued +soak +smoothly +sensing +restraint +quo +posing +pleading +payoff +participate +panda +organize +morals +loans +loaf +lists +laboratory +jumpy +intervention +ignorant +herbal +hangin +germs +generosity +freed +flashing +doughnut +convent +clumsy +chocolates +captive +behaved +babes +apologise +angelus +vanity +trials +stumbled +skate +shampoo +republicans +represented +recognition +preview +poisonous +perjury +parental +onboard +mugged +minding +maestro +linen +learns +knots +jimbo +interviewing +inmates +ingredients +humour +gypsy +grind +greasy +goons +frost +estimate +elementary +drastic +dolly +database +crow +coop +comparing +cocky +clearer +cartoons +bruised +brag +bind +axe +asset +apparent +worthwhile +whoop +warner +volcano +vanquishing +towns +tabloids +survivors +sprung +spotlight +smokes +shops +sentencing +sentences +rivers +revealing +reduce +ram +racist +provoke +preacher +pining +peak +password +overly +oui +ops +mop +mayo +locket +leland +jab +imply +impatient +hovering +hotter +holland +gemini +gaines +fest +endure +dots +doren +dim +diagnosed +debts +cultures +crawled +contained +condemned +cody +chained +brit +breaths +booty +arctic +ambrosia +adds +weirdo +warmed +wand +vienna +utah +troubling +stripped +strapped +spies +soaked +skipping +scrambled +rattle +profound +perez +peoples +musta +moses +mona +mocking +mnh +misunderstand +merit +mayday +loading +linked +limousine +kacl +jody +investors +interviewed +hustle +forensic +foods +espresso +enthusiastic +duct +drawers +devastating +democrats +cosmo +conquer +concentration +comeback +clarify +chores +cheerleaders +cheaper +charter +chantal +callin +butcher +bricks +bozo +blushing +bert +barging +asia +abused +yoga +wrecking +wits +wentworth +waffles +virginity +vibes +uninvited +unfaithful +underwater +tribute +teller +strangled +sissy +scheming +ropes +responded +residents +rescuing +reel +redhead +rave +priests +postcard +peterman +overseas +orientation +onions +ongoing +newly +morphine +lotion +limitations +lilly +lesser +lent +lectures +lads +kidneys +judgement +jog +jingle +jets +itch +intellectual +installed +infant +indefinitely +hazard +grenade +glamorous +genetically +fireman +faculty +engineering +doh +discretion +delusions +declaration +crate +competent +commonwealth +catalog +breaker +blondie +bakery +attempts +asylum +argh +applying +ahhhh +wedge +warriors +wager +unfit +tuxedo +tripping +treatments +torment +superhero +stirring +spinal +sorority +sneakers +server +seminar +scenery +republic +repairs +rabble +pneumonia +perks +peaches +owl +override +ooooh +moo +mija +manslaughter +mailed +lime +lettuce +kinky +intimidate +instructor +guarded +grieve +grad +gorilla +globe +frustration +extensive +exploring +exercises +downs +doorbell +devices +deb +dam +cultural +credits +commerce +chemicals +café +authentic +arraignment +annulled +altered +allergies +wanta +verify +vegetarian +tunes +tourist +tighter +telegram +suitable +stalk +springs +specimen +spared +solving +shoo +satisfying +requesting +publisher +pharmacy + +pens +overprotective +obstacles +notified +negro +nasedo +judged +identification +grandchild +genuinely +founded +flushed +fluids +floss +escaping +dove +ditched +decorated +crunch +criticism +cramp +corny +contribute +connecting +bunk +bombing +bitten +billions +bankrupt +yikes +wrists +winners +ultrasound +ultimatum +thirst +suckers +spelled +sniff +shakes +scope +salsa +retrieve +releasing +reassuring +pumps +properties +predicted +pigeon +neurotic +negotiating +multi +monitors +millionaire +microphone +mechanical +limp +incriminating +hiking +hatchet +gracias +fills +feeds +doubting +dedication +decaf +competing +cellular +carbon +butterfly +bumper +biopsy +whiz +voluntarily +visible +ventilator +unpack +unload +universal +tomatoes +toad +targets +taco +suggests +strawberry +spooked +snitch +showtime +sap +reassure +providing +prey +persuasive +pancake +mystical +mysteries +mixing +mayhem +matrimony +marines +mails +magnet +lighthouse +liability +jock +headline +groovy +gangster +factors +explosive +explanations +dispatch +detailed +curly +cupid +condolences +comrade +bulb +bragging +awaits +assaulted +ambush +aircraft +adolescent +adjusted +abort +yank +whit +verse +vaguely +undermine +tying +trim +swamped +sunlight +stitch +stabbing +sphere +slippers +slash +sincerely +sigh +setback +secondly +rotting +rev +retail +prospect +proceedings +preparation +precaution +pox +pearls +pcpd +parks +nonetheless +melting +materials +marler +mar +liaison +lair +hots +hooking +headlines +haha +hag +grapes +genie +fury +felicity +fangs +expelled +encouragement +earring +dreidel +draws +dory +donut +dis +dictate +dependent +decorating +cunt +cope +coordinates +cola +cocktails +cocksucker +bumps +blueberry +blackout +believable +backfired +backfire +apron +anticipated +amigo +adjusting +activated +vous +vouch +voodoo +vitamins +vista +vintage +urn +uncertain +ummm +tourists +tattoos +surrounding +stern +sponsor +slimy +singles +sibling +shhhh +restored +representative +renting +reign +publish +planets +pickle +peculiar +parasite +noo +marries +mailbox +magically +lovebirds +listeners +knocks +intel +informant +hicks +grain +fearless +exits +elf +drazen +distractions +disconnected +dinosaurs +designing +dashwood +crooked +crook +conveniently +contents +colon +barber +argued +ziggy +wink +warped +underestimated +testified +tacky +substantial +steering +staged +stability +shoving +shaved +seizure +reset +repeatedly +radius +pushes +pitching +pairs +painter +opener +notebook +mornings +moody +mash +investigations +invent +indulge +horribly +hallucinating +festive +feathers +eyebrows +expand +enjoys +dictionary +dialogue +desperation +dealers +darkest +daph +critic +cowboys +consulting +canal +boragora +belts +bananas +bagel +authorization +auditions +associated +ape +agitated +adventures +withdraw +wishful +wimp +violin +vehicles +vanish +unbearable +tonic +tackle +suffice +suction +sporting +slaying +safest +rocking +relive +rates +puttin +puppies +prettiest +polo +oval +oatmeal +noisy +newlyweds +nauseous +moi +misguided +mildly +midst +maps +liable +judgmental +introducing +indy +individuals +hunted +hen +givin +frequent +fisherman +fascinated +elephants +dislike +diploma +deluded +decorate +crummy +contractions +carve +careers +bottled +bonded +birdie +bash +whites +unavailable +twenties +trustworthy +translation +traditions +surviving +surgeons +stupidity +snoop +skies +secured +salvation +remorse +preferably +pies +photography +outsider +operational +nuh +northwest +nausea +napkins +mule +mourn +melted +mechanism +mashed +maiden +mafia +inherit +holdings +hel +greatness +golly +girlie +excused +edges +dumbo +drifting +delirious +damaging +cubicle +crawley +compelled +comm +colleges +chooses +checkup +certified +candidates +buffet +boredom +bandages +bah +automobile +athletic +alarms +absorbed +absent +yessir +windshield +whaddya +vitamin +viper +transparent +surprisingly +sunglasses +starring +spears +slit +sided +serenity +schemes +roar +relatively +quarry +prosecutor +prognosis +probe +potentially +poodle +pitiful +persistent +perception +percentage +peas +oww +nosy +neighbourhood +nagging +morons +molecular +meters +masterpiece +martinis +limbo +liars +karate +irritating +inclined +hump +hoynes +holler +hazel +haw +gauge +functions +fiasco +fallout +educational +eatin +dumbass +donated +destination +dense +crimson +continent +concentrating +commanding +colorful +clam +cider +brochure +behaviour +barto +bargaining +awe +artistic +arena +wiggle +welcoming +weighing +villain +vein +vanquished +striking +stains +sooo +snacks +smear +sire +secondary +roughly +rituals +resentment +psychologist +preferred +pint +pension +penguin +passive +panther +overhear +origin +orchestra +negotiations +mounted +morality +leopard +labs +kisser +jackpot +icy +hoot +hippie +handshake +grilled +functioning +formality +elevators +drums +depths +confirms +civilians +bypass +briefly +breeding +boxer +boathouse +binding +audio +acres +accidental +wacko +ulterior +transferring +tis +thugs +thighs +tangled +stirred +sought +softball +snag +smallest +sling +sleaze +shells +seeds +rumour +ripe +remarried +reluctant +regularly +puddle +promote +precise +popularity +pins +perceptive +oral +miraculous +memorable +maternal +lookout +longing +lockup +locals +lizard +librarian +knights +junkie +inspection +impressions +immoral +hypothetically +guarding +gourmet +fighters +fees +features +faxed +extortion +expressed +essentially +downright +digest +der +crosses +cranberry +covert +costa +chorus +casualties +bygones +buzzing +burying +bugger +bikes +attended +wells +weary +visa +viewing +viewers +uptown +transmitter +trains +tickle +tart +taping +takeout +sweeping +stepmother +stating +stale +señor +settles +seating +seaborn +resigned +rating +pros +porno +plumber +pissing +pilots +pepperoni +ownership +occurs +newborn +nada +merger +mandatory +ludicrous +injected +heating +geeks +forged +faults +expressing +drue +dire +dief +deceiving +centre +celebrities +caterer +carrots +calmed +businesses +budge +bridges +applications +ankles +vending +typing +tribbiani +swift +squared +speculation +snowing +shades +sexist +scattered +sanctuary +saints +rewrite +regretted +regain +raises +processing +picky +orphan +nipples +nam +mural +misjudged diff --git a/ethstore/src/account/safe_account.rs b/ethstore/src/account/safe_account.rs index 3b3dcf2ee..56e8494f7 100644 --- a/ethstore/src/account/safe_account.rs +++ b/ethstore/src/account/safe_account.rs @@ -66,7 +66,7 @@ impl Into for SafeAccount { json::KeyFile { id: From::from(self.id), version: self.version.into(), - address: self.address.into(), //From::from(self.address), + address: self.address.into(), crypto: self.crypto.into(), name: Some(self.name.into()), meta: Some(self.meta.into()), @@ -150,13 +150,16 @@ impl SafeAccount { } } - pub fn from_file(json: json::KeyFile, filename: String) -> Self { + /// Create a new `SafeAccount` from the given `json`; if it was read from a + /// file, the `filename` should be `Some` name. If it is as yet anonymous, then it + /// can be left `None`. + pub fn from_file(json: json::KeyFile, filename: Option) -> Self { SafeAccount { id: json.id.into(), version: json.version.into(), address: json.address.into(), crypto: json.crypto.into(), - filename: Some(filename), + filename: filename, name: json.name.unwrap_or(String::new()), meta: json.meta.unwrap_or("{}".to_owned()), } diff --git a/ethstore/src/dir/disk.rs b/ethstore/src/dir/disk.rs index f06870b76..1351ae217 100644 --- a/ethstore/src/dir/disk.rs +++ b/ethstore/src/dir/disk.rs @@ -87,7 +87,7 @@ impl DiskDirectory { .zip(paths.into_iter()) .map(|(file, path)| match file { Ok(file) => Ok((path.clone(), SafeAccount::from_file( - file, path.file_name().and_then(|n| n.to_str()).expect("Keys have valid UTF8 names only.").to_owned() + file, Some(path.file_name().and_then(|n| n.to_str()).expect("Keys have valid UTF8 names only.").to_owned()) ))), Err(err) => Err(Error::InvalidKeyFile(format!("{:?}: {}", path, err))), }) diff --git a/ethstore/src/ethstore.rs b/ethstore/src/ethstore.rs index 689248bae..f2a3a2b78 100644 --- a/ethstore/src/ethstore.rs +++ b/ethstore/src/ethstore.rs @@ -24,7 +24,9 @@ use ethkey::{Signature, Address, Message, Secret}; use dir::KeyDirectory; use account::SafeAccount; use {Error, SecretStore}; +use json; use json::UUID; +use presale::PresaleWallet; pub struct EthStore { dir: Box, @@ -89,6 +91,23 @@ impl SecretStore for EthStore { Ok(address) } + fn import_presale(&self, json: &[u8], password: &str) -> Result { + let json_wallet = try!(json::PresaleWallet::load(json).map_err(|_| Error::InvalidKeyFile("Invalid JSON format".to_owned()))); + let wallet = PresaleWallet::from(json_wallet); + let keypair = try!(wallet.decrypt(password).map_err(|_| Error::InvalidPassword)); + self.insert_account(keypair.secret().clone(), password) + } + + fn import_wallet(&self, json: &[u8], password: &str) -> Result { + let json_keyfile = try!(json::KeyFile::load(json).map_err(|_| Error::InvalidKeyFile("Invalid JSON format".to_owned()))); + let mut safe_account = SafeAccount::from_file(json_keyfile, None); + let secret = try!(safe_account.crypto.secret(password).map_err(|_| Error::InvalidPassword)); + safe_account.address = try!(KeyPair::from_secret(secret)).address(); + let address = safe_account.address.clone(); + try!(self.save(safe_account)); + Ok(address) + } + fn accounts(&self) -> Result, Error> { try!(self.reload_accounts()); Ok(self.cache.read().unwrap().keys().cloned().collect()) diff --git a/ethstore/src/lib.rs b/ethstore/src/lib.rs index 010052f18..a1131073e 100644 --- a/ethstore/src/lib.rs +++ b/ethstore/src/lib.rs @@ -18,6 +18,7 @@ #![cfg_attr(feature="nightly", plugin(serde_macros))] extern crate libc; +extern crate itertools; extern crate rand; extern crate time; extern crate serde; @@ -25,6 +26,8 @@ extern crate serde_json; extern crate rustc_serialize; extern crate crypto as rcrypto; extern crate tiny_keccak; +#[macro_use] +extern crate lazy_static; // reexport it nicely extern crate ethkey as _ethkey; @@ -48,4 +51,5 @@ pub use self::ethstore::EthStore; pub use self::import::import_accounts; pub use self::presale::PresaleWallet; pub use self::secret_store::SecretStore; +pub use self::random::random_phrase; diff --git a/ethstore/src/random.rs b/ethstore/src/random.rs index e0a7f52c7..1d050e422 100644 --- a/ethstore/src/random.rs +++ b/ethstore/src/random.rs @@ -15,6 +15,7 @@ // along with Parity. If not, see . use rand::{Rng, OsRng}; +use itertools::Itertools; pub trait Random { fn random() -> Self where Self: Sized; @@ -37,3 +38,25 @@ impl Random for [u8; 32] { result } } + +/// Generate a string which is a random phrase of a number of lowercase words. +/// +/// `words` is the number of words, chosen from a dictionary of 7,530. An value of +/// 12 gives 155 bits of entropy (almost saturating address space); 20 gives 258 bits +/// which is enough to saturate 32-byte key space +pub fn random_phrase(words: usize) -> String { + lazy_static! { + static ref WORDS: Vec = String::from_utf8_lossy(include_bytes!("../res/wordlist.txt")) + .split("\n") + .map(|s| s.to_owned()) + .collect(); + } + let mut rng = OsRng::new().unwrap(); + (0..words).map(|_| rng.choose(&WORDS).unwrap()).join(" ") +} + +#[test] +fn should_produce_right_number_of_words() { + let p = random_phrase(10); + assert_eq!(p.split(" ").count(), 10); +} \ No newline at end of file diff --git a/ethstore/src/secret_store.rs b/ethstore/src/secret_store.rs index 09de71718..6d5649b37 100644 --- a/ethstore/src/secret_store.rs +++ b/ethstore/src/secret_store.rs @@ -21,6 +21,10 @@ use json::UUID; pub trait SecretStore: Send + Sync { fn insert_account(&self, secret: Secret, password: &str) -> Result; + fn import_presale(&self, json: &[u8], password: &str) -> Result; + + fn import_wallet(&self, json: &[u8], password: &str) -> Result; + fn accounts(&self) -> Result, Error>; fn change_password(&self, account: &Address, old_password: &str, new_password: &str) -> Result<(), Error>; diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 9a85cea1d..e4d6e1061 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -17,6 +17,7 @@ jsonrpc-http-server = { git = "https://github.com/ethcore/jsonrpc-http-server.gi ethcore-io = { path = "../util/io" } ethcore-util = { path = "../util" } ethcore = { path = "../ethcore" } +ethstore = { path = "../ethstore" } ethash = { path = "../ethash" } ethsync = { path = "../sync" } ethjson = { path = "../json" } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index fe3e0f909..9322d8dbc 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -30,6 +30,7 @@ extern crate jsonrpc_http_server; extern crate ethcore_util as util; extern crate ethcore_io as io; extern crate ethcore; +extern crate ethstore; extern crate ethsync; extern crate transient_hashmap; extern crate json_ipc_server as ipc; diff --git a/rpc/src/v1/impls/ethcore.rs b/rpc/src/v1/impls/ethcore.rs index f5045e53c..117228fcc 100644 --- a/rpc/src/v1/impls/ethcore.rs +++ b/rpc/src/v1/impls/ethcore.rs @@ -19,6 +19,7 @@ use util::{RotatingLogger}; use util::misc::version_data; use std::sync::{Arc, Weak}; use std::collections::{BTreeMap}; +use ethstore::random_phrase; use ethcore::client::{MiningBlockChainClient}; use jsonrpc_core::*; use ethcore::miner::MinerService; @@ -165,4 +166,11 @@ impl Ethcore for EthcoreClient where M: MinerService + 'static, C: M Some(ref queue) => to_value(&queue.len()), } } + + fn generate_secret_phrase(&self, params: Params) -> Result { + try!(self.active()); + try!(expect_no_params(params)); + + to_value(&random_phrase(12)) + } } diff --git a/rpc/src/v1/impls/personal.rs b/rpc/src/v1/impls/personal.rs index 26156ca23..56e5587d7 100644 --- a/rpc/src/v1/impls/personal.rs +++ b/rpc/src/v1/impls/personal.rs @@ -24,7 +24,7 @@ use v1::helpers::{errors, TransactionRequest as TRequest}; use v1::helpers::params::expect_no_params; use v1::helpers::dispatch::unlock_sign_and_dispatch; use ethcore::account_provider::AccountProvider; -use util::Address; +use util::{Address, KeyPair}; use ethcore::client::MiningBlockChainClient; use ethcore::miner::MinerService; @@ -89,6 +89,32 @@ impl Personal for PersonalClient where C: MiningBl ) } + fn new_account_from_phrase(&self, params: Params) -> Result { + try!(self.active()); + from_params::<(String, String, )>(params).and_then( + |(phrase, pass, )| { + let store = take_weak!(self.accounts); + match store.insert_account(*KeyPair::from_phrase(&phrase).secret(), &pass) { + Ok(address) => to_value(&RpcH160::from(address)), + Err(e) => Err(errors::account("Could not create account.", e)), + } + } + ) + } + + fn new_account_from_wallet(&self, params: Params) -> Result { + try!(self.active()); + from_params::<(String, String, )>(params).and_then( + |(json, pass, )| { + let store = take_weak!(self.accounts); + match store.import_presale(json.as_bytes(), &pass).or_else(|_| store.import_wallet(json.as_bytes(), &pass)) { + Ok(address) => to_value(&RpcH160::from(address)), + Err(e) => Err(errors::account("Could not create account.", e)), + } + } + ) + } + fn unlock_account(&self, params: Params) -> Result { try!(self.active()); from_params::<(RpcH160, String, Option)>(params).and_then( diff --git a/rpc/src/v1/traits/ethcore.rs b/rpc/src/v1/traits/ethcore.rs index a5032d3e2..73411a584 100644 --- a/rpc/src/v1/traits/ethcore.rs +++ b/rpc/src/v1/traits/ethcore.rs @@ -67,6 +67,9 @@ pub trait Ethcore: Sized + Send + Sync + 'static { /// Returns error when signer is disabled fn unsigned_transactions_count(&self, _: Params) -> Result; + /// Returns a cryptographically random phrase sufficient for securely seeding a secret key. + fn generate_secret_phrase(&self, _: Params) -> Result; + /// Should be used to convert object to io delegate. fn to_delegate(self) -> IoDelegate { let mut delegate = IoDelegate::new(Arc::new(self)); @@ -86,6 +89,7 @@ pub trait Ethcore: Sized + Send + Sync + 'static { delegate.add_method("ethcore_defaultExtraData", Ethcore::default_extra_data); delegate.add_method("ethcore_gasPriceStatistics", Ethcore::gas_price_statistics); delegate.add_method("ethcore_unsignedTransactionsCount", Ethcore::unsigned_transactions_count); + delegate.add_method("ethcore_generateSecretPhrase", Ethcore::generate_secret_phrase); delegate } diff --git a/rpc/src/v1/traits/personal.rs b/rpc/src/v1/traits/personal.rs index 9c16f692f..82ce70dbc 100644 --- a/rpc/src/v1/traits/personal.rs +++ b/rpc/src/v1/traits/personal.rs @@ -25,8 +25,17 @@ pub trait Personal: Sized + Send + Sync + 'static { fn accounts(&self, _: Params) -> Result; /// Creates new account (it becomes new current unlocked account) + /// Param is the password for the account. fn new_account(&self, _: Params) -> Result; + /// Creates new account from the given phrase using standard brainwallet mechanism. + /// Second parameter is password for the new account. + fn new_account_from_phrase(&self, _: Params) -> Result; + + /// Creates new account from the given JSON wallet. + /// Second parameter is password for the wallet and the new account. + fn new_account_from_wallet(&self, params: Params) -> Result; + /// Unlocks specified account for use (can only be one unlocked account at one moment) fn unlock_account(&self, _: Params) -> Result; @@ -51,6 +60,8 @@ pub trait Personal: Sized + Send + Sync + 'static { delegate.add_method("personal_signerEnabled", Personal::signer_enabled); delegate.add_method("personal_listAccounts", Personal::accounts); delegate.add_method("personal_newAccount", Personal::new_account); + delegate.add_method("personal_newAccountFromPhrase", Personal::new_account_from_phrase); + delegate.add_method("personal_newAccountFromWallet", Personal::new_account_from_wallet); delegate.add_method("personal_unlockAccount", Personal::unlock_account); delegate.add_method("personal_signAndSendTransaction", Personal::sign_and_send_transaction); delegate.add_method("personal_setAccountName", Personal::set_account_name); diff --git a/util/src/crypto.rs b/util/src/crypto.rs index 0c05d804d..0d5b7fb14 100644 --- a/util/src/crypto.rs +++ b/util/src/crypto.rs @@ -134,6 +134,29 @@ impl KeyPair { public: p, }) } + + + // TODO: move to ethstore/secret.rs once @debris has refactored necessary dependencies into own crate + /// Convert the given phrase into a secret as per brain-wallet spec. + /// Taken from https://github.com/ethereum/wiki/wiki/Brain-Wallet + /// Note particularly secure for low-entropy keys. + pub fn from_phrase(phrase: &str) -> KeyPair { + let mut h = phrase.as_bytes().sha3(); + for _ in 0..16384 { + h = h.sha3(); + } + loop { + let r = KeyPair::from_secret(h); + if r.is_ok() { + let r = r.unwrap(); + if r.address()[0] == 0 { + return r; + } + } + h = h.sha3(); + } + } + /// Create a new random key pair pub fn create() -> Result { let context = &SECP256K1; @@ -443,6 +466,11 @@ mod tests { assert_eq!(pair.public().hex(), "101b3ef5a4ea7a1c7928e24c4c75fd053c235d7b80c22ae5c03d145d0ac7396e2a4ffff9adee3133a7b05044a5cee08115fd65145e5165d646bde371010d803c"); } + #[test] + fn test_key_from_phrase() { + assert_eq!(KeyPair::from_phrase("correct horse battery staple").address(), "0021f80b7f29b9c84e8099c2c6c74a46ed2268c4".into()); + } + #[test] fn ecies_shared() { let kp = KeyPair::create().unwrap();