Re: Constant-Time Encoding Functions
| From: | Yasuo Ohgaki | Date: | Sat, 24 Jan 2015 23:33:12 +0000 |
| Subject: | Re: Constant-Time Encoding Functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81098@lists.php.net to get a copy of this message | ||
Hi Scott,
On Fri, Jan 23, 2015 at 12:21 AM, Scott Arciszewski <scott@arciszewski.me>
wrote:
> I've squashed and rebased my pull request that adds a cache-timing-safe
> bin2hex implementation (named ts_bin2hex) to PHP.
>
> https://github.com/php/php-src/pull/909
>
> Before I put more effort into the inverse operation (which, from what I can
> tell, is already constant-time), does anyone have a better naming
> convention suggestion?
>
First of all, I'm +1 for having dedicated API for these functions. i.e. Not
an option for existing functions.
I would rather postfix 'ts'. e.g. bin2hex_ts
The reason why I prefer postfix is PHP functions are named like
'module name' _ 'function name'
ts_*() seems like module function.
Furthermore, should a similar effort be expended for base64
> encoding/decoding functions?
>
base64 is used to encode binary to text commonly. If it can be timing safe,
it would be great!
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net