Commit graph

26 commits

Author SHA1 Message Date
haszi
20c49f8524
Move PASSWORD constants to stubs (#13349) 2024-02-12 22:37:32 +01:00
Máté Kocsis
4679805cd6
Declare ext/sodium constants in stubs (#9225) 2022-08-02 13:57:52 +02:00
Máté Kocsis
a1a8e9032c
Remove unnecessary PHP_FUNCTION() declarations (#7472) 2021-09-07 10:04:00 +02:00
P.I.E. Security Team
9b794f8e5e
Expose libsodium's Ristretto255 API (#6922) 2021-05-07 17:43:00 -05:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
P.I.E. Security Team
f7f1f7fce2
Add crypto_stream_xchacha20 to ext/sodium (#6868)
Paragon Initiative Enterprises is aware of PHP applications that use sodium_compat's ParagonIE\Sodium\Core\XChaCha20 class directly for stream encryption.

Greater performance and security assurance is offered by exposing libsodium's crypto_stream_xchacha20 API to PHP users.

It's acceptable to only include this change in PHP 8.1+; the offending applications are more than welcome to either install ext/sodium from PECL or upgrade to 8.1 when it comes out later this year.

Ref: https://github.com/jedisct1/libsodium-php/pull/211
2021-04-19 11:04:29 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Sara Golemon
0ba1db7a4a Provide argon2i(d) password hashing from sodium when needed 2019-07-07 21:53:43 -04:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Frank Denis
72f7d0b184 ext/sodium: import bindings for secretstream 2017-10-02 21:59:51 +02:00
Frank Denis
7d53e65125 ext/sodium: add crypto_pwhash_str_needs_rehash()
Also properly define xchacha20poly1305_ietf_keygen()
2017-10-02 21:54:50 +02:00
Frank Denis
e22094eb13 ext/sodium: +base64 codecs (timing-safe) 2017-10-02 21:43:54 +02:00
Frank Denis
6383c6e3d0 ext/sodium: sort functions list 2017-08-29 19:22:17 +02:00
Frank Denis
3691f36913 sodium ext: add bindings for sodium_pad() and sodium_unpad() 2017-08-24 16:12:18 +02:00
Frank Denis
8a2e747a7b sodium ext: remove redundant and obsolete macros 2017-07-22 17:50:22 +02:00
Frank Denis
09b15e4f30 sodium ext: implement sodium_crypto_kdf()
Also add zend_parse_parameters_none() statements where appropriate.
2017-07-18 14:42:15 +02:00
Frank Denis
aa32d989c7 sodium ext: remove unused sodium_randombytes_*() prototypes 2017-07-13 18:59:58 +02:00
Frank Denis
b071fcb81d sodium ext: add bindings for keygen() functions
This is the recommended way to generate keys correctly for all operations
using a single key, since libsodium 1.0.12.
2017-07-12 23:29:48 +02:00
Frank Denis
8e8fbf51f7 sodium ext: sort prototypes 2017-07-12 23:06:43 +02:00
Frank Denis
6ac6d2c64a
sodium ext: update the crypto_kx_*() API to the libsodium one
The crypto_kx API initially present in the PHP bindings was a prototype
that was not part of libsodium.

This implements the one from libsodium >= 1.0.12.

We can later leverage the native libsodium functions if we decide that
1.0.12 is the minimum version we want to support.
2017-07-12 08:25:38 +01:00
Frank Denis
dfac71d096
Revert "fix macro redifinitions"
This reverts commit cbbf579f21.
2017-07-12 08:25:35 +01:00
Anatol Belski
cbbf579f21 fix macro redifinitions 2017-07-11 10:01:37 +02:00
Remi Collet
d269aa2003 fix authors 2017-07-11 07:43:56 +02:00
Paragon Initiative Enterprises
5cfa26c181 Squashed commit - Add ext/sodium
RFC: https://wiki.php.net/rfc/libsodium
Licensing: https://web.archive.org/web/20170710161517/https://github.com/jedisct1/libsodium-php/issues/127
2017-07-11 07:25:50 +02:00