Busy making things: tinycast, github, links, photos, @mc.

More Python for Series 60 Crypto: Rijndael

Posted: March 31st, 2005 | Author: | Filed under: Projects, Python | 19 Comments »

Rijndael on Series 60

During my search for pure python Nirvana I came across Bram Cohen‘s rijndael.py. It can work with strings of length 16, 24, or 32. Here’s the sample code that ran successfully (albeit slowly) on my Taco:

# Make sure rijndael.py is in your libs dir
from rijndael import rijndael
# key must be 16, 24, 32 characters long
key = 'sixteencharacter'
r = rijndael(key, 16)
# must encode/decode in the chosen blocksize
print 'Encoding/Decodingnusing Rijndael...'
plaintext = 'themonkeygoeswoo'
ciphertext = r.encrypt(plaintext)
print r.decrypt(ciphertext)

It took its sweet time to run, but isn’t much more painful than waiting for import urllib, so it’s not the end of the world. It requires copy and string, which I’m not sure are in the Nokia distribution, but it works just fine if you dump the Python 2.2.2 source libraries in to your libs directory.

Add this one to your mobile cryptography toolbelt.

19 Comments on “More Python for Series 60 Crypto: Rijndael”

  1. 1 samir said at 11:19 am on April 23rd, 2005:

    je suis un étudiant al’univérsité des science et de la téchnologie d’oran algerie.je continue mes études(1ére année informatique) et en méme temp je fait des recherche sur l’algorithme de rijndeal ou la méthode dela cryptographie aes (advanced encryption systéme) je besoin des application sur cette méthode avec builder c++ s. v.p.

  2. 2 Hanne said at 5:08 pm on July 8th, 2005:

    So what? I love Pythons!

  3. 3 link said at 4:36 pm on July 31st, 2007:



  4. 4 grshjzim goephia said at 7:52 pm on August 18th, 2008:

    evgrnycz wxtlirefn vswgkib ywxjh xazpknw uvawl alpqs

  5. 5 eco friendly promotional products said at 12:25 pm on January 22nd, 2011:

    http://www.farfromboring.com/Promotional-Products/Eco-Friendly/c-85.html Thanks for that awesome posting. It saved MUCH time 🙂

  6. 6 BuchananFrieda35 said at 4:56 pm on January 23rd, 2011:

    Don’t you know that this is the best time to receive the business loans, which can make your dreams come true.

  7. 7 cheap propecia said at 5:38 am on January 24th, 2011:

    I apologise, but, in my opinion, you are mistaken. I can prove it. Write to me in PM.

  8. 8 propecia said at 7:53 am on January 24th, 2011:

    It has no analogues?

  9. 9 porno izle said at 11:55 pm on February 6th, 2011:

    I started to follow your blog

  10. 10 porno izle said at 6:17 pm on February 10th, 2011:

    Excellent article. I want to have to ask questions

  11. 11 Blackjack said at 11:24 pm on February 10th, 2011:

    After I originally commented I clicked the -Notify me when new feedback are added- checkbox and now every time a comment is added I get 4 emails with the identical comment. Is there any way you possibly can take away me from that service? Thanks!

  12. 12 fheifhei said at 4:40 am on February 11th, 2011:

    I really find mtss is a interesting subject. Never looked at this subject in this way. If you are going to write more articles relating to this subject, I definitely will be back soon!

  13. 13 Carroll B. Merriman said at 12:49 pm on February 13th, 2011:

    Where did you got this much info on your blog from?? Also can i take the initiave to take the feeds from your blog for my yoga website?? But cant find the RSS feeds link here!!

  14. 14 bad credit bank accounts said at 9:44 am on February 15th, 2011:

    If you’re a new house owner, you can keep the house as being a security.
    basic bank account

  15. 15 spyware removal software said at 7:18 am on February 16th, 2011:

    Salutations, i am excited to read the whole content on this blog post and am very elated and excited to guess that the blogger has done a very good job here to put all the best stuff and information at one place, I will tell others about this information with a recommendation on my site.

  16. 16 Josefa Pelosi said at 12:03 pm on February 16th, 2011:

    I’d have to give carte blanche with you here. Which is not something I typically do! I enjoy reading a post that will make people think. Also, thanks for allowing me to comment!

  17. 17 business management said at 8:00 pm on February 16th, 2011:

    Intriguing post. I have been searching for some good resources for solar panels and discovered your blog. Planning to bookmark this one!…

    I REALLY liked your post and blog! It took me a minute bit to find your site…but I bookmarked it. Would you mind if I posted a link back to your post? …

  18. 18 tlpGNx said at 12:47 am on February 19th, 2011:


  19. 19 OizTJowL said at 12:56 am on February 19th, 2011: