Hi,

I am currently looking for an aes-gcm impl in PHP, and contemplating
> building my own openssl wrapper to expose access.
>

You can actually use aes-256-gcm or its 128 and 192 variants (check
openssl_get_cipher_methods). GCM is a cipher mode so you can use it in
openssl_encrypt and openssl_decrypt.

However the current php openssl extension is not very nice. It's missing
lots of features and functions supported in OpenSSL lib. The API is only
functional and the implementation is not great.

I decided to create a new objective binding for OpenSSL crypto lib. It's
available on https://github.com/bukka/php-crypto . The extension is in
development and only few features are available. Currently there are two
usable classes Crypt\Cipher and Crypto\Digest. They are sort of context
wrappers that have support for init / update / final methods. Please see
the API doc and examples in README for more details.

I have quite a big TODO list where also are CMAC and HMAC (authentication
mode algorightms) that are not currently supported in any PHP extension as
far as I am aware.

If anyone wants to help, I will be more than happy. OpenSSL has lots of
interesting functions and it would be great if they were available in PHP.
I am not a cryptography expert so if you have any ideas what would be
useful, feel free to create a new issue in
https://github.com/bukka/php-crypto/issues . If you want to help with
implementation, it's even better. But as I said I will be happy for any
help... ;)

Jakub

Reply via email to