important programming languages
Kirby Urner
urner at alumni.princeton.edu
Mon Dec 11 12:13:45 EST 2000
Tuomas Pellonpera <tuope at my-deja.com> wrote:
>4.) Can Python be used in encryption? If so, IS it being used, too? :)
I've read the comments to date and found much to agree with.
Python is extended by writing methods in C in a particular way,
and then importing the API -- meaning a lot of what you do in
Python ends up running as native C, and so is relatively fast.
So as a Python programmer, you can piggyback on what's already
been written in C to extend Python. In this connection, you
already have access to A.M. Kuchling's crypto library:
http://weathership.homeport.org/~adam/crypto/python.phtml
When it comes to learning programming, I agree that Python
provides a clean, well-designed syntax. So even though
pure Python source code would be too slow for most practical
crypto applications, you might usefully learn the guts of
an algorithm that way -- knowledge you could then transfer
to another language (even Assembler).
In this sense, training in Python helps you think the way a
programmer thinks. Then you can branch into C/C++ or Java
or whatever (or pick them up simultaneously, if you're impatient
to get on with it).
Case in point: I've just recently implemented the Blowfish
algorithm in pure Python, in the context of a larger math-
oriented curriculum which uses Python as the core teaching
language. Yes, it's slow, and minimal (no CBC, no key-from-
passphrase generator) but it works (runs through the test
vectors properly, encrypts/decrypts binary data files,
like GIFs).
I think someone new to crypto, and to programming in general,
could pick up some valuable experience studying such material
(which is why I write it). Plus some of the math stuff I do
on other pages (e.g. using Python's big number capabilities)
provides useful background (as an earlier poster said, you
need some theory, not just programming language smarts, when
it comes to crypto).
Here's the URL (posted about it a couple days ago here on
sci.crypt as well, inviting comments):
http://www.inetarena.com/~pdx4d/ocn/clubhouse.html
<SOAP BOX>
I'm a big fan of the computer-at-your-elbow approach to
studying math concepts, and am frustrated that classroom
teachers seem stuck on an evolutionary plateau with graphing
calculators. Calculators are cool, but a lot of school
districts have pumped big bucks into computers, and now
feel ripped off because Johnny only uses them to run CDROM
page-turner software or play games, and Sally just wants
to download MP3s.
But that's a failure of the curriculum, not the technology.
Kids _could_ be learning real programming languages, and
math class (not necessarily some separate computer science
elective, which many schools don't offer) would be the
logical place to get this going.
What we're talking about here is basic numeracy, and in
this day and age, that includes having knowledge of computer
concepts as well as math concepts (a lot of the walls
between math and computer science are very artificial to
begin with, especially at the elementary level, where
overspecialization is only destructive -- is enforced
mostly to protect a woefully obsolete status quo curriculum).
Teachers mostly won't support this "math through programming"
approach unless the text books publishers do, but the text
book upgrade cycle is way way too slow. Enter the web, and
the option to drive the upgrade cycle on "internet time".
More on all this:
http://www.oreillynet.com/pub/a/python/2000/10/04/pythonnews.html
</SOAP BOX>
Kirby
More information about the Python-list
mailing list