473,554 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can anyone suggest a good crypto package?

I need a crypto package that works on windows with python 2.5. Can
anyone suggest one for me?

I have been searching for a couple days for a good cryptography
package to use for public/private key encryption, at this point I
would settle for symmetric even.

Every encryption package I have found for python was either operating
system specific (read *nix only):
http://www.freenet.org.nz/ezPyCrypto/
http://www.keyczar.org/

There was one exception, this version was specifically built to run on
any platform (yay), but the compiler for windows complained that I
wasn't using python2.2 (though the package was said to only need 2.2
or newer).

Is there any crypto package that is actually written in python? I
seriously don't care how slow it is.
Sep 4 '08 #1
12 2236
On Sep 4, 1:39*pm, Fett <FettMan...@gma il.comwrote:
I need a crypto package that works on windows with python 2.5. Can
anyone suggest one for me?

I have been searching for a couple days for a good cryptography
package to use for public/private key encryption, at this point I
would settle for symmetric even.

Every encryption package I have found for python was either operating
system specific (read *nix only):http://www.freenet.org.nz/ezPyCrypto...w.keyczar.org/

There was one exception, this version was specifically built to run on
any platform (yay), but the compiler for windows complained that I
wasn't using python2.2 (though the package was said to only need 2.2
or newer).

Is there any crypto package that is actually written in python? I
seriously don't care how slow it is.
How about M2Crypto: http://chandlerproject.org/Projects/...ypto#Downloads

Mike
Sep 4 '08 #2
On Sep 4, 2:23*pm, Mike Driscoll <kyoso...@gmail .comwrote:
On Sep 4, 1:39*pm, Fett <FettMan...@gma il.comwrote:
I need a crypto package that works on windows with python 2.5. Can
anyone suggest one for me?
I have been searching for a couple days for a good cryptography
package to use for public/private key encryption, at this point I
would settle for symmetric even.
Every encryption package I have found for python was either operating
system specific (read *nix only):http://www.freenet.org.nz/ezPyCrypto...w.keyczar.org/
There was one exception, this version was specifically built to run on
any platform (yay), but the compiler for windows complained that I
wasn't using python2.2 (though the package was said to only need 2.2
or newer).
Is there any crypto package that is actually written in python? I
seriously don't care how slow it is.

How about M2Crypto:http://chandlerproject.org/Projects/...ypto#Downloads

Mike
Seems that this is intended more for webapps or something, I intend to
use this for a client application. This means that I can't require
outside dependencies, or I risk annoying the clients (if you have
installed many open-source projects with dependencies that aren't
handled by portage/apt-get, you know what I would be doing to them).

I seriously can't believe that there isn't a single python native
crypto package. Why do they all need to have outside dependencies?
Sep 4 '08 #3
On Sep 4, 2:50*pm, Fett <FettMan...@gma il.comwrote:
On Sep 4, 2:23*pm, Mike Driscoll <kyoso...@gmail .comwrote:
On Sep 4, 1:39*pm, Fett <FettMan...@gma il.comwrote:
I need a crypto package that works on windows with python 2.5. Can
anyone suggest one for me?
I have been searching for a couple days for a good cryptography
package to use for public/private key encryption, at this point I
would settle for symmetric even.
Every encryption package I have found for python was either operating
system specific (read *nix only):http://www.freenet.org.nz/ezPyCrypto...w.keyczar.org/
There was one exception, this version was specifically built to run on
any platform (yay), but the compiler for windows complained that I
wasn't using python2.2 (though the package was said to only need 2.2
or newer).
Is there any crypto package that is actually written in python? I
seriously don't care how slow it is.
How about M2Crypto:http://chandlerproject.org/Projects/...ypto#Downloads
Mike

Seems that this is intended more for webapps or something, I intend to
use this for a client application. This means that I can't require
outside dependencies, or I risk annoying the clients (if you have
installed many open-source projects with dependencies that aren't
handled by portage/apt-get, you know what I would be doing to them).

