AES Written in PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David T. Ashley

    #1

    AES Written in PHP?

    Is anyone aware of any already-written code I can use that implements
    AES-192 in PHP?

    BACKGROUND:

    I don't have mcrypt compiled into my PHP, and I have an application where I
    need to encrypt and decrypt 128 bits (1 block only) using AES-192.

    My plan is to implement AES in PHP (directly, as PHP code).

    I did a speed test with PHP, and a loop with 10,000 iterations, with each
    iteration containing several bitwise manipulations and random number
    generations, required 0.11 seconds to complete on my server. I'm sure that
    one block of AES is less CPU cycles than that, so the upper limit on the
    server time to do one block should be 0.11 seconds of server time. This is
    OK for my application.

    If somebody has code already, this would be easier ...

    Thanks.
    --
    David T. Ashley (dta@e3ft.com)
    http://www.e3ft.com (Consulting Home Page)
    http://www.dtashley.com (Personal Home Page)
    http://gpl.e3ft.com (GPL Publications and Projects)


  • C.

    #2
    Re: AES Written in PHP?

    On 16 May, 16:50, "David T. Ashley" <d...@e3ft.comw rote:
    Is anyone aware of any already-written code I can use that implements
    AES-192 in PHP?
    >
    Is this different from RIJNDAEL-192 (available in mcrypt)?

    C.


    Comment

    • David T. Ashley

      #3
      Re: AES Written in PHP?

      "C." <colin.mckinnon @gmail.comwrote in message
      news:1179333341 .917076.136120@ p77g2000hsh.goo glegroups.com.. .
      On 16 May, 16:50, "David T. Ashley" <d...@e3ft.comw rote:
      >Is anyone aware of any already-written code I can use that implements
      >AES-192 in PHP?
      >>
      >
      Is this different from RIJNDAEL-192 (available in mcrypt)?
      >
      RIJNDAEL-192 is AES-192. Same thing.

      The issue is that I get my PHP packages precompiled, without mcrypt, and it
      is my understanding that I'd have to recompile PHP with an extra option to
      get mcrypt functionality. I don't want to do that if I don't have to.

      Did I get the technical details wrong?

      Thanks.
      --
      David T. Ashley (dta@e3ft.com)
      http://www.e3ft.com (Consulting Home Page)
      http://www.dtashley.com (Personal Home Page)
      http://gpl.e3ft.com (GPL Publications and Projects)


      Comment

      • Schraalhans Keukenmeester

        #4
        Re: AES Written in PHP?

        At Wed, 16 May 2007 15:37:10 -0400, David T. Ashley let his monkeys type:
        "C." <colin.mckinnon @gmail.comwrote in message
        news:1179333341 .917076.136120@ p77g2000hsh.goo glegroups.com.. .
        >On 16 May, 16:50, "David T. Ashley" <d...@e3ft.comw rote:
        >>Is anyone aware of any already-written code I can use that implements
        >>AES-192 in PHP?
        >>>
        >>
        >Is this different from RIJNDAEL-192 (available in mcrypt)?
        >>
        >
        RIJNDAEL-192 is AES-192. Same thing.
        >
        The issue is that I get my PHP packages precompiled, without mcrypt, and it
        is my understanding that I'd have to recompile PHP with an extra option to
        get mcrypt functionality. I don't want to do that if I don't have to.
        >
        Did I get the technical details wrong?
        >
        Thanks.
        You could load the module from your code using dl(). It is not ideal,
        slow, but in the given situation...


        HTH
        Sh.

        Comment

        Working...