ANN: A new library for encryption and signing has been released.

2021-12-05 Thread Vinay Sajip via Python-list
A new library called pagesign (Python-age-sign) has been released on PyPI [1]. It covers similar functionality to python-gnupg, but uses the modern encryption tool age [2] and the modern signing tool minisign [3]. The initial release allows you to: * Create and manage identities (which are

Recommendation on best cross-platform encryption package

2020-01-22 Thread Malcolm Greene
Is the cryptography package still considered the "best" cross-platform package for encrypting sensitive data being stored in files on disk. Use case: JSON data files containing potentially confidential/PII data using something along the lines of AES256 encryption. Goal is to encry

Re: AES Encryption/Decryption

2018-11-02 Thread Peter via Python-list
On 3/11/2018 1:42 AM, Jeff M wrote: Python newbie here, looking for code samples for encrypting and decrypting functions, using AES. See lots of stuff on the interwebs, but lots of comments back an forth about bugs, or implemented incorrect, etc... I need to encrypt some strings that will be

Re: AES Encryption/Decryption

2018-11-02 Thread Lutz Horn
On Fri, Nov 02, 2018 at 07:42:24AM -0700, Jeff M wrote: > Python newbie here, looking for code samples for encrypting and > decrypting functions, using AES. See lots of stuff on the interwebs, > but lots of comments back an forth about bugs, or implemented > incorrect, etc... > > I need to encryp

Re: AES Encryption/Decryption

2018-11-02 Thread Christian Heimes
On 02/11/2018 15.42, Jeff M wrote: > Python newbie here, looking for code samples for encrypting and decrypting > functions, using AES. See lots of stuff on the interwebs, but lots of > comments back an forth about bugs, or implemented incorrect, etc... > > I need to encrypt some strings that w

AES Encryption/Decryption

2018-11-02 Thread Jeff M
Python newbie here, looking for code samples for encrypting and decrypting functions, using AES. See lots of stuff on the interwebs, but lots of comments back an forth about bugs, or implemented incorrect, etc... I need to encrypt some strings that will be passed around in URL, and then also s

ANN: zerodb Google Hangout on March 22nd. End-to-end DB encryption

2016-03-19 Thread MacLane & Michael
The ZeroDB team will be hosting an OpenSource Community Google Hangout on March 22, 2016 ZeroDB: An end-to-end encrypted database based on ZODB & written in Python. == 1) Introduction to ZeroDB Founders & Developer community 2) Reca

Re: Public key encryption example.

2015-11-19 Thread Laura Creighton
In a message of Wed, 18 Nov 2015 16:18:28 -0700, Vincent Davis writes: >This might be a "Let me Google that for you question", I tried. >I am looking for the "simplest" example of sending(encrypting) and >receiving(decrypting) using public key encryption. I am think

Re: Public key encryption example.

2015-11-18 Thread Vincent Davis
Found an example, needs a little updating but then it works (appears to) in python 3.5. http://coding4streetcred.com/blog/post/Asymmetric-Encryption-Revisited-(in-PyCrypto) Vincent Davis 720-301-3003 On Wed, Nov 18, 2015 at 5:04 PM, Chris Angelico wrote: > On Thu, Nov 19, 2015 at 10:56

Re: Public key encryption example.

2015-11-18 Thread Chris Angelico
On Thu, Nov 19, 2015 at 10:56 AM, Paul Rubin wrote: > Vincent Davis writes: >> I am looking for the "simplest" example of sending(encrypting) and >> receiving(decrypting) using public key encryption. I am think of something >> along the lines of having all the key

Re: Public key encryption example.

2015-11-18 Thread Paul Rubin
Vincent Davis writes: > I am looking for the "simplest" example of sending(encrypting) and > receiving(decrypting) using public key encryption. I am think of something > along the lines of having all the keys in local files and saving and > reading the message from a local

Public key encryption example.

