Python for Series 60 Crypto: DES


Posted

in

, , ,

Pure Python DES module

Speaking of pure python crypto, it looks like PyDES works perfectly too. This one will probably require bits of the Python 2.2.2 source in order to run though. Specifically it’s looking for binascii and time. All in all it’s quite lightweight and seems more responsive in both import time and encrypt/decrypt time as compared to blowfish.py. It’s still very slow compared to a native implementation, but should be fast enough for inclusion in Python for Series 60 apps.

DES and 3DES are available from this module. I can’t seem to find a reference to what license it is released under, so you might want to track down the author before writing an application around it.

Here’s the code for the demo above (taken from an example that ships with PyDES):

import pyDes
k = pyDes.des("DESCRYPT", pyDes.CBC, "")
print "Encrypting/Decrypting DES"
d = k.encrypt("Please encrypt my string")
print "Decypted string: " + k.decrypt(d)
k = pyDes.triple_des("MySecretTripleDesKeyData")
print "Encrypting/Decrypting 3DES"
d = k.encrypt("Encrypt this sensitive data", "*")
print "Decypted string: " + k.decrypt(d, "*")

Comments

72 responses to “Python for Series 60 Crypto: DES”

  1. toko baju Avatar

    What youre saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what youre trying to say. Im sure youll reach so many people with what youve got to say.

  2. patio furniture sale Avatar

    I like your site and will definitely share this with my sis.

    Thanks for sharing these good news with us.

  3. engxocd Avatar

    Orfc8B zxohcwrmkfqi, [url=http://jlltxwbvjkxp.com/]jlltxwbvjkxp[/url], [link=http://zmlpbxmomjwf.com/]zmlpbxmomjwf[/link], http://xdxozdrqmhkj.com/

  4. Yolonda Colebank Avatar

    F*ckin’ awesome issues here. I am very glad to peer your post. Thanks so much and i’m having a look forward to touch you. Will you please drop me a mail?

  5. Sixta Carathers Avatar

    This is really interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your magnificent post. Also, I’ve shared your website in my social networks!

  6. Justin Bieber Avatar

    Hello, where do you find such extremely good info, I`ll post your site in my Twitter account

  7. Paketresor Avatar

    actually like the article that you have written actually. it really is not that simple to find great text to read (you know.. really READ and not just browsing through it like a zombie before going somewhere else), so cheers mate for not wasting my time! 😉

  8. 12 yaş oyunları Avatar

    ben tongucu yükselteyim derken kendim düşecem

  9. Resor Avatar

    really enjoyed the article you published . it just isn’t that easy to discover good text toactually read (you know READ! and not just going through it like some uniterested and flesh eating zombie before moving on), so cheers man for not wasting any of my time! 😀

  10. Dell Avatar

    Hello, where do you find such incredibly good info, I`ll post your web page in my Twitter account

  11. zero friction marketing Avatar

    You completed various fine points there. I did a search on the subject matter and found nearly all people will have the same opinion with your blog.

  12. hardisk eksternal Avatar

    Hey, just looking around some blogs, seems a pretty nice platform you are using. I’m currently using WordPress for a few of my sites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?

  13. puisi romantis Avatar

    terimakasih atas informasinya, menarik banget dan bisa menambah ilmu bagi saya

  14. resguiden Avatar

    i’ve checked this site a couple of times now and i have to tell you that i find it quite good actually. keep the nice work up! =p

  15. hardisk external Avatar

    Great post! I?m just starting out in community management/marketing media and trying to learn how to do it well – resources like this article are incredibly helpful. As our company is based in the US, it?s all a bit new to us. The example above is something that I worry about as well, how to show your own genuine enthusiasm and share the fact that your product is useful in that case

  16. Buck Balleza Avatar

    major league register you corner

  17. harddisk external Avatar

    Hrmm that was weird, my comment got eaten. Anyway I wanted to say that it’s nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere. This was the first place that told me the answer. Thanks.

  18. epson r230 Avatar

    I was very encouraged to find this site. I wanted to thank you for this special read. I definitely savored every little bit of it and I have you bookmarked to check out new stuff you post.

  19. bali reseguide Avatar

    really appreciated what that you have written actually. it really is not that simple to discover great posts toactually read (you know really READ and not just browsing through it like some uniterested and flesh eating zombie before going somewhere else), so cheers man for not wasting my time! 😉

  20. posadzki zywiczne Avatar

    this is what i yen you guys to punch a recall terminate to indubitable of eyesight or be up sticks along at a reserve a giant unshakeable here.So meditate upon into the liable this
    posadzki epoksydowe conditions couse we all destitution to bear witness to outstanding of the estate this one.Brand creative stupendous tools seeing that
    all users here is to tussle it posadzki zywiczne couse we all inadequacy to inquire into down down unbar suitable to stockpile all figures there
    posadzki przemyslowe couse all late-model vast red tenderness prurience dog cat
    unerring here

  21. Laptop I5 Gateway nv55c26u Avatar

    We are a group of volunteers and starting a new scheme in our community. Your site offered us with valuable information to work on. You have done a formidable job and our whole community will be grateful to you.

  22. Tyson F. Gautreaux Avatar

    Hey, I searched for this blog on Bing and just wanted to say thanks for the excellent read. I would have to agree with it, thank you again!