PHP Implementation

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
philios33
Posts: 4
Joined: Fri Dec 05, 2014 12:27 am
Contact:

PHP Implementation

Post by philios33 » Fri Dec 05, 2014 12:31 am

Hi

I have made a PHP Implementation of your wonderful file format as I think it could be really useful for PHP developers.
https://github.com/philios33/PHP-AES-File-Encryption

Is there a way to get a link to the source on to your website on this page?
https://www.aescrypt.com/download/

Thanks

Phil

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: PHP Implementation

Post by paulej » Fri Dec 05, 2014 6:30 am

Yeah, sure. I'll try to post a link this weekend.

Does this encrypt a string or a file. Here's another PHP implementation:http://forums.packetizer.com/viewtopic.php?f=72&t=403

I suppose I should link to both, but I should say more than just php. Want to suggest a very short description?

philios33
Posts: 4
Joined: Fri Dec 05, 2014 12:27 am
Contact:

Re: PHP Implementation

Post by philios33 » Fri Dec 05, 2014 12:42 pm

Thanks for that.

It encrypts the whole file like the other software on your site.

I would say the one above is a port of the java class. One problem I found is that extension blocks cant be more than 255 bytes long but the documentation suggests that extension blocks length is defined using two octets. So I think that part is implemented incorrectly, but maybe a good excuse to start a new conversation thread about.

My one is a similar implementation which wraps around a AES256 implementation. Essentially they do the same thing. My one includes some automatic dynamic file naming conventions. It also has test cases and I have also tested with the windows software on your site. E.g. Encrypt in php using the lib, and decrypt using application. Also all AES operations are abstracted out so if you dont have PHP mcrypt, you can implement it yourself. There is more details in the README.md file on github. I plan to make more test cases soon and of course welcome community contributions.

For description you could use almost the same as the java one.
"AES Crypt source code (PHP) (This code is for integrating AES Crypt functionality into your PHP applications.)"

or maybe better to add under Git repositories (since i am a 3rd party) as "PHP source code"

Thanks

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: PHP Implementation

Post by paulej » Sat Jan 03, 2015 7:24 pm

Sorry for taking so long. There is now a link to your code from the AES Crypt "download" page: https://www.aescrypt.com/download/

philios33
Posts: 4
Joined: Fri Dec 05, 2014 12:27 am
Contact:

Re: PHP Implementation

Post by philios33 » Fri Jan 23, 2015 9:25 pm

Hi Paul

Thanks for that.

I wonder if you have any sample .aes files which use the older formats (version 0 and 1). I have implemented decryption for these formats but I have no way to test my library without any samples. A google search came up dry and the windows software doesn't write the older versions. I also dont plan to implement writing the older versions, but it would be nice to test the reading.

Thanks again

Phil

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: PHP Implementation

Post by paulej » Sat Jan 24, 2015 7:47 am

I don't, but all older versions can still be downloaded. Normally, I'd offer to create some for you, but I won't have time anytime soon.

On the download page, you'll see a link to an evernote page with a signed listing of every version. For v0 file formats, get a v1 release. For v1 file format, grab a v2, etc. The newest in a given series is likely best to use. The pathname to the files is relative to /download/.

The odd filename is the v0 string encryption code. It only creates a v0 encrypted file. I can't remember what it decrypts, but I'll guess all versions. It is so named for no logical reason.

Post Reply