I seriously can't believe that there isn't a single python native
crypto package. Why do they all need to have outside dependencies?
If you are distributing your application on Windows (which is what
your original post implied), then you can easily roll up dependencies
with py2exe / Gui2Exe and something like Inno Setup or NSIS. I'm going
to try to compile the crypto package (http://www.amk.ca/python/code/
crypto) into an installer for 2.5, but no promises.

Mike
Sep 4 '08 #4
Fett <Fe********@gma il.comwrites:
Is there any crypto package that is actually written in python? I
seriously don't care how slow it is.
I wrote a simple symmetric encryption function in python:

http://nightsong.com/phr/crypto/p3.py

I wrote a somewhat fancier package that did public key a while back,
that is unreleased because of insufficient testing and some features
I'd like to have done differently, but I ought to get around to
cleaning it up sometime.

There is also tlslite, which you might be able to extract
some public key functions from: http://trevp.net/tlslite
Sep 4 '08 #5
On Thu, Sep 04, 2008 at 11:39:42AM -0700, Fett wrote:
I need a crypto package that works on windows with python 2.5. Can
anyone suggest one for me?
You could always rely on the the APIs Windows provides to do this
sort out stuff, either via pywin32 or ctypes.

Trent.
Sep 4 '08 #6
On Sep 4, 3:09*pm, Paul Rubin <http://phr...@NOSPAM.i nvalidwrote:
Fett <FettMan...@gma il.comwrites:
Is there any crypto package that is actually written in python? I
seriously don't care how slow it is.

I wrote a simple symmetric encryption function in python:

*http://nightsong.com/phr/crypto/p3.py

I wrote a somewhat fancier package that did public key a while back,
that is unreleased because of insufficient testing and some features
I'd like to have done differently, but I ought to get around to
cleaning it up sometime.

There is also tlslite, which you might be able to extract
some public key functions from: *http://trevp.net/tlslite
Wow, I have no idea how that works, but I think it will do nicely. The
main goal is simply to ensure that data coming in (from a website), is
valid (ie. posted by me). The site is supposedly secure, and the code
only accepts data of the type I expect, so the only security risk was
someone posting bad data. This simple method should stop anyone from
bothering to do even that.

Kudos for writing the code in a way that I can see how it is used,
even without documentation this is small enough to dissect.

Thank you, I think we have a winner. (BTW, I have no idea how this
whole encrypting gives many strings, decrypting all gives the correct
one works, but it sure seems to work just fine, more fully featured
than I even felt I needed.)
Sep 4 '08 #7
Fett wrote:
On Sep 4, 2:23 pm, Mike Driscoll <kyoso...@gmail .comwrote:
>How about M2Crypto:http://chandlerproject.org/Projects/...ypto#Downloads

Seems that this is intended more for webapps or something,
Why do you think so? It's a C wrapper module around the
OpenSSL crypto libs.

Ciao, Michael.
Sep 4 '08 #8
On 2008-09-04 20:39, Fett wrote:
I need a crypto package that works on windows with python 2.5. Can
anyone suggest one for me?

I have been searching for a couple days for a good cryptography
package to use for public/private key encryption, at this point I
would settle for symmetric even.
I'm not really sure what you're after, but if it's about end-to-end
encryption and authentication, then OpenSSL is the way to go, e.g.
using pyOpenSSL:

http://www.egenix.com/products/python/pyOpenSSL/
Every encryption package I have found for python was either operating
system specific (read *nix only):
http://www.freenet.org.nz/ezPyCrypto/
http://www.keyczar.org/

There was one exception, this version was specifically built to run on
any platform (yay), but the compiler for windows complained that I
wasn't using python2.2 (though the package was said to only need 2.2
or newer).

Is there any crypto package that is actually written in python? I
seriously don't care how slow it is.
--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Sep 05 2008)
>>Python/Zope Consulting and Support ... http://www.egenix.com/
mxODBC.Zope.D atabase.Adapter ... http://zope.egenix.com/
mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
_______________ _______________ _______________ _______________ ____________

