Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Adam
On 14/03/06, Adam <[EMAIL PROTECTED]> wrote: > Here's something you might find useful they've just started a series > on cryptography on this site, you can read them or listen to a > podcast. > D'oh! Would help if I actually stuck the link in http://www.grc.com/SecurityNow.htm#30 __

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Adam
Here's something you might find useful they've just started a series on cryptography on this site, you can read them or listen to a podcast. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Danny Yoo
> Yes - at the moment this is just a way for me to begin to get my head > around how cryptography works from anabsolutely ludicrously basic > position. This all started because I couldn't get my head around the > difference between an encryption algorithm and the key. I thought that > by writing

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Danny Yoo
> As a side note, remember that that xor-ing a key with a message is > trivial to break (it's just a variation on the Vigenere cipher first > published in 1568). So don't use if for any real applications. Hi Matthew, Counterpoint: think of "one-time pads". http://en.wikipedia.org/wiki/One-

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Steve Nelson
On 3/14/06, Steve Nelson <[EMAIL PROTECTED]> wrote: > On 3/14/06, Danny Yoo <[EMAIL PROTECTED]> wrote: > > > The idea is to unpack four single characters as a single 4-byte integer. > > That's really useful, thanks, as I was planning to iterate over each > letter and call ord() Ok, so experimentin

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Steve Nelson
On 3/14/06, Matthew Webber <[EMAIL PROTECTED]> wrote: > As a side note, remember that that xor-ing a key with a message is trivial > to break (it's just a variation on the Vigenere cipher first published in > 1568). So don't use if for any real applications. Yes - at the moment this is just a way

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Matthew Webber
f Of Steve Nelson Sent: 14 March 2006 15:29 To: tutor@python.org Subject: [Tutor] Iterate over letters in a word Hello, I'm trying to work on some programs to help me understand ciphers and ultimately cryptography. I've understood so far, that a simple form of bit-level cryptography is t

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Steve Nelson
On 3/14/06, Danny Yoo <[EMAIL PROTECTED]> wrote: > The idea is to unpack four single characters as a single 4-byte integer. That's really useful, thanks, as I was planning to iterate over each letter and call ord() > This kind of transformation is reversable: Highly useful. Thanks very much in

Re: [Tutor] Iterate over letters in a word

2006-03-14 Thread Danny Yoo
> "Hello Tutors!" could be split into: > > "Hell" "o Tut" "ors!" > > and xor'd with "beer" > > I think I understand how xor works (thanks to an earlier post) but I'm > not sure how to iterate over each letter in a string. What is the > recommended way to do this? The xor bitwise operator works wi

[Tutor] Iterate over letters in a word

2006-03-14 Thread Steve Nelson
Hello, I'm trying to work on some programs to help me understand ciphers and ultimately cryptography. I've understood so far, that a simple form of bit-level cryptography is to split the original message into chunks the same length as a 'key' and then do an xor. I'm trying to keep this really si