2015-11-18 Thread Vincent Davis
This might be a "Let me Google that for you question", I tried. I am looking for the "simplest" example of sending(encrypting) and receiving(decrypting) using public key encryption. I am think of something along the lines of having all the keys in local files and saving and

Re: Encryption - was Hello World

2014-12-22 Thread Dave Angel
On 12/22/2014 05:29 PM, Chris Angelico wrote: On Tue, Dec 23, 2014 at 6:57 AM, Dave Angel wrote: I figure I must be misunderstanding something in your explanation, since a brute-force password guesser would seem to only need four billion tries to (probably) crack that. As to the assump

Re: Encryption - was Hello World

2014-12-22 Thread Chris Angelico
On Tue, Dec 23, 2014 at 6:57 AM, Dave Angel wrote: > I figure I must be misunderstanding something in your explanation, since a > brute-force password guesser would seem to only need four billion tries to > (probably) crack that. > > 1) Are you assuming that the cracker can read the source code, b

Encryption - was Hello World

2014-12-22 Thread Dave Angel
ago that needed some encryption work done, and I implemented something that I described as "scarily effective". My boss demanded that the debug code-execution feature be protected by a password that would be strong even if someone could read the source code, so I put together something tha

Re: AES Encryption of byte array

2011-03-01 Thread Tom Zych
On Tue, 01 Mar 2011 14:38 -0500, "Meszaros, Stacy" wrote: > I am very new to python, using it to write a test application. I need > to be able to encrypt part of a byte array (up to 256 bytes where the > first 7 bytes remain plain text) using AES 128 bit CBC encryption. I am

AES Encryption of byte array

2011-03-01 Thread Meszaros, Stacy
Hello all, I am very new to python, using it to write a test application. I need to be able to encrypt part of a byte array (up to 256 bytes where the first 7 bytes remain plain text) using AES 128 bit CBC encryption. I am using Python 2.6, can anyone recommend a toolkit or module? Thanks

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread Martin Manns
On Thu, 01 Jul 2010 14:48:47 -0400 pyt...@bdurham.com wrote: > Curious if any of you are using GPG or PGP encryption and/or > signatures in your Python apps? ... > 4. generating signatures for files that you are exchanging/posting for > download? I use pyme to create and che

Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread geremy condra
On Fri, Jul 2, 2010 at 6:15 AM, Stef Mientki wrote: >  On 02-07-2010 09:39, geremy condra wrote: >> On Thu, Jul 1, 2010 at 11:48 AM,   wrote: >>> Curious if any of you are using GPG or PGP encryption and/or signatures >>> in your Python apps? >> Yes; disclaim

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread Stef Mientki
On 02-07-2010 09:39, geremy condra wrote: > On Thu, Jul 1, 2010 at 11:48 AM, wrote: >> Curious if any of you are using GPG or PGP encryption and/or signatures >> in your Python apps? > Yes; disclaimer: I'm the author of evpy and am currently working on a > openssl wrap

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread geremy condra
On Thu, Jul 1, 2010 at 11:48 AM, wrote: > Curious if any of you are using GPG or PGP encryption and/or signatures > in your Python apps? Yes; disclaimer: I'm the author of evpy and am currently working on a openssl wrapper proposed for inclusion in the stdlib. > In particular

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-01 Thread Steve
On Jul 2, 4:48 am, pyt...@bdurham.com wrote: > Curious if any of you are using GPG or PGP encryption and/or signatures > in your Python apps? > > In particular are you: > > 1. clearsigning specific emails? > 2. validating clearsigned emails from others? > 3. encrypti

Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-01 Thread python
Curious if any of you are using GPG or PGP encryption and/or signatures in your Python apps? In particular are you: 1. clearsigning specific emails? 2. validating clearsigned emails from others? 3. encrypting/decrypting files? 4. generating signatures for files that you are exchanging/posting

Re: Encryption source code with md5

