Re: encryption with python?

2005-09-16 Thread Paul Rubin
Robert Kern <[EMAIL PROTECTED]> writes: > > http://www.nightsong.com/phr/crypto/p3.py > > [Ed Hotchkiss wrote:] > > Awesome. I just started Python today so I'd have no idea ... how good is > > this encryption compared to PGP? p3.py's functionality is nothing like PGP: it just encrypts character s

Re: encryption with python?

2005-09-16 Thread Larry Bates
I've successfully used this toolkit to implement AES encryption in a recent project. http://www.amk.ca/python/code/crypto -Larry Bates Robert Kern wrote: > Ed Hotchkiss wrote: > >>What's the best module for encryption with python, anyone out there >>using py

Re: encryption with python?

2005-09-15 Thread Robert Kern
[Me:] > Probably the simplest encryption module would be Paul Rubin's p3.py . > It only requires the standard library. > > http://www.nightsong.com/phr/crypto/p3.py [Ed Hotchkiss wrote:] > Awesome. I just started Python today so I'd have no idea ... how good is > this encryption compared to PGP?

Re: encryption with python?

2005-09-15 Thread Ed Hotchkiss
  Awesome. I just started Python today so I'd have no idea ... how good is this encryption compared to PGP? Any info on using this file? Didn't see any on this guys site ...   On 9/16/05, Robert Kern <[EMAIL PROTECTED]> wrote: Ed Hotchkiss wrote:> Gmail was just an example, I just wanted to learn t

Re: encryption with python?

2005-09-15 Thread Robert Kern
Ed Hotchkiss wrote: > What's the best module for encryption with python, anyone out there > using python and encryption together? It depends on what your needs are. What do you need to accomplish? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass gro

encryption with python?

2005-09-15 Thread Ed Hotchkiss
What's the best module for encryption with python, anyone out there using python and encryption together?-- edward hotchkiss -- http://mail.python.org/mailman/listinfo/python-list

Re: encryption with python

2005-09-12 Thread Steven D'Aprano
Thank you to Mike Meyer, Kirk Sluder, and anyone who made constructive comments and/or corrections to my earlier post about generating student IDs as random numbers. Especially thanks to Marc Rintsch who corrected a stupid coding mistake I made. Serves me right for not testing the code. Kirk poin

Re: encryption with python

2005-09-11 Thread Ron Adam
Kirk Job Sluder wrote: > Ron Adam <[EMAIL PROTECTED]> writes: >>I would think that any n digit random number not already in the data >>base would work for an id along with a randomly generated password >>that the student can change if they want. The service provider has >>full access to the data

Re: encryption with python

2005-09-10 Thread Kirk Job Sluder
Ron Adam <[EMAIL PROTECTED]> writes: > Kirk Job Sluder wrote: > > > They want to be able to get their information by > > calling a phone number and saying a few words/phrases they memorized in > > childhood. Given the current market, it seems to be cheaper to deal > > with breaks after the fact

Re: encryption with python

2005-09-10 Thread Kirk Job Sluder
Paul Rubin writes: > Kirk Job Sluder <[EMAIL PROTECTED]> writes: > > Likewise, credit companies are currently making money hand-over-fist. > > If an identity is compromised, it's cheaper for them to just close the > > account, refund the money, and do their own fraud inv

Re: encryption with python

2005-09-10 Thread Ron Adam
James Stroud wrote: > On Saturday 10 September 2005 15:02, Ron Adam wrote: > >>Kirk Job Sluder wrote: >>I would think that any n digit random number not already in the data >>base would work for an id along with a randomly generated password that >>the student can change if they want. The service

Re: encryption with python

2005-09-10 Thread James Stroud
On Saturday 10 September 2005 16:30, Paul Rubin wrote: > The info to be combined was the student's birthdate.  Why would the TA > have access to either that or the SSN? Speaking as a former TA, we had all that and a little more, if I remember correctly. The "why" aspect is a little beyond me. Ja

Re: encryption with python

2005-09-10 Thread Paul Rubin
James Stroud <[EMAIL PROTECTED]> writes: > Yes and no. Yes, you are theoretically correct. No, I don't think > you have the OP's original needs in mind (though I am mostly > guessing here). The OP was obviously a TA who needed to assign > students a number so that they could "anonymously" check th

Re: encryption with python

2005-09-10 Thread James Stroud
On Saturday 10 September 2005 15:02, Ron Adam wrote: > Kirk Job Sluder wrote: > I would think that any n digit random number not already in the data > base would work for an id along with a randomly generated password that > the student can change if they want. The service provider has full > acce

