| Welcome to Crypto. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| A tutorial in programming crypto with Python | |
|---|---|
| Tweet Topic Started: Jul 23 2009, 01:37 AM (10,843 Views) | |
| jdege | Jul 23 2009, 01:37 AM Post #1 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
We were talking about introductory tutorials in programming for crypto, with mention of Python. After some discussion of what I thought was often missing from introductory tutorials, I decided to write one myself. It's starting with a somewhat higher expectation of background. It assumes you know a bit about programming, and have some familiarity with cryptanalysis of simple substitution ciphers. Crypto Programming using Python |
| When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. | |
![]() |
|
| mosher | Jul 23 2009, 04:57 AM Post #2 |
|
Super member
![]() ![]() ![]() ![]() ![]() ![]()
|
Although I have not yet had the opportunity to work through the tutorial step-by-step, it is very impressive. It has a clean format, is informative, and carries a lot of "from the trenches" tips. There is plenty of "meat on the bones" -- well done! |
![]() |
|
| jdege | Jul 23 2009, 12:22 PM Post #3 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
The format is docbook's, with a bit of css tweaking. |
| When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. | |
![]() |
|
| nullsole | Jul 27 2009, 08:39 PM Post #4 |
|
Member
![]() ![]() ![]() ![]()
|
jdege, Thanks for the new tutorial! I am enjoying it and working my way through it. I'm liking Python, not that I have experience in other languages, but it seems really robust - with some batteries included. I'm drilling myself on learning how to make the language do what I want/need. Your tutorial is very clear and very useful for starting that tool set the forum has been discussing. I hope to have a nice block of time over the weekend to really come to terms with all this great Python info! Thanks for putting together such a helpful resource. These programing tutorials are like the Lanki tutorials -- they will become classic! Thanks again! BTW - Had a good laugh at the Python cartoon in the other thread!
|
![]() |
|
| jdege | Jul 28 2009, 04:41 PM Post #5 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I want to thank you for your kind words, but comparing what I've done to Lanaki's lessons is hyperbole of the worst sort. There's a scope and breadth to what he has done that I haven't come close to matching. |
| When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. | |
![]() |
|
| nullsole | Jul 30 2009, 07:46 PM Post #6 |
|
Member
![]() ![]() ![]() ![]()
|
Actually, I was thinking more of the future. Along the lines of what mosher had said:
More hoping that many more will be added to the list and that will make it all a collection for the new programmer of classical cipher systems to get a grip on the basics. Didn't mean to offend. Should have been clearer - in that it would be great, and the way the thread developed with mosher and osric and yourself, that maybe a collection would be built and maintained that would *in time*, hopefully, grow and be used as much as and be as important to new programmers in crypto -- as the Lanaki files are to all that begin crypto. Hope that is a bit clearer. |
![]() |
|
| nullsole | Sep 18 2009, 01:14 AM Post #7 |
|
Member
![]() ![]() ![]() ![]()
|
Ok, maybe Lanaki was a bit much .... however ... you all could work out an updated series of programming exercises and statements to update and refresh -- say the Basic programes of Caxton Foster. NOT the same programs but all the basics one who is trying (like myself and hopefully others) to incorporate pencil and paper to computer. So far what has been presented has been GREAT!!! However, being new to programming and having chosen Python (Free all platforms can do a lot batteries included) ...... I'm struggling now with something (I'm sure simple to all of you programmers) but in the approach to things - For example -- I would love to write a simple aid (Oh, and I'm not even getting into the auto-solvers) but the 'aids' - the first step in moving folks from pencil/paper to letting the computer assist. Anyway -- I've been thing about the Baconian cipher. Now that seems to me to be easy to at least set up in some way to find the crib - to maybe find the confilicts. But I don't know how to approach this. Us beginners need help in the how to approach these things. Like if you know what you need to do with p/p how do you translate that to the computer. Does it mean you have to pick a specific language? I don't know. I now most things have been done in Basic , but I don't know basic. And if anyone is interested in bring people new to programming in the loop - today - Basic would not be the choice. Python seems pretty good, but I don't know. It's being used a lot in university for beginning computer science so it must be ok. It's free on all platforms. Anyway .... I can't succinctly what I'm hoping would come about --- not just for me, but for folks that are on the verge --- they use the computer and want to do some of the tedium/clerical work with computer .... seems to be a good option. But the key thing, that I find hard to find without a specific book (yet to be written!!) is how to approach such problems .... where to start. Like the simple Baconian -- yes, I can do it with paper and pencil --- but it seems so perfect for a computer setup. Maybe not even the whole solution -- but a way to place the crib -- Anyway ... I am still struggling to learn Python and am grateful for anything on crypto - ACA crypto in particular - and the pickings are slim. The two great tutorials already mentioned are WONDERFUL. Honestly - one of you guys/gals need to make a simple ebook or regular book for how to use the computer - this day and age - with the ciphers of ACA -- without giving up all the auto-solver stuff --- but the usual tools and steps one needs to make to all the CE ciphers in order to get them ready to solve. Just my ramblings ... hope to hear for you all |
![]() |
|
| jdege | Sep 18 2009, 04:16 AM Post #8 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Actually, I've been thinking about doing exactly that, for a couple of years, now. The problem is that I keep finding more stuff I need to learn before I'll be ready to write it. |
| When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. | |
![]() |
|
| mosher | Sep 21 2009, 11:15 AM Post #9 |
|
Super member
![]() ![]() ![]() ![]() ![]() ![]()
|
nullsole, I just received a notification to ACA members, written by David Lambert, which may interest you and others:
Enjoy, Moshe |
![]() |
|
| nullsole | Mar 1 2015, 12:36 AM Post #10 |
|
Member
![]() ![]() ![]() ![]()
|
Since this was posted, I have since taken several MOOC python/computer science courses with the last one being the MIT 6.001x - 6.002x courses. I also took two linear algebra courses and a few other math oriented ones. I was hoping there were more available -- and in particular, Jdege, was wondering if you ever got to that ebook that was mentioned in this thread? Seriously, after several courses (MOOC) I revisited your tutorial, and I was able to grasp so much more and also learn so much more about classes and what-not with Pyhton. Mostly I wanted to thank you for making the tutorial and hope you will continue with the idea of making an ebook (or other) on solving classical ciphers with Python - or better - something about the tools needed for solving ciphers. This time around I got the most from your tutorial on the part about programming the IC and the FREQ analysis. Not that I haven't been able to do freq analysis before -- but the 'special' needs of a particular cipher were in terms of using the IC and frequency analysis were wonderful. Anyway, hope the ebook/book on this is still going on .... If classical cryptanalysis is to survive, I think we need the direction of making tools for our hobby in a current general language (python). |
![]() |
|
| jdege | Mar 2 2015, 07:32 PM Post #11 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I've piled so much stuff on my "I have to do that someday" pile, I have little hope of ever getting around to it. |
| When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Tutorials · Next Topic » |





![]](http://z2.ifrm.com/static/1/pip_r.png)



7:08 PM Jul 11