Re: [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API
| From: | Nicolas Grekas | Date: | Thu, 19 Jun 2025 11:49:47 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Add RFC 4648 compliant data encoding API | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127717@lists.php.net to get a copy of this message | ||
Hi Ignace
I'd like to start the discussion for a new RFC about adding RFC 4648
> compliant data encoding API
>
> RFC proposal link: https://wiki.php.net/rfc/data_encoding_api
> If passed, Tim Düsterhus has volunteered to do the implementation.
>
> Thanks in advance for your remarks and comments.
>
> Best regards,
> Ignace Nyamagana Butera
>
Thanks for the RFC!
Here my doleance about it:
- please make base58 part of the RFC - it's already widely used and having
it implemented in C would be great. See
https://github.com/php/php-src/issues/15195
- it'd be great to default to url-safe base64. The RFC-compliant variant is
a very common risk, it'd be great to be on the safe side by default
- why do we need to decide between constant-time and unprotected? Can't we
always go for the constant-time behavior? If not, what about defaulting to
constant-time, again, safe by default?
- about DecodingMode, shouldn't this be Lenient by default, following the
robustness principle?
- (base85 looks great and would be nice to have also :) )
Cheers,
Nicolas