Re: encryption with python

2005-09-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > last_number_used = 12345 > usable_IDs = [] > > def make_studentID(): > global last_number_used > global usable_IDs > if not usable_IDs: > # generate another batch of IDs in random order > usable_IDs = range(last_number_u

Re: encryption with python

2005-09-10 Thread Ron Adam
Kirk Job Sluder wrote: > The only way to keep confidential stuff secure is to shred it, burn it, > and grind the ashes. > > I think the fundamental problem is that that most customers don't want > actual security. They want to be able to get their information by > calling a phone number and sa

Re: encryption with python

2005-09-10 Thread Paul Rubin
Kirk Job Sluder <[EMAIL PROTECTED]> writes: > I'm more than happy to agree to disagree on this, but I see it > differently. In aviation there certainly is a bit of risk-benefit > analysis going on in thinking about whether the cost of a given safety > is justified given the benefits in risk reduct

Re: encryption with python

2005-09-10 Thread James Stroud
On Saturday 10 September 2005 14:01, Kirk Job Sluder wrote: > Providing any kind of access to data involves creating a security hole. > This is the biggest flaw in most discussions of computer security. On 9/9/05 Steven D'Aprano wrote: > There are "one-way" encryption functions where the result ca

Re: encryption with python

2005-09-10 Thread Robert Kern
Kirk Job Sluder wrote: > Paul Rubin writes: > >>Kirk Job Sluder <[EMAIL PROTECTED]> writes: >>We're told there is already a secure database in the picture >>somewhere, or at least one that unescapeably contains cleartext SSN's, >>so that's the system that should assign t

Re: encryption with python

2005-09-10 Thread Kirk Job Sluder
Paul Rubin writes: > Kirk Job Sluder <[EMAIL PROTECTED]> writes: > We're told there is already a secure database in the picture > somewhere, or at least one that unescapeably contains cleartext SSN's, > so that's the system that should assign the ID numbers and handle >

Re: encryption with python

2005-09-10 Thread Paul Rubin
Kirk Job Sluder <[EMAIL PROTECTED]> writes: > You have a client on the phone who needs access to information, but has > forgotten or lost the 10-digit unique ID and the PIN you gave them two > years ago. How do you provide that client with the information he or > she needs? This is the kind of di

Re: encryption with python

2005-09-10 Thread Kirk Job Sluder
Paul Rubin writes: > Kirk Job Sluder <[EMAIL PROTECTED]> writes: > > Well, there is a form of security design that involves one-way > > encryption of confidential information. You might want to be able to > > search on SSN, but not have the actual SSN stored in the data

Re: encryption with python

2005-09-10 Thread Kirk Job Sluder
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Wed, 07 Sep 2005 14:31:03 -0700, jlocc wrote: > > > Basically I will like to combine a social security number (9 digits) > > and a birth date (8 digits, could be padded to be 9) and obtain a new > > 'student number'. It would be better if the origi

Re: encryption with python

2005-09-09 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Wed, 07 Sep 2005 14:31:03 -0700, jlocc wrote: >> Basically I will like to combine a social security number (9 digits) >> and a birth date (8 digits, could be padded to be 9) and obtain a new >> 'student number'. It would be better if the original num

Re: encryption with python

2005-09-09 Thread Steven D'Aprano
On Wed, 07 Sep 2005 14:31:03 -0700, jlocc wrote: > Basically I will like to combine a social security number (9 digits) > and a birth date (8 digits, could be padded to be 9) and obtain a new > 'student number'. It would be better if the original numbers can't be > traced back, they will be kept i

Re: encryption with python

2005-09-09 Thread Steven D'Aprano
On Wed, 07 Sep 2005 15:52:19 -0700, James Stroud wrote: > Also, I should note that the sha function will, to the limits of anyone's > ability to analyze it, decouple the information from the hash. So, to be > careful, you should keep the algorithm to generate the IDs secret. Security by obscuri

Re: encryption with python

2005-09-07 Thread Steve Holden
Paul Rubin wrote: > James Stroud <[EMAIL PROTECTED]> writes: > >>Then your best bet is to take a reasonable number of bits from an sha hash. >>But you do not need pycrypto for this. The previous answer by "ncf" is good, >>but use the standard library and take 9 digits to lessen probability for

Re: encryption with python

2005-09-07 Thread Paul Rubin
James Stroud <[EMAIL PROTECTED]> writes: > Then your best bet is to take a reasonable number of bits from an sha hash. > But you do not need pycrypto for this. The previous answer by "ncf" is good, > but use the standard library and take 9 digits to lessen probability for > clashes > > import s

