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. liqgghahjgl Avatar
    beilrgj
    kbxaserehp

  2. liqgghahjgl Avatar
    beilrgj
    kbxaserehp

  3. Hadi Avatar
    Hadi

    Hi dear,
    i can’t download python please send it to my mailbox
    thanks

  4. pill identification Avatar

    Thanks for a lovely site, I am very impressed 🙂

  5. low apr credit card Avatar

    Lovely to see such a wonderful site. Thank you

  6. play texas holdem Avatar

    I come to your site because it keeps me entertained and aware of new things.

  7. Kelvin Escarrega Avatar

    bull post you hold

  8. Rosalie Alicandro Avatar

    I imagine it is quite fantastic.

  9. Buy Youtube Video Views Avatar

    I have wanted to write about something like this on my webpage and you have given me an idea. Cheers.

  10. {Sedona AZ Real Estate|Sedona homes|Sedona AZ homes|Sedona real estate} Avatar

    Real Estate and vacation homes. Property foreclosures real estate are a great great deal currently on the housing market in Va and Arizona ( az ). Specifically Williamsburg real estate property and Sedona real estate and houses for sale.

  11. Chad Burnworth Avatar

    Just thought I might comment and say neat theme, did you create it yourself? Really appears to be like superior!

  12. Lucio Conley Avatar

    In searching through yahoo and google for great useful resource to help for the question, this is by far the best one i’ve found. Kudos

  13. Vince Gajeski Avatar

    More good stuff!

  14. One International Avatar

    I think that may be a captivating point, it made me suppose a bit. Thanks for sparking my thinking cap. Every now and then I get such a lot in a rut that I just feel like a record.

  15. Camera charger Avatar

    Nearly all of the responses on this site don’t make sense.

  16. QROPS Avatar

    I’m speechless. This can be a superb weblog and very engaging too. Great work! That’s not in reality so much coming from an amateur publisher like me, however it’s all I may say after diving into your posts. Nice grammar and vocabulary. Now not like other blogs. You truly know what you?re speaking about too. Such a lot that you simply made me want to discover more. Your weblog has become a stepping stone for me, my friend.

  17. Bathroom Designs For Small Spaces Avatar

    I’m having a little issue I cant subscribe your feed, I’m using google reader by the way.

  18. Real Estate Internet Marketing Avatar

    Hello fellow blogger! I’m new to blogs but I just wanted to say that I like your blog here on Sedona Real Estate Market. It kept me reading all the way to the end… And then I went and searched for some more posts after that. 🙂 Keep up the good work, I’m always looking to learn more about Real Estate Internet Marketing, in particular.

  19. cheap propecia Avatar

    I apologise, but it absolutely another. Who else, what can prompt?

  20. car insurance information Avatar

    I have been studying your entries all the way through my morning holiday, and I must admit the entire article has been very enlightening and really well written. I believed I’d mean you can recognise that for a few reason why this blog does no longer view neatly in Internet Explorer 8. I desire Microsoft may stop converting their software. I have a query for you. Could you mind changing blog roll links? That will be truly neat!

  21. find a tutor Avatar

    I differ with most people here; I found this blog post I couldnt stop until I finished, even though it wasnt just what I had been searching for, was still a nice read though. I will instantly get your blog feed to stay in touch of any updates.

  22. maths tutoring Avatar

    bznfsgpjlzmvsfazogzh, zaposlitev, kZwACDM.

  23. grosir baju Avatar

    The Zune concentrates on being a Portable Media Player. Not a web browser. Not a game machine. Maybe in the future it’ll do even better in those areas, but for now it’s a fantastic way to organize and listen to your music and videos, and is without peer in that regard. The iPod’s strengths are its web browsing and apps. If those sound more compelling, perhaps it is your best choice.

  24. baju anak 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.

  25. baju anak branded Avatar

    This is the perfect blog for anyone who wants to know about this topic. You know so much its almost hard to argue with you (not that I really would want…HaHa). You definitely put a new spin on a subject thats been written about for years. Great stuff, just great!

  26. grosir baju anak Avatar

    Simply, admirable what you have done here. It is pleasing to look you express from the heart and your clarity on this significant content can be easily looked. Remarkable post and will look forward to your future update.

  27. baju batik Avatar

    This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

  28. jual batik Avatar

    This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article

  29. toko batik Avatar

    Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  30. jual sepatu Avatar

    Considerably, this post is really the sweetest on this notable topic. I harmonise with your conclusions and will thirstily look forward to your incoming updates. Saying thanks will not just be sufficient, for the phenomenal clarity in your writing. I will directly grab your rss feed to stay informed of any updates. Admirable work and much success in your business dealings!  Please excuse my poor English as it is not my first tongue.

  31. sepatu murah Avatar

    This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article

  32. sepatu murah Avatar

    Aw, this was a really great post. In theory I’d like to write like this also – taking time and real effort to make a good article… but what can I say… I procrastinate alot and never seem to get something done.

  33. toko sepatu Avatar

    Aw, this was a really great post. In theory I’d like to write like this also – taking time and real effort to make a good article… but what can I say… I procrastinate alot and never seem to get something done.

  34. baju muslim Avatar

    Keep ’em coming… you all do such a great job at such Concepts… can’t tell you how much I, for one appreciate all you do!

  35. busana muslim 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.

  36. baju muslim modern Avatar

    Keep ’em coming… you all do such a great job at such Concepts… can’t tell you how much I, for one appreciate all you do!

  37. kerudung Avatar

    The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and ‘skin’ the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.

  38. tas wanita Avatar

    This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article

  39. tas murah Avatar

    Have you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I’m more of a visual learner,I found that to be more helpful well let me know how it turns out! I love what you guys are always up too. Such clever work and reporting! Keep up the great works guys I’ve added you guys to my blogroll. This is a great article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.

  40. grosir tanah abang Avatar

    Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

  41. baju tanah abang 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

  42. rental mobil 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.

  43. sewa mobil Avatar

    Simply, admirable what you have done here. It is pleasing to look you express from the heart and your clarity on this significant content can be easily looked. Remarkable post and will look forward to your future update.

  44. kebaya 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.

  45. kebaya modern 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.

  46. WpWMPnK Avatar

    HVyZXDnU

  47. baju kebaya Avatar

    Thank you for another essential article. Where else could anyone get that kind of information in such a complete way of writing? I have a presentation incoming week, and I am on the lookout for such information.

  48. baju kebaya Avatar

    Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

  49. jual baju Avatar

    I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else!

  50. internet marketing blog Avatar

    Ya recognize, that is going to be fairly interesting. Seeing how this blog grows from 50 uniques a day to x,xxx+ (confidently 😀 ).