Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68620 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44922 invoked from network); 24 Aug 2013 19:16:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2013 19:16:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.48 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.216.48 mail-qa0-f48.google.com Received: from [209.85.216.48] ([209.85.216.48:42301] helo=mail-qa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/F4-05399-88609125 for ; Sat, 24 Aug 2013 15:16:24 -0400 Received: by mail-qa0-f48.google.com with SMTP id o19so969706qap.7 for ; Sat, 24 Aug 2013 12:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=sIcB4rztDva0SppGu/tt90Vd7Mdgd35dR3jn4F3KzlY=; b=GYQMjm6pULiUajxyWQVdlCxjlb46iwftmcVA5F4HdzXrVnv7TRn4R5fGWzCtI2d/V5 +oSDDHOuXSHBK+wsbN+9CCUZMQ5l1tLFrWacPmSPj2u0cJM5IwKNNt9nSVrs+XEI569C MmV3p3Jt1xAcR3Q2PU3gX3+PhBhFCybt1L0mYPOT1UzKYikX1VprRMEPKfpHTHfWbgcH vT3XYyc9jWLGrW2EmuM+OVWtQq5UuDKG3GCalvKFDjoM2523mg+N7avzoywzHRAM1FQZ SxaAEqTG99l3fG8krp/fOydklGEY3MkNVSpgSQV97Y72yDXcZzsnDv9CTkXaiWXVX60J 7DYQ== MIME-Version: 1.0 X-Received: by 10.224.19.133 with SMTP id a5mr6264202qab.54.1377371781522; Sat, 24 Aug 2013 12:16:21 -0700 (PDT) Sender: jakub.php@gmail.com Received: by 10.224.69.199 with HTTP; Sat, 24 Aug 2013 12:16:21 -0700 (PDT) In-Reply-To: References: <505B2CA7.6050505@codeangel.org> Date: Sat, 24 Aug 2013 20:16:21 +0100 X-Google-Sender-Auth: W7NFQnykPzXUw75VKqV6BhIagRY Message-ID: To: John Goodwin Cc: PHP internals list , g.b.yahav@gmail.com, Chad Emrys Content-Type: multipart/alternative; boundary=001a11c1e998c2ed6304e4b65b7f Subject: Re: [PHP-DEV] Authenticated Encryption in PHP From: bukka@php.net (Jakub Zelenka) --001a11c1e998c2ed6304e4b65b7f Content-Type: text/plain; charset=ISO-8859-1 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 --001a11c1e998c2ed6304e4b65b7f--