Re: encryption with python

2005-09-07 Thread James Stroud
Also, I should note that the sha function will, to the limits of anyone's ability to analyze it, decouple the information from the hash. So, to be careful, you should keep the algorithm to generate the IDs secret. The advantage of creating an ID from info in this way is that the ID is ("should

Re: encryption with python

2005-09-07 Thread James Stroud
On Wednesday 07 September 2005 14:31, [EMAIL PROTECTED] wrote: > Basically I will like to combine a social security number (9 digits) > and a birth date (8 digits, could be padded to be 9) and obtain a new > 'student number'. It would be better if the original numbers can't be > traced back, they w

Re: encryption with python

2005-09-07 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Basically I will like to combine a social security number (9 digits) > and a birth date (8 digits, could be padded to be 9) and obtain a new > 'student number'. It would be better if the original numbers can't be > traced back, they will be kept in a database anyways. Hop

Re: encryption with python

2005-09-07 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Basically I will like to combine a social security number (9 digits) > and a birth date (8 digits, could be padded to be 9) and obtain a new > 'student number'. It would be better if the original numbers can't be > traced back, they will be kept in a database anyways. Ho

Re: encryption with python

2005-09-07 Thread jlocc
Basically I will like to combine a social security number (9 digits) and a birth date (8 digits, could be padded to be 9) and obtain a new 'student number'. It would be better if the original numbers can't be traced back, they will be kept in a database anyways. Hope this is a bit more specific, th

Re: encryption with python

2005-09-07 Thread James Stroud
This is either a very simple or a very open-ended question you have asked. Do you want to be able to recover the original numbers arbitrarily from the combination? What properties do you want the combination to have? Do you want to take the combination and a number and see if the number is in th

Re: encryption with python

2005-09-07 Thread ncf
Steve M wrote: > >My goal is to combine two different numbers and > encrypt them to create a new number that cann't be traced back to the > originals. > > Here's one: > def encrypt(x, y): > """Return a number that combines x and y but cannot be traced back > to them.""" > return x + y Or y

Re: encryption with python

2005-09-07 Thread Steve M
>My goal is to combine two different numbers and encrypt them to create a new number that cann't be traced back to the originals. Here's one: def encrypt(x, y): """Return a number that combines x and y but cannot be traced back to them.""" return x + y -- http://mail.python.org/mailman/l

Re: encryption with python

2005-09-07 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Hi! > > I was wondering if someone can recommend a good encryption algorithm > written in python. My goal is to combine two different numbers and > encrypt them to create a new number that cann't be traced back to the > originals. > > I

Re: encryption with python

2005-09-07 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: > I was wondering if someone can recommend a good encryption algorithm > written in python. > It would be great if there exists a library already written to do this, > and if there is, can somebody please point me to it?? M2Crypto, interface to OpenSSL http://sand

encryption with python

2005-09-07 Thread jlocc
Hi! I was wondering if someone can recommend a good encryption algorithm written in python. My goal is to combine two different numbers and encrypt them to create a new number that cann't be traced back to the originals. It would be great if there exists a library already written to do this, and

Re: Encryption with Python?

2005-06-01 Thread Anthra Norell
y which I wish my idea to be judged. I never intended to dabble in commercial cryptography.) - Original Message - From: "Christos TZOTZIOY Georgiou" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Friday, May 27, 2005 11:52 AM Subject: Re: Encryption with

Re: Encryption with Python?

2005-05-27 Thread TZOTZIOY
On 26 May 2005 14:45:28 -0700, rumours say that Paul Rubin might have written: >> That's all. I see you took up the challenge and indirectly replied to >> my last question, and in good spirit I say you earned a little respect >> from me, at least for standing up to your

Re: Encryption with Python?

2005-05-26 Thread Paul Rubin
Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> writes: > That's all. I see you took up the challenge and indirectly replied to > my last question, and in good spirit I say you earned a little respect > from me, at least for standing up to your words. Now I hope no-one > gives a try to your data

Re: Encryption with Python?

2005-05-26 Thread TZOTZIOY
On Tue, 24 May 2005 10:16:15 +0200, rumours say that "Anthra Norell" <[EMAIL PROTECTED]> might have written: >Why whack someone over the head who tries to develop an idea of his own. >Such an approach isn't uncommon to earn extra credit in educational >settings. I would never whack someone over t

Re: Encryption with Python?

2005-05-24 Thread James Stroud
while i < len (string): > chunk = random.randint (0, CHUNK) > s_ = list (string [i:i+chunk]) > l = len (s_) > l_ = range (l) > s__ = l * [None] > o = preprocess_sequence (l_) > s_ = process_sequence (s_) >

