Add IPCrypt support in Sodium extension
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- backend, cryptography
Rechercherichtung
Start by reading PHP's Sodium extension and the linked libsodium IPCrypt documentation to understand how the requested functions map to the library API. The issue lists the constants and functions to add, but does not identify source files or tests; locate those entry points and existing Sodium tests first. Done means the listed IPCrypt constants and functions are exposed with behavior matching libsodium.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
libsodium exposes IPCrypt features since version 1.0.21 (January 6, 2026): https://libsodium.gitbook.io/doc/secret-key_cryptography/ip_address_encryption
There is IPCrypt userspace implementation for PHP: https://github.com/jedisct1/php-ipcrypt
But since we are shipping sodium in PHP, it would be nice to also natively have the sodium IPCrypt functions in PHP.
This would mean adding the following constants and functions:
const SODIUM_CRYPTO_IPCRYPT_NDX_TWEAKBYTES;
// Utils
sodium_ip2bin(string $ip): string
sodium_bin2ip(string $binary): string
// Deterministic
sodium_crypto_ipcrypt_keygen(): string
sodium_crypto_ipcrypt_encrypt(string $binary_ip, string $key): string
sodium_crypto_ipcrypt_decrypt(string $binary_encrypted_ip, string $key): string
// Non-deterministic (ND)
sodium_crypto_ipcrypt_nd_keygen(): string
sodium_crypto_ipcrypt_nd_encrypt(string $binary_ip, string $key): string
sodium_crypto_ipcrypt_nd_decrypt(string $binary_encrypted_ip, string $key): string
// Prefix-preserving encryption (PFX)
sodium_crypto_ipcrypt_pfx_keygen(): string
sodium_crypto_ipcrypt_pfx_encrypt(string $binary_ip, string $key): string
sodium_crypto_ipcrypt_pfx_decrypt(string $binary_encrypted_ip, string $key): string
// Extended non-deterministic encryption (NDX)
sodium_crypto_ipcrypt_ndx_keygen(): string
sodium_crypto_ipcrypt_ndx_encrypt(string $binary_ip, string $key, string $tweak): string
sodium_crypto_ipcrypt_ndx_decrypt(string $binary_encrypted_ip, string $key): string
- Vorherrschende Sprache
- C
- Sterne
- 41.8k
- Forks
- 8.5k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 137
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus php/php-src
-
SNMP accepts malformed remote portsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 62/100
php/php-src#25137 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bug Status: Needs Triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
-
quoted_printable_encode() produces lines longer than 76 characters for bytes 0xF5 to 0xFFEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Bug Status: Needs Triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
php/php-src#24196 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Feature Status: Needs Triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
php/php-src#24183 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
enhancement good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
bug multiplayer status: planned
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
ChupathingyCE/chupathingyce#851 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
HigherOrderCO/Bend#2104 ·
-
research-radar
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue help wanted program
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
hffgzktbcc-blip/ounce-core#297 ·
Maintainer antworten meist innerhalb von 1 Tag