AES crypto in pure Python?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andrew.fabbro@gmail.com

    #1

    AES crypto in pure Python?

    I'm looking for an implementation of AES (the Advanced Encryption
    Standard) in pure Python. I'm aware of pycrypto, but that uses C code.
    I'm hoping to find something that only uses Python...I'm willing to
    trade speed for portability, since my application is designed for
    several different platforms.

    Anyone know if this has been done?

    Thanks,


    -AF

  • Lucas Raab

    #2
    Re: AES crypto in pure Python?

    andrew.fabbro@g mail.com wrote:[color=blue]
    > I'm looking for an implementation of AES (the Advanced Encryption
    > Standard) in pure Python. I'm aware of pycrypto, but that uses C code.
    > I'm hoping to find something that only uses Python...I'm willing to
    > trade speed for portability, since my application is designed for
    > several different platforms.
    >
    > Anyone know if this has been done?
    >
    > Thanks,
    >
    >
    > -AF
    >[/color]

    Google....

    Comment

    • Fuzzyman

      #3
      Re: AES crypto in pure Python?


      andrew.fabbro@g mail.com wrote:[color=blue]
      > I'm looking for an implementation of AES (the Advanced Encryption
      > Standard) in pure Python. I'm aware of pycrypto, but that uses C[/color]
      code.[color=blue]
      > I'm hoping to find something that only uses Python...I'm willing to
      > trade speed for portability, since my application is designed for
      > several different platforms.
      >
      > Anyone know if this has been done?
      >[/color]

      I'm afraid my internet is heavily restricted, so I can't check for you.
      *But* there is a 'tlslite' module which implements several encryption
      methods in pure python. I *think* AES is one of them.

      Regards,

      Fuzzy
      http://www.voidspace.org.uk/python/index.shtml

      [color=blue]
      > Thanks,
      >
      >
      > -AF[/color]

      Comment

      • Paul Rubin

        #4
        Re: AES crypto in pure Python?

        andrew.fabbro@g mail.com writes:[color=blue]
        > I'm looking for an implementation of AES (the Advanced Encryption
        > Standard) in pure Python. I'm aware of pycrypto, but that uses C code.
        > I'm hoping to find something that only uses Python...I'm willing to
        > trade speed for portability, since my application is designed for
        > several different platforms.
        >
        > Anyone know if this has been done?[/color]

        Yes, it's been done a few times, you should be able to find some with
        a web search. The ones I've seen are WAY too slow for most
        applications, like a few blocks per second. If you don't require
        using AES, there are some alternatives possible, like using the
        built-in sha module as the round function for a Feistel cipher, or
        using it in OFB mode as a keystream generator. I have some examples
        of how to do either of these, if you want to see them.

        Comment

        Working...