Re: Encryption with Python?

2005-05-24 Thread Anthra Norell
_ [o[ii]] = s_ [ii] s += ''.join (s__) i += l return s - Original Message - From: "Christos TZOTZIOY Georgiou" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Friday, May 13, 2005 11:06 AM Subject: Re: Encryption with Python? > On

Re: Encryption with Python?

2005-05-14 Thread Philippe C. Martin
Hi, I am a very happy user of http://www.amk.ca/python/code/crypto.html Regards, Philippe Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong fil

Re: Encryption with Python?

2005-05-13 Thread hemanth
Anthra Norell wrote: > Thanks a lot for the feedback. This is certainly a great learning > experience. It's a fascinating topic too. Without wishing to annoy, I'd be > interested in knowing more. I insert questions below. > > You can google your questions and you will find them out answered in man

Re: Encryption with Python?

2005-05-13 Thread TZOTZIOY
On Sat, 7 May 2005 13:51:40 +0200, rumours say that "Anthra Norell" <[EMAIL PROTECTED]> might have written: >Here's the challenge. Prove this breakable > >'\x10\x88d\x1d\xba\xa1\xdcK\x05w\x02/s\xa7Q0\xeb8\xb6Gx\xef\xcb\x1e=\xf5\x7f >\x9bI\xcb(\x87>\xa5\x04\xc1soF\xfd\xc6\xc6\xd9|\x971\xdb\xcdT\tw#

Re: Encryption with Python?

2005-05-11 Thread Robert Kern
Peter Hansen wrote: >>Education is a process one must engage in. You don't just step in it. > > The education to which I was referring was that which _most_ of us just > received by reading Paul's and your replies, not from anything in the > OP's postings. ;-) Okay, I'll buy that. :-) -- R

Re: Encryption with Python?

2005-05-11 Thread Peter Hansen
Robert Kern wrote: > Peter Hansen wrote: > >> Back to Paul's question then: why use an unreliable and >> probably-useless-for-all-but-spawning-lengthy-but-educational-threads >> encryption method when there are relatively reliable and, uh, less >> discussed and non-edifying, uh... well, you get

Re: Encryption with Python?

2005-05-10 Thread Robert Kern
Peter Hansen wrote: > Back to Paul's question then: why use an unreliable and > probably-useless-for-all-but-spawning-lengthy-but-educational-threads > encryption method when there are relatively reliable and, uh, less > discussed and non-edifying, uh... well, you get the picture. ;-) Well, I'

Re: Encryption with Python?

2005-05-10 Thread Peter Hansen
Anthra Norell wrote: > From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> >>.. >>Since good encryption schemes that don't have significant performance >>penalties are widely available, why mess with a crap scheme EVER? Why >>use a solution that "might or might not be adequate" when you can us

Re: Encryption with Python?

2005-05-10 Thread Anthra Norell
Original Message - From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> Newsgroups: comp.lang.python To: Sent: Tuesday, May 10, 2005 12:59 AM Subject: Re: Encryption with Python? > .. > Since good encryption schemes that don't have significa

Re: Encryption with Python?

2005-05-09 Thread Paul Rubin
"Anthra Norell" <[EMAIL PROTECTED]> writes: > I don't follow. There is no bitwise correlation between a plain-text > character and its encoded equivalent. What's more, there is no detectable > correlation at all. Your question was how could you tell if two ciphertexts were encrypted with the same

Re: Encryption with Python?

2005-05-09 Thread Anthra Norell
Paul, I thank you too for your response. Let me just tell you what goes through my mind. - Original Message - From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> Newsgroups: comp.lang.python To: Sent: Monday, May 09, 2005 9:45 PM Subject: Re: Encryptio

Re: Encryption with Python?

2005-05-09 Thread Paul Rubin
"Anthra Norell" <[EMAIL PROTECTED]> writes: > The non-randomness of the difference is evidence of having guessed the key, > right? Why then do I need two samples? If I hack away at a single sample I > get a probably more conspicuous non-randomness twice as fast. No. Let's say you encrypt two asci

Re: Encryption with Python?

2005-05-09 Thread Anthra Norell
Robert, Thanks a lot for your thorough explanations. - Original Message - From: "Robert Kern" <[EMAIL PROTECTED]> To: Sent: Saturday, May 07, 2005 3:18 PM Subject: Re: Encryption with Python? ( snip ) > >>You do realize that if I have two ciphertext

Re: Encryption with Python?

