tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New function: consttime_memcmp(3)



On Mon, Mar 16, 2015 at 01:13:26AM +0000, Taylor R Campbell wrote:
>    Date: Mon, 16 Mar 2015 01:58:19 +0100
>    From: "Kamil Rytarowski" <n54%gmx.com@localhost>
> 
>    I'm attaching a patch against current adding a new libc and
>    kernel function: consttime_memcmp(3). The code is borrowed
>    from OpenBSD timingsafe_memcmp(3) [1].
> 
> Why?  What do you want to use this for?

To expand on that question: when this topic was originally discussed, no
good reason for memcmp-like ordering was found. It's not like you are
going to use sort by it or build a rbtree from it. As such, equal or not
is a much simpler interface contract.

Joerg


Home | Main Index | Thread Index | Old Index