473,435 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,435 software developers and data experts.

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 (dt*@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)
May 16 '07 #1
3 8401
C.
On 16 May, 16:50, "David T. Ashley" <d...@e3ft.comwrote:
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.
May 16 '07 #2
"C." <co************@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
On 16 May, 16:50, "David T. Ashley" <d...@e3ft.comwrote:
>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 (dt*@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)
May 16 '07 #3
At Wed, 16 May 2007 15:37:10 -0400, David T. Ashley let his monkeys type:
"C." <co************@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
>On 16 May, 16:50, "David T. Ashley" <d...@e3ft.comwrote:
>>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...
http://www.php.net/manual/en/function.dl.php

HTH
Sh.
May 16 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel | last post by:
when writing out a file from .net, when is the file created? after the bytes are all written to the hard drive or before the bytes are written to the hard drive?
1
by: Daniel | last post by:
System.IO.StreamWriter Close or Flush method to shut down the computer in such a way that just part of the file is written? or an empty file is written? Also if the Close or Flush is to a...
13
by: Ben | last post by:
Could anyone suggest an open source project that has particularly well written Python? I am especially looking for code that people would describe as "very Python-ic". (Not trying to start any...
12
by: Unbiased_me | last post by:
Hi There I recently read in book that the C compiler is written in C. I unable to comprehend the concept behind this. How is the compiler design started...Where dodoes one start. I tried...
132
by: Kevin Spencer | last post by:
About 2 years ago, and as recently as perhaps 1 year ago, I can recall seeing many posts about what language to use with ASP.Net. The consensus was that employers paid more for C# programmers, and...
4
by: switzerland qunatium computer | last post by:
Machine intelligence- can this program be written ?? Machine intelligence- can this program be written ??
3
by: KidSensation | last post by:
Hello all, I ran into a couple applications written in c#, but we do not have the full version of visual studio.net 2003, so I thought they were most likely written in the beta version. After...
14
by: Franz Steinhäusler | last post by:
Hello NG, wWhat are the best programs in your opinion, written entirly in pyhton, divided into categories like: a) Games b) Utilities/System c) Office d) Web/Newsreader/Mail/Browser ....
61
by: giveitawhril2008 | last post by:
I'm just learning about Python now and it sounds interesting. But I just read (on the Wiki page) that mainstream Python was written in C. That's what I was searching for: Python was written in what...
0
by: Phil Runciman | last post by:
On 20 jul, 19:50, giveitawhril2...@gmail.com wrote: ".. if Python is so hot.." Python represents progress not the ultimate goal. Thank goodness we are continuing to learn from past mistakes. ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.