Jump to content

Caesar Cipher Problem Python

zarrexx
Go to solution Solved by DXMember,

ummm what?

you'd have construct an English dictionary that contains most used words and try all possible shifts on a part of the cyphered text until all of it matches to the English dictionary and then use the same value to decrypt the whole text

you don't determine the Ceaser shift value, you try to guess it by trail and error

Hi, I'am currently trying so solve a problem, and in it I have to write a program that determines the Caesar shift value, So far my program works although its only if I input my own shift value("key" in my program). But it cant determine what shift value a text file must have to decrypt it.

 

Link to comment
Share on other sites

Link to post
Share on other sites

ummm what?

you'd have construct an English dictionary that contains most used words and try all possible shifts on a part of the cyphered text until all of it matches to the English dictionary and then use the same value to decrypt the whole text

you don't determine the Ceaser shift value, you try to guess it by trail and error

CPU: Intel i7 5820K @ 4.20 GHz | MotherboardMSI X99S SLI PLUS | RAM: Corsair LPX 16GB DDR4 @ 2666MHz | GPU: Sapphire R9 Fury (x2 CrossFire)
Storage: Samsung 950Pro 512GB // OCZ Vector150 240GB // Seagate 1TB | PSU: Seasonic 1050 Snow Silent | Case: NZXT H440 | Cooling: Nepton 240M
FireStrike // Extreme // Ultra // 8K // 16K

 

Link to comment
Share on other sites

Link to post
Share on other sites

Easier method to decipher a Cesar Cipher is to analyse the frequency of characters, and match them to the distribution of letters in normal text. This would work best if you have a large body of text to decipher.

Video on Khan Academy about the Cesar Cipher and how it is most easily cracked.

So thanks for reading guys, if this post sucked, I'm not sure what you can do, but if you liked it, go 'head and hit that like button, or maybe add me as a friend. Otherwise, go subscribe to LinusTechTips on YouTube, follow them on Twitch, follow @LinusTech on Twitter, and support them by using their affiliate code on Amazon, buying a cool T-shirt, or supporting them directly on this community forum.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×