2010-04-04 Thread geremy condra
ssage<4baf3ac4$0$22903$e4fe5...@news.xs4all.nl>, Irmen de Jong >>>> wrote: >>>> >>>>> On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: >>>>> >>>>>> Don’t use MD5. >>>>> >>>>> Also, md5 is not an

Re: Encryption source code with md5

2010-04-04 Thread Robert Kern
use MD5. Also, md5 is not an encryption algorithm at all, it is a secure hashing function. You can use hash functions for encryption. You can *build* an encryption algorithm out of hash functions as a primitive, yes. Paul Rubin's p3.py is an example of using SHA-1 to build an encrypti

Re: Encryption source code with md5

2010-04-04 Thread geremy condra
gt;> >>>> Don’t use MD5. >>> >>> Also, md5 is not an encryption algorithm at all, it is a secure hashing >>> function. >> >> You can use hash functions for encryption. > > You can *build* an encryption algorithm out of hash functions as a

Re: Encryption source code with md5

2010-04-04 Thread Robert Kern
On 2010-04-03 20:21 , Lawrence D'Oliveiro wrote: In message<4baf3ac4$0$22903$e4fe5...@news.xs4all.nl>, Irmen de Jong wrote: On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: Don’t use MD5. Also, md5 is not an encryption algorithm at all, it is a secure hashing function.

Re: Encryption source code with md5

2010-04-03 Thread Steven D'Aprano
On Sun, 04 Apr 2010 13:21:34 +1200, Lawrence D'Oliveiro wrote: > In message <4baf3ac4$0$22903$e4fe5...@news.xs4all.nl>, Irmen de Jong > wrote: > >> On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: >> >>> Don’t use MD5. >> >> Also, md5 is

Re: Encryption source code with md5

2010-04-03 Thread Lawrence D'Oliveiro
In message <4baf3ac4$0$22903$e4fe5...@news.xs4all.nl>, Irmen de Jong wrote: > On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: > >> Don’t use MD5. > > Also, md5 is not an encryption algorithm at all, it is a secure hashing > function. You can use hash fu

Re: Encryption source code with md5

2010-03-28 Thread Steven D'Aprano
D version and then to an >> encryption method of a portion of source code. These thoughts are the >> source of two questions. > > I'd suggest that you don't think about encrypting your source code until > you have a rather better handle on encryption technology. Your m

Re: Encryption source code with md5

2010-03-28 Thread Harishankar
D version and then to an >> encryption method of a portion of source code. These thoughts are the >> source of two questions. > > I'd suggest that you don't think about encrypting your source code until > you have a rather better handle on encryption technology. Your m

Re: Encryption source code with md5

2010-03-28 Thread Steve Holden
catalinf...@gmail.com wrote: > I had a talk about Python and distribution of commercial products > created with python. This made me think of a way to protect my source > code to be distributed. I thought a live CD version and then to an > encryption method of a portion of source

Re: Encryption source code with md5

2010-03-28 Thread catalinf...@gmail.com
I had a talk about Python and distribution of commercial products created with python. This made me think of a way to protect my source code to be distributed. I thought a live CD version and then to an encryption method of a portion of source code. These thoughts are the source of two questions

Re: Encryption source code with md5

2010-03-28 Thread Irmen de Jong
On 28-3-2010 12:08, Lawrence D'Oliveiro wrote: In message<91541c26-6f18-40c7- a0df-252a52bb7...@l25g2000yqd.googlegroups.com>, catalinf...@gmail.com wrote: It is possible to encrypt with md5 python source code? Don’t use MD5. Also, md5 is not an encryption algorithm at all, it

Re: Encryption source code with md5

2010-03-28 Thread Lawrence D'Oliveiro
In message <91541c26-6f18-40c7- a0df-252a52bb7...@l25g2000yqd.googlegroups.com>, catalinf...@gmail.com wrote: > It is possible to encrypt with md5 python source code? Don’t use MD5. > What option do I have to protect my python source code? Copyright. -- http://mail.python.org/mailman/listinfo

