Module Name: src
Committed By: apb
Date: Mon Mar 23 07:41:16 UTC 2015
Modified Files:
src/lib/libc/string: consttime_memequal.3
Log Message:
Explain why there is no consttime_memcmp().
Inspired by a patch from Kamil Rytarowski.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/string/consttime_memequal.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/string/consttime_memequal.3
diff -u src/lib/libc/string/consttime_memequal.3:1.4 src/lib/libc/string/consttime_memequal.3:1.5
--- src/lib/libc/string/consttime_memequal.3:1.4 Fri Nov 14 22:46:34 2014
+++ src/lib/libc/string/consttime_memequal.3 Mon Mar 23 07:41:16 2015
@@ -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
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