Using CPA4 to crack the classic cipher algorithm

Source: Internet
Author: User
Tags greatest common divisor

Here is a cipher encrypted by the classic cipher algorithm (the encryption algorithm is unknown):

Yvvnerujjvnywhbdvkpchfgvjtzwqsuporqfzpoekkjgziicdwwkeejdsruef

Whwseyejejhnaeepjbjwnuztavjswrthswlcdxqrnoclsodkrrfjtfhlfznbx

Wyvdwdcwyzqlqrnevuiiienxzmwtdsyhgstwmvznrvhyihhcxjijhiojphvjw

Srpejwnhrhirqbcdwnzqmwjpoibnbjdeshloewcfdhvzjgtdwsvntydyweyll

Gjrrohfuyplppzrssvniejxhzjtrwyvvdecpttrieevhzlxsvunstovzwjfsa

Svlsgzjcvwmseioidhsywsddisrjadhkcideivjzwwsfqjcwphvwtdtkatkjg

Zjwfpjbjbofwgochaegfhmyodpjbkwtfukcixokkrseoaegbcdanjitckxaco

Xvvdajdqgfxetrrskdewlwgketronoesoddshfxezqiitpeulshfdeiftiepr

Pvkcfpbroqwechroqcwbadhfbuwlcwmokshzojkfnkzqlojhanbjfzjhvuxdr

Neklrskdezqiswwtzjfpcamfufqvolrwjgkreewzfvesrvftzbauhasckpdhs

Hzjskuzqkkrydawecjlvyqfjdlfysuwcfxwgvhajwbsvgbvwbsvjaegtqkkbv

Ufhkdezufbzwnwrthswlcdhouamplshvdrrqyvvnejkjhiwiehiwiwnzdskfi

Eershyatvfmbzyacdxdvytjrkqfwcylsunkmvqxtfktsdqzektaxxhwkokefz

Cxukvustefzffzcuwfpjbjbofwgochwyrjjvnsrbxhywtkkjavjsxdrsrjdkk

Jkfieevlodaaihyvvoadhmojylvdwzpjemhwkfnkvgnbrlrfijgjeoedqseri

Irsavjtjkjhfhdwlkotkmrvritdajztavjswrthswlckfgxnonqtjvntyhqoj

Pfvzistwdvvnhywsewgstkmvdsmdkrvvnazhaiwthyamvqxurienrrsewrvsm

Mjecroqmuefwhwseptfpjbrjdkkjafnekkjkfieevlodadvyjzflskkjafnez

Wngwqlcrkggaczinqzpivvyvrprvtzwiaaulktvneewfdgnorfmtikmrftotd

Jlvyzzgejddwerocojmswlcrwprokvwgochtyhwsjjogrnbkenxutigenxlyo

Chuegjfkdejdrstwtvjtfpphvrgjzkujsmmjecroiwwbeihsqvoaihtbcutyh

Xhrntzqldfenkwmswkrdhwgknibhwocoogrnbkotfnjmkwcklhocziwijfvjc

Vvfbuprrlswecmvwmcuotrnjomarpvnaghevafaghekkjdzcgplshyamzgizv

Zrzoqgjdetrshzjuvgdclnedraskdakiwcdwmvqxhiwielsujasjltbrjdprz

Fvhojwbvvnervlsearroqmjlernnbxbeddqsghaphwguknkwjbupotdwsrxol

Wyvzokzqicwyodsjhzpimhssjoiedboiiugptfryeyrusjphrwismalfsrsep

Ielywrpimhxzzgekkjkfieevkcfpbroqqfwcylsutkuivjwepeyufbnditkbo

Jwtkhsrvzbpztavjoeodkzhlyhqdkknruwcnphvjfdsatnhjbkdefsucipuel

Ywvoawitfuadkrrocaaegksdwlvftotdejrkqfqrjhdcldamhlfvwttrfqyas

Kkfhljdvuxhrjdkkjkfieevlodalznjoepoeltqrxrzqnweetrodcilhzondg

Abvulsikozqkfrjcvvfwuioidhssqtnkfhjprznjgdaijzmseoodhysrisfuh

Zlxstktcjahvdiqfwcyhxbfpbrvjrfjaivzafneosjfzanthgikkncbgstwuj

Hyvvuhrsuseposhrsewszvfwuxewrwskdexdrszodziksiankdsrkdakvhzvw

Rkrjjvnyfqjplptyhtdgkrkxswkeejdktfndvgyctkatkjgjdoloibkxeulkt

Vneewtdgkrkxswkeejitfrhlkkjufopvoyvrpmfufqvesgujotdiejnggwrkl