Re: Encryption source code with md5

2010-03-28 Thread starglider develop
py2exe On 28 March 2010 07:59, catalinf...@gmail.com wrote: > Dear friends . > > I have two simple questions: > It is possible to encrypt with md5 python source code? > What option do I have to protect my python source code? > > Thank you . > -- > http://mail.python.org/mailman/listinfo/python-l

Re: Encryption source code with md5

2010-03-28 Thread alex goretoy
There's not many options when it comes to obfuscating python source. If you even do find a way to obfuscate it. It won't take much to reverse it. That's just how python works. Really I wouldn't even worry about looking for a way to do this, reason behind that is that it's not difficult to reverse i

Encryption source code with md5

2010-03-28 Thread catalinf...@gmail.com
Dear friends . I have two simple questions: It is possible to encrypt with md5 python source code? What option do I have to protect my python source code? Thank you . -- http://mail.python.org/mailman/listinfo/python-list

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread geremy condra
On Tue, Jan 26, 2010 at 4:00 PM, M.-A. Lemburg wrote: > > > geremy condra wrote: >> On Tue, Jan 26, 2010 at 12:37 PM, M.-A. Lemburg wrote: >> >> >> >>> You are also using CBC mode, even though you are really after >>> ECB mode (your code doesn't use chaining). With ECB mode, you >>> don't need t

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread geremy condra
On Tue, Jan 26, 2010 at 7:23 PM, Daniel wrote: > I understand the risks of unpickle. With strong, authenticated > encryption I think it is reasonably safe to send an encrypted pickle > through an untrusted medium (the Internet) and know that it has not > been modified enroute. Tha

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread Daniel
ckle to serialize the objects. I think I'll leave the padding in there since it keeps the encrypt/ decrypt methods usable for non-pickle data. > It's more important to worry about whether you really > want to unpickle the data or not, since pickle opens > up lots of possibiliti

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread Daniel
geremy condra wrote: > I'd also note that you aren't supposed to use RandomPool anymore, OK, I updated the recipe to use os.urandom() > and that AES-192 is frequently recommended over AES-256 for > new applications due to a number of recent developments in > the cryptanalysis of its key schedule.

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread M.-A. Lemburg
Daniel wrote: > On Jan 26, 12:37 pm, "M.-A. Lemburg" wrote: >> Note that your code has a padding bug: the decoder doesn't >> undo the padding. You're lucky though, since pickle will only >> read as much data as it needs and not complain about the extra >> data it finds. > > Doesn't the last line

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread Daniel
On Jan 26, 12:37 pm, "M.-A. Lemburg" wrote: > Note that your code has a padding bug: the decoder doesn't > undo the padding. You're lucky though, since pickle will only > read as much data as it needs and not complain about the extra > data it finds. Doesn't the last line in decrypt() do it?

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread M.-A. Lemburg
geremy condra wrote: > On Tue, Jan 26, 2010 at 12:37 PM, M.-A. Lemburg wrote: > > > >> You are also using CBC mode, even though you are really after >> ECB mode (your code doesn't use chaining). With ECB mode, you >> don't need the IV string. > > However, ECB mode is not as secure- the IV is

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread M.-A. Lemburg
M.-A. Lemburg wrote: > Daniel wrote: >> Just got done reading this thread: >> >> http://groups.google.com/group/comp.lang.python/browse_thread/thread/b31a5b5f58084f12/0e09f5f5542812c3 >> >> and I'd appreciate feedback on this recipe: >> >> http://code.activestate.com/recipes/576980/ >> > [...] > Yo

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread Paul Rubin
Daniel writes: > Of course, it does not meet all of the requirements set forth by the > OP in the referenced thread (the pycrypto dependency is a problem), > but it is an attempt to provide a simple interface for performing > strong, password-based encryption. Are there already modul

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread geremy condra
On Tue, Jan 26, 2010 at 12:37 PM, M.-A. Lemburg wrote: > You are also using CBC mode, even though you are really after > ECB mode (your code doesn't use chaining). With ECB mode, you > don't need the IV string. However, ECB mode is not as secure- the IV is the right way to go here. I'd also n

Re: Authenticated encryption with PyCrypto

2010-01-26 Thread M.-A. Lemburg
course, it does not meet all of the requirements set forth by the > OP in the referenced thread (the pycrypto dependency is a problem), > but it is an attempt to provide a simple interface for performing > strong, password-based encryption. Are there already modules out there > that p

Authenticated encryption with PyCrypto

2010-01-25 Thread Daniel
y the OP in the referenced thread (the pycrypto dependency is a problem), but it is an attempt to provide a simple interface for performing strong, password-based encryption. Are there already modules out there that provide such a simple interface? If there are, they seem to be hiding somewhere o

Re: lightweight encryption of text file

2010-01-18 Thread Aahz
In article , Daniel Fetchinson wrote: > >Well, that's sort of true about learning a complex API :) But it's >also true that I'm not storing anything really valuable in the file >but still wouldn't want to leave it lying around in plain text. In >case I lose the laptop with the file I seriously do

Re: lightweight encryption of text file

2010-01-12 Thread Ethan Furman
Anthra Norell wrote: > I consider the encryption unbreakable [...] (from previous thread) I am not a cryptographer. (from this thread) Then you shouldn't be making claims about your encryption algorithms. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-12 Thread Anthra Norell
and so I posted a second-level encryption, that is, an encryption of an encryption. Thus the brute-force attack wouldn't find anything non-random. By not disclosing the detail I may have breached some formal rule of the craft. So, you're saying that you lied about the encryption algo

Re: lightweight encryption of text file

2010-01-12 Thread Steve Holden
Robert Kern wrote: > On 2010-01-12 05:59 AM, Anthra Norell wrote: [ping, pong, ping, pong] > If the OP uses a real encryption algorithm, he can rely on the fact that > he can use the algorithm for large files or for plaintexts that a > malicious agent might choose even if he did not

Re: lightweight encryption of text file

2010-01-12 Thread Robert Kern
t the thieves. You have a point about my algorithm, although you might express it in a fashion that lives up to its merits. My algorithm would not resist a brute-force attack that iterates through all possible keys and analyzes the outcome for non-randomness. I knew that then and so I posted a secon

Re: lightweight encryption of text file

2010-01-12 Thread Anthra Norell
Robert Kern wrote: On 2010-01-11 14:09 PM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-09 03:52 AM, Anthra Norell wrote: "Don't use a random generator for encryption purposes!" warns the manual, of which fact I was reminded in no uncertain terms on this forum a few y

Re: lightweight encryption of text file

2010-01-12 Thread John Bokma
Anthra Norell writes: > Why EVER make anything yourself when you can buy it? Do you make your own processors? Your own hard disk drives? Why not? -- John Bokma Read my blog: http://johnbokma.com/ Hire me (Perl/Python): http://castleamber.com/ -- http://mail.python.org/mailman/listinfo/python

Re: lightweight encryption of text file

2010-01-12 Thread Paul Rubin
John Bokma writes: >> Why EVER make anything yourself when you can buy it? > > Do you make your own processors? Your own hard disk drives? > Why not? Well, if you try to make your own processors or hard drives, worst normal outcome is they don't work and you try something else instead. This is mo

Re: lightweight encryption of text file

2010-01-11 Thread John Bokma
Paul Rubin writes: > John Bokma writes: >>> Why EVER make anything yourself when you can buy it? >> >> Do you make your own processors? Your own hard disk drives? >> Why not? > > Well, if you try to make your own processors or hard drives, worst > normal outcome is they don't work and you try so

Re: lightweight encryption of text file

2010-01-11 Thread Robert Kern
On 2010-01-11 14:09 PM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-09 03:52 AM, Anthra Norell wrote: "Don't use a random generator for encryption purposes!" warns the manual, of which fact I was reminded in no uncertain terms on this forum a few years ago when

Re: lightweight encryption of text file

2010-01-11 Thread Paul Rubin
Anthra Norell writes: > Why EVER make anything yourself when you can buy it? http://en.wikipedia.org/wiki/Dunning-Kruger_effect -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-11 Thread Anthra Norell
g off into package-ology, leaving a stumped OP behind. "Don't use a random generator for encryption purposes!" warns the manual, of which fact I was reminded in no uncertain terms on this forum a few years ago when I proposed the following little routine in response to a post ve

Re: lightweight encryption of text file

2010-01-11 Thread Robert Kern
> > What would be the simplest way to achieve this using preferably stock > python without 3rd party modules? If a not too complex 3rd part > module made it really simple that would be acceptable too. Daniel, Here's what looks like another thread veering off into package-ology

Re: lightweight encryption of text file

2010-01-11 Thread Paul Rubin
p3.py handles all of that with no fuss imposed on the user. Really, p3.py was written because the same basic desire (simple, pure-Python encryption) kept coming up over and over in my own code and others', and it really seems to address the constraints about as well as anything I've been able to think of. -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Carl Banks wrote: > On Jan 8, 11:14 am, Daniel Fetchinson > wrote: >> I have a plain text file which I would like to protect in a very >> simple minded, yet for my purposes sufficient, way. I'd like to >> encrypt/convert it into a binary file in such a way that possession of >> a password allows a

Re: lightweight encryption of text file

2010-01-10 Thread geremy condra
I don't really see the issue here. > Having supported this kind of package in a commercial > setting in the past, IMO, for the sort of (common) application in > question, it's best to keep things as simple as possible and supply a > single interface that provides encryption, authen

Re: lightweight encryption of text file

2010-01-10 Thread Carl Banks
On Jan 8, 11:14 am, Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to convert it back i

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Paul Rubin wrote: > Steve Holden writes: >>> Right now, even asking for HTTPS support is too much to ask. Heck, >>> even asking for the fake HTTPS support to be identified as such is too >>> much, apparently. >>> >> No, Paul, nobody will complain if you *ask* ... > > Er, that wasn't me... > Oh s

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Nobody writes: > But, yeah, the OP needs to be aware of the difference (and probably isn't, > yet). So to take that a step further ... > The key passed to arcfour.schedule() shouldn't be re-used > If you need to verify the data, append a hash of the ciphertext ... > If you want to encrypt mul

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Steve Holden writes: >> Right now, even asking for HTTPS support is too much to ask. Heck, >> even asking for the fake HTTPS support to be identified as such is too >> much, apparently. >> > No, Paul, nobody will complain if you *ask* ... Er, that wasn't me... > A question I've been asking myse

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Nobody wrote: > On Sun, 10 Jan 2010 12:26:05 -0800, Paul Rubin wrote: > >> I'd like it a lot if the Python stdlib could include a serious >> cryptography module. > > And I'd like a truckload of gold ;) > > Right now, even asking for HTTPS support is too much to ask. Heck, > even asking for the f

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 12:26:05 -0800, Paul Rubin wrote: > I'd like it a lot if the Python stdlib could include a serious > cryptography module. And I'd like a truckload of gold ;) Right now, even asking for HTTPS support is too much to ask. Heck, even asking for the fake HTTPS support to be identi

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 08:54:51 -0800, Paul Rubin wrote: > Nobody writes: >> RC4 (aka ArcFour) is quite trivial to implement, and better than inventing >> your own cipher or using a Vignere: ... > > That's a cute implementation, but it has no authentication and doesn't > include any randomness, whi

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
f modes, nonces, etc. Having supported this kind of package in a commercial setting in the past, IMO, for the sort of (common) application in question, it's best to keep things as simple as possible and supply a single interface that provides encryption, authentication, and random initializati

Re: lightweight encryption of text file

2010-01-10 Thread geremy condra
Not sure why in the world you would homebrew something like this- a small dependency isn't that bad, and aes can be pretty simple to use. Might as well go for the industrial strength approach. Geremy Condra -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Nobody writes: > RC4 (aka ArcFour) is quite trivial to implement, and better than inventing > your own cipher or using a Vignere: ... That's a cute implementation, but it has no authentication and doesn't include any randomness, which means if you use the same key for two inputs, there is a secur

Re: lightweight encryption of text file

2010-01-10 Thread Daniel Fetchinson
>> Thanks, this looks very simple too, but where is the decryption code? >> Wikipedia seems to suggest that encryption and decryption are both the >> same but running crypt on the output of crypt doesn't give back the >> original string. So probably I'm misund

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 15:30:12 +, Steven D'Aprano wrote: >> Thanks, this looks very simple too, but where is the decryption code? >> Wikipedia seems to suggest that encryption and decryption are both the >> same but running crypt on the output of crypt doesn't give

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 09:59:31 +0100, Daniel Fetchinson wrote: > Thanks, this looks very simple too, but where is the decryption code? > Wikipedia seems to suggest that encryption and decryption are both the > same but running crypt on the output of crypt doesn't give back the > or

Re: lightweight encryption of text file

2010-01-10 Thread Steven D'Aprano
On Sun, 10 Jan 2010 09:59:31 +0100, Daniel Fetchinson wrote: > Thanks, this looks very simple too, but where is the decryption code? > Wikipedia seems to suggest that encryption and decryption are both the > same but running crypt on the output of crypt doesn't give back the > or

Re: lightweight encryption of text file

2010-01-10 Thread Daniel Fetchinson
string won't be used. Instead, create an SHA hash > (see the sha and hashlib modules) of the password and use that. Thanks, this looks very simple too, but where is the decryption code? Wikipedia seems to suggest that encryption and decryption are both the same but running crypt on the outp

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Fri, 08 Jan 2010 20:14:51 +0100, Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to c

Re: lightweight encryption of text file

2010-01-09 Thread Paul Rubin
Robert Kern writes: > Are you on a 64-bit platform? Unfortunately, array's integer typecodes > are platform-specific, but p3.py requires a 32-bit integer ... Oh yes, thanks, I never did get around to dealing with 64 bit platforms. I also notice that some of the unit test functions use print state

Re: lightweight encryption of text file

2010-01-09 Thread Paul Rubin
which might be a problem with large files. Some day I might get around to adding a streaming interface to it. The "file" command will not recognize the ciphertext as encrypted data. It will just say "data". If you want to be more serious, use pgp or gpg with the -c option

Re: lightweight encryption of text file

2010-01-09 Thread Paul Rubin
Daniel Fetchinson writes: >>http://www.nightsong.com/phr/crypto/p3.py > > Thanks a lot, currently I'm having trouble using this code on python > 2.6 but probably some small tweaking will fix it. Yikes, this is the first I've heard of such a problem. I will look into it. Thanks. (Also than

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
gt; def test(txt, pwd): > encrypted_txt = encrypt(txt, pwd) > decrypted_txt = decrypt(encrypted_txt, pwd) > print "text:%r" % txt > print "encrypted:%r" % encrypted_txt > print "decrypted:%r" % decrypted_txt > > >>>>

Re: lightweight encryption of text file

2010-01-09 Thread Arnaud Delobelle
t, pwd) print "text:%r" % txt print "encrypted:%r" % encrypted_txt print "decrypted:%r" % decrypted_txt >>> test("This encryption scheme is definitely unbreakable.", "secret") text:'This encryption scheme is definitely unbreakable.

Re: lightweight encryption of text file

2010-01-09 Thread Dave Angel
lest way to achieve this using preferably stock > python without 3rd party modules? If a not too complex 3rd part > module made it really simple that would be acceptable too. Daniel, Here's what looks like another thread veering off into package-ology, leaving a stumped OP behind. "

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
ution. > > > > What would be the simplest way to achieve this using preferably stock > > python without 3rd party modules? If a not too complex 3rd part > > module made it really simple that would be acceptable too. > > > > > Daniel, > > Here'

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
return ''.join([chr(n) for n in plain]) Thanks, this looks simple enough and probably sufficient for my purposes! I'll see if I'll use this or Paul Rubin's p3.py. > Is it acceptable if there is a chance (small, possibly vanishingly small) > that file will identify it as

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
> I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to convert it back into the original text > fi

Re: lightweight encryption of text file

2010-01-09 Thread Anthra Norell
preferably stock > python without 3rd party modules? If a not too complex 3rd part > module made it really simple that would be acceptable too. Daniel, Here's what looks like another thread veering off into package-ology, leaving a stumped OP behind. "Don't use a r

Re: lightweight encryption of text file

2010-01-08 Thread Steven D'Aprano
plain]) (How times have changed... once upon a time, the Vigenere Cipher was considered the gold-standard unbreakable encryption technology. Now it merely qualifies as obfuscation.) Is it acceptable if there is a chance (small, possibly vanishingly small) that file will identify it as text?

