"be consistent" | |
PerlMonks |
Perl uses for Cryptograms - Part 0: Introduction (low Perl content)by goibhniu (Hermit) |
on Aug 28, 2007 at 18:42 UTC ( [id://635665]=CUFP: print w/replies, xml ) | Need Help?? |
My hobby is CryptogramsI've alwasy been fascinated by cool technologies for the "keepers of secrets". As a kid I dreamed of being a spy of some sort. I invented cryptic alphabets and code books. In my "Walter Mitty" moments, I have to admit, I still do. About a year ago I stumbled across the American Cryptogram Association. This group of people has a lot of fun with Cryptograms and ciphers of all types. Their long catalogue of cipher types is a gold mine for a former crypto-kid such as myself. What really got me hooked was the "Solve a Cipher" page. "New Puzzle" generates a cryptogram. Clicking letters in the Ciphertext alphabet and the (hopefully) corresponding plaintext alphabet fills in the cryptogram automatically to show your progress (or your mistakes).
When you join the ACA, you get 6 issues of their magazine, the Cryptogram, per year and you get to pick a "NOM" (I love it - it makes me feel like I have a spy operational code name). This is when I first picked out "Goibhniu" as an pseudonym. My hobby is Cryptograms, not CryptographyI think it's worth noting that this hobby is about Cryptograms. It is a hobby. These days you can not trust your secrets to pencil-and-paper ciphers. If you're looking for information on security, check out RSA or Bruce Schneier. The stuff I'm doing here is more akin to Crowssword puzzles than security. AristocratsThe simplest cipher is a mono-alphabetic substitution cipher. In in the ACA, it's called an Aristocrat. One ciphertext alphabet is mapped letter for letter to one plaintext alphabet and either the ciphertext, plaintext or both alphabets are scrambled. Then each plaintext letter is substituted by its corresponding ciphertext letter in the message. The Cryptogram contains about 25 of these per issue. When solved each reveals a cute quote. They increase in difficulty from A-1 to A-25. I've been doing them for about a year and I'm just getting to the point of finishing (almost) all of them. According to the ACA handbook Aristocrats can be keyed in a variety of ways, but mostly it involves scrambling an alphabet thusly (A Handbook for Members of The American Cryptogram Association, page 26): The alphabet is keyed by writing an arbitrary keyword or phrase followed by the rest of the alphabet in normal order. A letter occurring more than once is omitted after the first occurrence. It turns out that Perlmonks has already discussed this in this thread by Anonymous Monk: Remove repeated characters from a string Perl and CryptogramsThis brings me back to what I'm about in this series of nodes. In the process of working on cryptograms (well, Aristocrats, as I haven't really progessed past this yet), I've heard and answered the Siren call of Perl, and I'm sure most monks have already written at least a regex (if not a full-blown module) in their heads just from reading this. Perl seems very well suited to this hobby. In a way, I'm a little worried that Perl is too well suited to this hobby. I think a lot of PerlMonks will be asking why I haven't (or offering how I could) just solved the whole puzzle with the program. If I'm holding back it's partly because I still want to enjoy the puzzle part. What I'm presenting are more like tools for helping the human solve the cryptograms rather than solvers. Still, I wouldn't want my intent to quash creativity, so go ahead and respond with whatever your muse leads you to. PerlMonks and CryptogramsWhat I intend to do is present a topic in my cryptogram hobby in each subsequent node, discuss how I've used Perl to address that topic and invite Perl monks to improve on that idea. I have in mind about four more articles that will lead to about four different areas of Perl. Hopefully, as I progress in my hobby, I can also present more advanced uses of Perl. Up votes or down votes don't so much matter to me (though I admit the XP system here is oddly addictive). If I had "Best Node of the year" somewhere in here and no one replied to, discussed or shared how they were inspired by it, I'd consider it a failure. What I hope to accomplish for Perlmonks is some interesting discussion and sharing of ideas. I humbly seek wisdom.
Back to
Cool Uses for Perl
|
|