2005-05-07 Thread Philippe C. Martin
PS: remmember that single DES has been brocken. If you're also interested in signature, this is an interesting article (a big upsate if true) http://it.slashdot.org/article.pl?sid=05/02/16/0146218&tid=93 Regards, Philippe Philippe C. Martin wrote: > I use http://www.amk.ca/python/code/crypto.

Re: Encryption with Python?

2005-05-07 Thread Philippe C. Martin
I use http://www.amk.ca/python/code/crypto.html Regards, Philippe Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong file encryption in Python?

Re: Encryption with Python?

2005-05-07 Thread Robert Kern
ot;Robert Kern" <[EMAIL PROTECTED]> > To: > Sent: Saturday, May 07, 2005 11:11 AM > Subject: Re: Encryption with Python? > > > >>Anthra Norell wrote: >> >>>I rolled my own for relatively short sequences, like passwords. The key > > is &

Re: Encryption with Python?

2005-05-07 Thread Sergei Organov
"Anthra Norell" <[EMAIL PROTECTED]> writes: > Thanks a lot for the feedback. This is certainly a great learning > experience. It's a fascinating topic too. Without wishing to annoy, I'd be > interested in knowing more. I insert questions below. There is a lot of information about the issues on th

Re: Encryption with Python?

2005-05-07 Thread Jim
What machine did you say that was, again? Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Encryption with Python?

2005-05-07 Thread Anthra Norell
nt: Saturday, May 07, 2005 11:11 AM Subject: Re: Encryption with Python? > Anthra Norell wrote: > > I rolled my own for relatively short sequences, like passwords. The key is > > an integer. To decrypt use the negative encryption key. I consider the > > encryption unbrea

Re: Encryption with Python?

2005-05-07 Thread Robert Kern
Anthra Norell wrote: > I rolled my own for relatively short sequences, like passwords. The key is > an integer. To decrypt use the negative encryption key. I consider the > encryption unbreakable, as it is indistinguishable from a random sequence. > > Frederic > > ### > > def crypt (sequence, ke

Re: Encryption with Python?

2005-05-07 Thread Paul Rubin
"Anthra Norell" <[EMAIL PROTECTED]> writes: > I rolled my own for relatively short sequences, like passwords. The > key is an integer. To decrypt use the negative encryption key. I > consider the encryption unbreakable, as it is indistinguishable from > a random sequence. You're using the built-in

Re: Encryption with Python?

2005-05-07 Thread Anthra Norell
be used. If passed they are positivized rather than rejected. """ ### - Original Message - From: "Blake T. Garretson" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Thursday, May 05, 2005 10:20 PM Subject: Encryption with Python? > I want

Re: Encryption with Python?

2005-05-07 Thread Henk-Jan de Jong
Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong file encryption in Python? Any > modern block cipher will do: AES, Blowfish, etc. I'm not looking

Re: Encryption with Python?

2005-05-06 Thread Ivan Voras
Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong file encryption in Python? Any > modern block cipher will do: AES, Blowfish, etc. I'm not looking

Re: Encryption with Python?

2005-05-05 Thread Steve Christensen
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > "Blake T. Garretson" <[EMAIL PROTECTED]> writes: > >> I found a few modules out there, but they seem to be all but abandoned. >> Most seem to have died several years ago. The most promising package >> is A.M. Kuchling's Python Cryptography Tool

Re: Encryption with Python?

2005-05-05 Thread Fredrik Lundh
Blake T. Garretson wrote: > I found a few modules out there, but they seem to be all but abandoned. > Most seem to have died several years ago. a lack of recent releases can also mean that they just work... > Is this the defacto Python encryption solution? What does everyone > else use? Any o

Re: Encryption with Python?

2005-05-05 Thread Paul Rubin
"Blake T. Garretson" <[EMAIL PROTECTED]> writes: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong file encryption in Python? Any > modern block cipher will do: AES, Blowfish,

Re: Encryption with Python?

2005-05-05 Thread phil
Bill Gates us MD5. Hah! Sorry. :-) Blake T. Garretson wrote: > I want to save some sensitive data (passwords, PIN numbers, etc.) to > disk in a secure manner in one of my programs. What is the > easiest/best way to accomplish strong file encryption in Python? Any > modern block cipher will do:

Encryption with Python?

2005-05-05 Thread Blake T. Garretson
I want to save some sensitive data (passwords, PIN numbers, etc.) to disk in a secure manner in one of my programs. What is the easiest/best way to accomplish strong file encryption in Python? Any modern block cipher will do: AES, Blowfish, etc. I'm not looking for public key stuff; I just want