Re: lightweight encryption of text file

2010-01-08 Thread Chris Colbert
PyCrypto is already pretty easy to use by itself. I dont know why you want a wrapper on top of it. On Fri, Jan 8, 2010 at 11:02 PM, Irmen de Jong wrote: > On 8-1-2010 22:39, Daniel Fetchinson wrote: > >> >>>http://www.nightsong.com/phr/crypto/p3.py >>> >> >> Thanks a lot, currently I'm having

Re: lightweight encryption of text file

2010-01-08 Thread Robert Kern
On 2010-01-08 15:47 PM, Daniel Fetchinson wrote: I have a plain text file which I would like to protect in a very simple minded, yet for my purposes sufficient, way. I'd like to encrypt/convert it into a binary file in such a way that possession of a password allows anyone to convert it back into

Re: lightweight encryption of text file

2010-01-08 Thread Irmen de Jong
On 8-1-2010 22:39, Daniel Fetchinson wrote: http://www.nightsong.com/phr/crypto/p3.py Thanks a lot, currently I'm having trouble using this code on python 2.6 but probably some small tweaking will fix it. If you keep having issues with this module, maybe you can try this: http://www.fre

Re: lightweight encryption of text file

2010-01-08 Thread Daniel Fetchinson
>>> I have a plain text file which I would like to protect in a very >>> simple minded, yet for my purposes sufficient, way. I'd like to >>> encrypt/convert it into a binary file in such a way that possession of >>> a password allows anyone to convert it back into the original text >>> file while n

Re: lightweight encryption of text file

2010-01-08 Thread Daniel Fetchinson
>> I have a plain text file which I would like to protect in a very >> simple minded, yet for my purposes sufficient, way. I'd like to >> encrypt/convert it into a binary file in such a way that possession of >> a password allows anyone to convert it back into the original text >> file while not po

Re: lightweight encryption of text file

2010-01-08 Thread Robert Kern
On 2010-01-08 13:14 PM, Daniel Fetchinson wrote: I have a plain text file which I would like to protect in a very simple minded, yet for my purposes sufficient, way. I'd like to encrypt/convert it into a binary file in such a way that possession of a password allows anyone to convert it back into

lightweight encryption of text file

2010-01-08 Thread Daniel Fetchinson
I have a plain text file which I would like to protect in a very simple minded, yet for my purposes sufficient, way. I'd like to encrypt/convert it into a binary file in such a way that possession of a password allows anyone to convert it back into the original text file while not possessing the pa

  1   2   3   4   >