:::: Try mxODBC.Zope.DA for Windows,Linux,S olaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
Sep 4 '08 #9
Fett <Fe********@gma il.comwrites:
Wow, I have no idea how that works, but I think it will do nicely. The
main goal is simply to ensure that data coming in (from a website), is
valid (ie. posted by me).
If you just want to authenticate the strings without confidentiality ,
use the built-in HMAC module. But beware of replay attacks.
Thank you, I think we have a winner. (BTW, I have no idea how this
whole encrypting gives many strings, decrypting all gives the correct
one works,
The plaintext gets a random string attached at encryption time, and
the random string gets removed at decryption. Of course there are
many possible random strings, so many possible ciphertexts for each
plaintext. That means the ciphertext is a necessarily somewhat longer
than the plaintext, so you have to be willing to deal with that.

Note there's possibly a lot of other subtle issues you have to be
careful of, like if you're authenticating a series of messages, how do
you detect if one has been repeated or dropped from the middle?
Until you've got all that figured out, you are leaving attacks possible.
Sep 5 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1266
by: Etienne Posthumus | last post by:
I have been considering the various SSL/crypto libraries for Python, and they all have their plus and minus points. The main sticking point has been to have BOTH X509 file support and access to some crypto operations for signing/hashing. The only one which does both (please correct me if this is a misconception on my part) is...
0
1176
by: Simon Roses Femerling | last post by:
Hey all :) I'm looking for a good crypto toolkit (that should be multiplatform, work on python 2.3, etc..) What I have found looks old and too complex (installing 3 party libs, etc.) I just want to encrypt files using a secure encryption. I guess a pure python toolkit is out of the question! Any comments ?
0
1580
by: Gandalf | last post by:
Hi All! I have an interesting problem here. I have written a Delphi program that should connect to a server written in Python. I'm using a package called DCP for encryption in Delphi and the well known pycrypto library in Python. Delphi lib: {* DCPcrypt v2.0 written by David Barton (crypto@cityinthesky.co.uk) **********} Python lib: ...
6
1851
by: Skip Montanaro | last post by:
I wrote PEP 304, "Controlling Generation of Bytecode Files": http://www.python.org/peps/pep-0304.html quite awhile ago. The first version appeared in January 2003 in response to questions from people about controlling/suppressing bytecode generation in certain situations. It sat idle for a long while, though from time-to-time people...
6
6560
by: Michael Sparks | last post by:
Hi, I suspect this is a bug with AMK's Crypto package from http://www.amk.ca/python/code/crypto , but want to check to see if I'm being dumb before posting a bug report. I'm looking at using this library and to familiarise myself writing small tests with each of the ciphers. When I hit Crypto.Cipher.ARC4 I've
113
12214
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same algorithm work with strings that may or may not be unicode 3) Number of bytes back must either be <= number of _TCHARs in * sizeof(_TCHAR), or the...
2
1307
by: Frank | last post by:
Hello, I need some pointing in the right direction. I have a working application, a main form and several subforms and classes. I want the subforms and classes put together in a package so that other programmers can use it in their main forms. Is the 'package' I'm looking for a component? Do you put this in a dll? When programmers use my...
30
4616
by: mistral | last post by:
Neeed good javascript unescape encoder, to protect javascript code. Some advices? Online tool, or ready javascript only. Any opinions about the Javascript Obfuscator: http://www.javascript-source.com/
1
4938
by: mirandacascade | last post by:
I am attempting to implement a process, and I'm pretty sure that a major roadblock is that I do not understand the nomenclature. The specs indicate that the goal is to calculate a message digest using an SHA-256 algorithm. There are 2 examples included with the specs. The label on the 2 examples are: 'HMAC samples'. In both examples, the...
0
7812
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5442
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3579
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3561
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2026
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1145
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.