Explain why there is no consttime_memcmp().

Inspired by a patch from Kamil Rytarowski.
This commit is contained in:
apb 2015-03-23 07:41:16 +00:00
parent 9102ea39a1
commit 978d974482
1 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: consttime_memequal.3,v 1.4 2014/11/14 22:46:34 wiz Exp $
.\" $NetBSD: consttime_memequal.3,v 1.5 2015/03/23 07:41:16 apb Exp $
.\"
.\" Copyright (c) 2013 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 14, 2014
.Dd March 23, 2015
.Dt CONSTTIME_MEMEQUAL 3
.Os
.Sh NAME
@ -78,6 +78,13 @@ does not return a lexicographic ordering on the data at
and
.Fa b2 ;
it tells only whether they are equal.
.Nx
does not provide a
.Fn consttime_memcmp
function, because all known use cases that require
.Sq constant time
memory comparison also require only comparison for equality,
not lexicographic ordering.
.Sh SEE ALSO
.Xr explicit_memset 3 ,
.Xr memcmp 3