Hicwrcbaocqasojwephvpnruhevdxhndeihqokalpztavjswrthswlckfgdwd

Vgwodwtzfxhiedvvnfrjffujlripchkwvhdjztavjsedywfjacwjodofirroc

Hcrwjufnivvxhrntzqlokqaegnhjjakltbrhlvdlivberwzfvotvdrgzjtyhk

Wiotulawjeoedsrrjokkjfwevvlshyasvftbuzimlxwfjnfwycdankltbrpok

Dqtlpsroysrisjswsrzatutgjboluiwwbeihshcaaxxjrzrijltbjwtwlwgkc

Lrqhszpsvdxmwkrnhxhvnnjwthvjdkryvzjkkkfhkdijlxotkmgojhvhyulkt

Vneewhicpuihgikdoehxhcuajdswkwlzdskywtjwwitgmvwmsdkskzjfvphvv

Nazhailywvosrliafnathusfllvdwsnwrddsrrlpirfqywbchfbuphvujgekp

Cdhsndeihyvrpijdxqcaaidxwebofwgochwydywjavzgjbkpodhnbkahidswj

Wgzjfbkecgdxgzknwrwtfktsdqzrhemhqcwenkhwsjptydygknucbtikotrqi

Wecsghhwwecroqmrioejyvvsodhshykuxknhjylvdwhywtkknggwsjltbtwri

Ljgrlokhshzwlnknqyesfqqmekwshnbxqnkdudvzhfsjtlhlpwmwjyoluxszo

Aelrdfntrqygkapkrboizskkngdwhuljafdadpfrbdaelfavibvuttkdezufb

Zwnwdxkfieevhcdiikwjswqlcbfuiaejznhyphvitfdarzwfzpwnuffbrzatr

Fqysodhsgwkokefzcdajiqclnijkjrzjrvfjbkueruxoeznfzfrruszwxhyam

Fvydflucdwggkrkdrceciidswrjwfpjbjdejdnrzpsroxcfjefiyvvbamrzfz

Pejstfkoffurijhidztavjbvffijatyhdoiaacotkvztfsqopshzojkvwrzql

Oyaauvhoibmfkfadwdbkfbzwljrgsceemhxhywttrrpzjakltbfbdvyjzflmv

Qyqfqrjhxoezeclystkmghywkeoevqwbanvaymvwrjintrqwfpjbjsoioiwef

Oigfbkdewlwgksodhsgnkrcghigdecgnbkdedlircaervyoiatyhbopboizff

Uboiwmsiagzrswkoaxujokkpgrwhljikbycrptidhhgqbclhcgenzrshfsodh

Sgwkokefzcwnudqgfboiijarhedlircaervysijtvdrgkksyrbhyaiivyfvjg

Kkxoxwievywepeiqfhzknrotdgknvqygjdetrsqcqdvg

Cracking process:

1. First determine whether it is single table or multi-table encryption, by counting the letter frequency

Copy the ciphertext to ciphertext, click on the left Freq, there is the function of counting the letter frequency.

Statistical results:

A 120 0.034

B 91 0.026

C 105 0.030

D 178 0.051

E 178 0.051

F 164 0.047

G 99 0.028

H 180 0.051

I 148 0.042

J 205 0.058

K 201 0.057

L 111 0.032

M 55 0.016

N 113 0.032

O 146 0.041

P 85 0.024

Q 82 0.023

R 193 0.055

S 168 0.048

T 139 0.039

U 87 0.025

V 177 0.050

W 210 0.060

X 63 0.018

Y 97 0.028

Z 126 0.036

You can choose to display it in the form of a chart:

can see the letter frequency distribution of the more average, no character probability is very high or low probability, so guess this is a multi-table encryption cipher. (Because single-table encryption usually shows the language's characteristics)

Now that the multi-table encryption is known, what kind of multi-table encryption algorithm?

The actual approach can only be tried.

First, assume that this is a ciphertext encrypted by the Vigenere cipher algorithm:

To determine the length of the key first

Using The Kasiski of the CAP, I learned

String Distance

YVV 273

YVV 707

YVV 868

YVV 1953

YVV 2765

YVV 3101

Distance to YVV: 434 595 1680 2492 2828

Greatest common Divisor is 7 .

Guess the length of the key is 7

Then use the low Freq of the CAP .

Enter the length of the key 7, the possible key given is forward.

Using the vigenere Cipherof the CAP , input keyword:forward, the original text is

There is very few people as entitledtoanalysethesimilaritiesanddif
Ferencesbetweenmensandwomensfootballascarolinamoracefollowing
Ayearplayingcareerduringwhichshebecamewidelyrecognisedasthegr
Eatestitalianwomaninhistoryinshebeganacoachingcareerthatinclu
Dedashortbutpioneeringstintatthehelmofamensclubseriecsviterbe
Seinsincethenmoracehasmadeanameforherselfasoneofthetopcoaches
Inwomensfootballandatvcommentatorforbothmensandwomensfootball
Shehasalsobecomethefirstitalianwomantobeinductedintohercountr
Ysfootballinghalloffameandallthatwhileworkingaslawyerinherspa
Retimetheindefatigablemoraceslatestventureisasafifadevelopmen
Tinstructorhavingjustconductedacourselastweekbetweenandoctobe
Rattheiranianfootballacademyintehranthereshetrainediranianwom
Enonthetechnicalaspectsofcoachingwomensfootballnotjustfootbal
Lbutspecificallywomensfootballwhoeversaysthatthemensgameandth
Ewomensgamearethesamehasclearlyneverworkedinaprofessionalenvi
Ronmentshetoldfifacomasmuchaswomensfootballhasgrownoverthelas
Tfewdecadesithasntbecomeanymoresimilartothemensgamewomenareph
Ysicallydifferenttomenandthemorethewomensgamedevelopsthemorei
Tisfullofspecificitiesthatrequireadifferentapproachfromacoach
Justlikesayinvolleyballorbasketballtheresnopointingroupingita
Llunderthesamecategorytheobviousphysicaldifferencesareonlythe
Startingpointtheformerstrikeralsopointstokeytacticaldifferenc
Esandtrainingmethodstakeaverysimpleexamplethepiggyinthemiddle
Drillsshecontinuedyouremovethatfromamenstrainingsessionandyou
Relostwhereasgenerallyspeakingfemaleplayersdonttendtocareabou
Tthiskindofcompetitivenessinawarmupmoracehopesthatdevelopment
Initiativeslikethewomensfootballcoachingcourseintehranwhichwa
Sattendedbywomenonlywillhelptonarrowthegapbetweentheopportuni
Tiesaffordedtomaleandfemalecoachesofcourseyouhavegreatcoaches
Thatunderstandthewomensgamelikeantoniocabriniinitalyorphilipp
Ebergerooinfrancesaidmoracebutwhatstrikesmeiswhensometeamsorc
Lubschooseheadcoachesnotbasedonarsumorexperiencebutonlybecaus
Etheyhappentobemenasisaidbeforethegameisdifferentandthatsclea
Rtoeveryonebuttheopportunitiesaffordedtocoachesshouldntbediff
Erentopportunitiesforallthegospelthatmoraceispreachingisparti
Cularlyvaluableinthemiddleeastwherelatelywomensfootballhasmad
Edramaticstridesiranforexamplefieldswomensnationalteamsfromal
Lcategoriesstartingatuanditsnationalleaguefeaturesteamsinthef
Irstdivisionandanotherfiveintheseconddivisionnottomentionatot
Alfutsalteamsspreadacrossfourdifferentleaguedivisionsatfirstg
Lanceitseasyforwesternstotendtothinkthatthisisacompletelydiff
Erentculturebuthonestlyasanitalianwhatstruckmethemostwerethes
Imilaritiessaidmoracepeoplearewarmandapproachableandtheresnop
Lacewherethatisasclearasinfootballwhatisevidenttomeintehranis
Agiganticpassionforfootballalevelofinterestthatstrulyoutstand
Ingspecificallyamongthewomenthoughitsclearthatthispassioncarr
Iesapotentialwhichisonlynowbeinguntappedhopefullythiscourseis
Animportantsteptowardsthismahdiemohammadkhaniamemberoftheiran
Ianfaswomenscommitteefullyagreeswiththeformeritalyandcanadaco
Achwomensfootballhasflourishedinrecentyearsandnowadaysitsthem
Ostpopularsportamongiranianwomenshesaiditsalsooneofthefavouri
Tesportsformuslimwomenbecausetheyareallowedtoplaywhilewearing
Aheadscarfmohammadkhanialsobelievesthatcombinationofdevelopme
Ntcoursesandelitecompetitionslikenextyearsfifauwomensworldinj
Ordanthefirstwomensworldcupheldinthemiddleeastarethewayforwar
Dfortheregionitsagreatopportunitytoattractpublicopiniontowome
Nsfootballandalsoforfemalemiddleeasternteamstoshowtheirstreng
thsagainstinternationalopponentssheconcluded

If the translation is found to be meaningful, the ciphertext is cracked.

If the translation is found to be meaningless, it is necessary to assume a different encryption algorithm and use the corresponding decryption method according to the assumed algorithm.

Using CPA4 to crack the classic cipher algorithm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.