From e4796fd88d5c38e3ea2ed4a1b252e3055d766651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 16 Oct 2024 18:27:15 -0300 Subject: [PATCH 1/2] [PHP 8.4] Add new Sodium functions and constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- reference/sodium/constants.xml | 88 +++++++++++++++++ .../sodium-crypto-aead-aegis128l-decrypt.xml | 96 +++++++++++++++++++ .../sodium-crypto-aead-aegis128l-encrypt.xml | 96 +++++++++++++++++++ .../sodium-crypto-aead-aegis128l-keygen.xml | 60 ++++++++++++ .../sodium-crypto-aead-aegis256-decrypt.xml | 96 +++++++++++++++++++ .../sodium-crypto-aead-aegis256-encrypt.xml | 96 +++++++++++++++++++ .../sodium-crypto-aead-aegis256-keygen.xml | 60 ++++++++++++ reference/sodium/versions.xml | 6 ++ 8 files changed, 598 insertions(+) create mode 100644 reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml create mode 100644 reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml create mode 100644 reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml create mode 100644 reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml create mode 100644 reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml create mode 100644 reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml diff --git a/reference/sodium/constants.xml b/reference/sodium/constants.xml index 5b49cb868c90..df97a9f07c0b 100644 --- a/reference/sodium/constants.xml +++ b/reference/sodium/constants.xml @@ -76,6 +76,94 @@ + + + SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES + (int) + + + + Available as of PHP 8.4.0. + + + + + + SODIUM_CRYPTO_AEAD_AEGIS128L_NSECBYTES + (int) + + + + Available as of PHP 8.4.0. + + + + + + SODIUM_CRYPTO_AEAD_AEGIS128L_NPUBBYTES + (int) + + + + Available as of PHP 8.4.0. + + + + + + SODIUM_CRYPTO_AEAD_AEGIS128L_ABYTES + (int) + + + + Available as of PHP 8.4.0. + + + + + + SODIUM_CRYPTO_AEAD_AEGIS256_KEYBYTES + (int) + + + + Available as of PHP 8.4.0. + + + + + + SODIUM_CRYPTO_AEAD_AEGIS256_NSECBYTES + (int) + + + + Available as of PHP 8.4.0. + + + + + + SODIUM_CRYPTO_AEAD_AEGIS256_NPUBBYTES + (int) + + + + Available as of PHP 8.4.0. + + + + + + SODIUM_CRYPTO_AEAD_AEGIS256_ABYTES + (int) + + + + Available as of PHP 8.4.0. + + + SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml new file mode 100644 index 000000000000..7f22ee9d9a9f --- /dev/null +++ b/reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml @@ -0,0 +1,96 @@ + + + + + sodium_crypto_aead_aegis128l_decrypt + Verify then decrypt a message with AEGIS-128L + + + + &reftitle.description; + + stringfalsesodium_crypto_aead_aegis128l_decrypt + stringciphertext + stringadditional_data + stringnonce + #[\SensitiveParameter]stringkey + + + Verify then decrypt a message with AEGIS-128L. + + + + + &reftitle.parameters; + + + ciphertext + + + Must be in the format provided by sodium_crypto_aead_aegis128l_encrypt. + + + + + additional_data + + + Additional, authenticated data. This is used in the verification of the authentication tag + appended to the ciphertext, but it is not encrypted or stored in the ciphertext. + + + + + nonce + + + A number that must be only used once, per message. + + + + + key + + + Encryption key (128-bit). + + + + + + + + &reftitle.returnvalues; + + Returns the plaintext on success, &return.falseforfailure;. + + + + + &reftitle.seealso; + + sodium_crypto_aead_aegis128l_encrypt + sodium_crypto_aead_aegis128l_keygen + + + + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml new file mode 100644 index 000000000000..e6a1d7a4d24d --- /dev/null +++ b/reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml @@ -0,0 +1,96 @@ + + + + + sodium_crypto_aead_aegis128l_encrypt + Encrypt then authenticate a message with AEGIS-128L + + + + &reftitle.description; + + stringsodium_crypto_aead_aegis128l_encrypt + #[\SensitiveParameter]stringmessage + stringadditional_data + stringnonce + #[\SensitiveParameter]stringkey + + + Encrypt then authenticate a message with AEGIS-128L. + + + + + &reftitle.parameters; + + + message + + + The plaintext message to encrypt. + + + + + additional_data + + + Additional, authenticated data. This is used in the verification of the authentication tag + appended to the ciphertext, but it is not encrypted or stored in the ciphertext. + + + + + nonce + + + A number that must be only used once, per message. + + + + + key + + + Encryption key (128-bit). + + + + + + + + &reftitle.returnvalues; + + Returns the ciphertext and authentication tag as a string of raw binary bytes. + + + + + &reftitle.seealso; + + sodium_crypto_aead_aegis128l_decrypt + sodium_crypto_aead_aegis128l_keygen + + + + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml b/reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml new file mode 100644 index 000000000000..64faef52051e --- /dev/null +++ b/reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml @@ -0,0 +1,60 @@ + + + + + sodium_crypto_aead_aegis128l_keygen + Generate a random AEGIS-128L key + + + + &reftitle.description; + + stringsodium_crypto_aead_aegis128l_keygen + + + + Generate a random key for use with sodium_crypto_aead_aegis128l_encrypt and + sodium_crypto_aead_aegis128l_decrypt. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns a 128-bit random key. + + + + + &reftitle.seealso; + + sodium_crypto_aead_aegis128l_decrypt + sodium_crypto_aead_aegis128l_encrypt + + + + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml new file mode 100644 index 000000000000..ce0289b9abac --- /dev/null +++ b/reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml @@ -0,0 +1,96 @@ + + + + + sodium_crypto_aead_aegis256_decrypt + Verify then decrypt a message with AEGIS-256 + + + + &reftitle.description; + + stringfalsesodium_crypto_aead_aegis256_decrypt + stringciphertext + stringadditional_data + stringnonce + #[\SensitiveParameter]stringkey + + + Verify then decrypt a message with AEGIS-256. + + + + + &reftitle.parameters; + + + ciphertext + + + Must be in the format provided by sodium_crypto_aead_aegis256_encrypt. + + + + + additional_data + + + Additional, authenticated data. This is used in the verification of the authentication tag + appended to the ciphertext, but it is not encrypted or stored in the ciphertext. + + + + + nonce + + + A number that must be only used once, per message. + + + + + key + + + Encryption key (256-bit). + + + + + + + + &reftitle.returnvalues; + + Returns the plaintext on success, &return.falseforfailure;. + + + + + &reftitle.seealso; + + sodium_crypto_aead_aegis256_encrypt + sodium_crypto_aead_aegis256_keygen + + + + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml new file mode 100644 index 000000000000..ad49d87c1a3c --- /dev/null +++ b/reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml @@ -0,0 +1,96 @@ + + + + + sodium_crypto_aead_aegis256_encrypt + Encrypt then authenticate a message with AEGIS-256 + + + + &reftitle.description; + + stringsodium_crypto_aead_aegis256_encrypt + #[\SensitiveParameter]stringmessage + stringadditional_data + stringnonce + #[\SensitiveParameter]stringkey + + + Encrypt then authenticate a message with AEGIS-256. + + + + + &reftitle.parameters; + + + message + + + The plaintext message to encrypt. + + + + + additional_data + + + Additional, authenticated data. This is used in the verification of the authentication tag + appended to the ciphertext, but it is not encrypted or stored in the ciphertext. + + + + + nonce + + + A number that must be only used once, per message. + + + + + key + + + Encryption key (256-bit). + + + + + + + + &reftitle.returnvalues; + + Returns the ciphertext and authentication tag as a string of raw binary bytes. + + + + + &reftitle.seealso; + + sodium_crypto_aead_aegis256_decrypt + sodium_crypto_aead_aegis256_keygen + + + + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml b/reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml new file mode 100644 index 000000000000..f9404eb2eec9 --- /dev/null +++ b/reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml @@ -0,0 +1,60 @@ + + + + + sodium_crypto_aead_aegis256_keygen + Generate a random AEGIS-256 key + + + + &reftitle.description; + + stringsodium_crypto_aead_aegis256_keygen + + + + Generate a random key for use with sodium_crypto_aead_aegis256_encrypt and + sodium_crypto_aead_aegis256_decrypt. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns a 256-bit random key. + + + + + &reftitle.seealso; + + sodium_crypto_aead_aegis256_decrypt + sodium_crypto_aead_aegis256_encrypt + + + + diff --git a/reference/sodium/versions.xml b/reference/sodium/versions.xml index 589be141ac1e..19d33f4906a3 100644 --- a/reference/sodium/versions.xml +++ b/reference/sodium/versions.xml @@ -8,6 +8,12 @@ + + + + + + From 4876e38e347967cb71f803b77b95a84c797013aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Tue, 22 Oct 2024 16:13:53 -0300 Subject: [PATCH 2/2] Replace tags with tags --- .../sodium-crypto-aead-aegis128l-decrypt.xml | 24 +++++++++---------- .../sodium-crypto-aead-aegis128l-encrypt.xml | 24 +++++++++---------- .../sodium-crypto-aead-aegis128l-keygen.xml | 10 ++++---- .../sodium-crypto-aead-aegis256-decrypt.xml | 24 +++++++++---------- .../sodium-crypto-aead-aegis256-encrypt.xml | 24 +++++++++---------- .../sodium-crypto-aead-aegis256-keygen.xml | 10 ++++---- 6 files changed, 58 insertions(+), 58 deletions(-) diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml index 7f22ee9d9a9f..452584225c96 100644 --- a/reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml +++ b/reference/sodium/functions/sodium-crypto-aead-aegis128l-decrypt.xml @@ -15,9 +15,9 @@ stringnonce #[\SensitiveParameter]stringkey - + Verify then decrypt a message with AEGIS-128L. - + @@ -26,34 +26,34 @@ ciphertext - + Must be in the format provided by sodium_crypto_aead_aegis128l_encrypt. - + additional_data - + Additional, authenticated data. This is used in the verification of the authentication tag appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - + nonce - + A number that must be only used once, per message. - + key - + Encryption key (128-bit). - + @@ -61,9 +61,9 @@ &reftitle.returnvalues; - + Returns the plaintext on success, &return.falseforfailure;. - + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml index e6a1d7a4d24d..0b33f7d352b6 100644 --- a/reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml +++ b/reference/sodium/functions/sodium-crypto-aead-aegis128l-encrypt.xml @@ -15,9 +15,9 @@ stringnonce #[\SensitiveParameter]stringkey - + Encrypt then authenticate a message with AEGIS-128L. - + @@ -26,34 +26,34 @@ message - + The plaintext message to encrypt. - + additional_data - + Additional, authenticated data. This is used in the verification of the authentication tag appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - + nonce - + A number that must be only used once, per message. - + key - + Encryption key (128-bit). - + @@ -61,9 +61,9 @@ &reftitle.returnvalues; - + Returns the ciphertext and authentication tag as a string of raw binary bytes. - + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml b/reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml index 64faef52051e..d5e0644d7974 100644 --- a/reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml +++ b/reference/sodium/functions/sodium-crypto-aead-aegis128l-keygen.xml @@ -10,12 +10,12 @@ &reftitle.description; stringsodium_crypto_aead_aegis128l_keygen - + - + Generate a random key for use with sodium_crypto_aead_aegis128l_encrypt and sodium_crypto_aead_aegis128l_decrypt. - + @@ -25,9 +25,9 @@ &reftitle.returnvalues; - + Returns a 128-bit random key. - + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml index ce0289b9abac..37f21f0659e7 100644 --- a/reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml +++ b/reference/sodium/functions/sodium-crypto-aead-aegis256-decrypt.xml @@ -15,9 +15,9 @@ stringnonce #[\SensitiveParameter]stringkey - + Verify then decrypt a message with AEGIS-256. - + @@ -26,34 +26,34 @@ ciphertext - + Must be in the format provided by sodium_crypto_aead_aegis256_encrypt. - + additional_data - + Additional, authenticated data. This is used in the verification of the authentication tag appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - + nonce - + A number that must be only used once, per message. - + key - + Encryption key (256-bit). - + @@ -61,9 +61,9 @@ &reftitle.returnvalues; - + Returns the plaintext on success, &return.falseforfailure;. - + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml b/reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml index ad49d87c1a3c..cf3c13f6c29b 100644 --- a/reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml +++ b/reference/sodium/functions/sodium-crypto-aead-aegis256-encrypt.xml @@ -15,9 +15,9 @@ stringnonce #[\SensitiveParameter]stringkey - + Encrypt then authenticate a message with AEGIS-256. - + @@ -26,34 +26,34 @@ message - + The plaintext message to encrypt. - + additional_data - + Additional, authenticated data. This is used in the verification of the authentication tag appended to the ciphertext, but it is not encrypted or stored in the ciphertext. - + nonce - + A number that must be only used once, per message. - + key - + Encryption key (256-bit). - + @@ -61,9 +61,9 @@ &reftitle.returnvalues; - + Returns the ciphertext and authentication tag as a string of raw binary bytes. - + diff --git a/reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml b/reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml index f9404eb2eec9..0953540a5867 100644 --- a/reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml +++ b/reference/sodium/functions/sodium-crypto-aead-aegis256-keygen.xml @@ -10,12 +10,12 @@ &reftitle.description; stringsodium_crypto_aead_aegis256_keygen - + - + Generate a random key for use with sodium_crypto_aead_aegis256_encrypt and sodium_crypto_aead_aegis256_decrypt. - + @@ -25,9 +25,9 @@ &reftitle.returnvalues; - + Returns a 256-bit random key. - +