summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiod <>2015-11-05 21:46:51 +0000
committermiod <>2015-11-05 21:46:51 +0000
commit529158aade71dea466403c41c9d21b066917b124 (patch)
tree80b3f9cb509dfcbe5435bfd1cea886006772b4be
parent9297e6d07207d87da4eb56a832e444faf0d16708 (diff)
downloadopenbsd-529158aade71dea466403c41c9d21b066917b124.tar.gz
openbsd-529158aade71dea466403c41c9d21b066917b124.tar.bz2
openbsd-529158aade71dea466403c41c9d21b066917b124.zip
Mention ROTL() is always invoked with a proper shift value, due to the way the
CAST_KEY is constructed. This is expected to reduce blood pressure in auditors.
-rw-r--r--src/lib/libcrypto/cast/cast_lcl.h3
-rw-r--r--src/lib/libssl/src/crypto/cast/cast_lcl.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/cast/cast_lcl.h b/src/lib/libcrypto/cast/cast_lcl.h
index 6ae6c23d71..ad4e2fede9 100644
--- a/src/lib/libcrypto/cast/cast_lcl.h
+++ b/src/lib/libcrypto/cast/cast_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cast_lcl.h,v 1.10 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cast_lcl.h,v 1.11 2015/11/05 21:46:51 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -144,6 +144,7 @@
144 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ 144 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
145 *((c)++)=(unsigned char)(((l) )&0xff)) 145 *((c)++)=(unsigned char)(((l) )&0xff))
146 146
147/* only invoked with 0 <= n <= 31 */
147#define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n)))) 148#define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n))))
148 149
149#define C_M 0x3fc 150#define C_M 0x3fc
diff --git a/src/lib/libssl/src/crypto/cast/cast_lcl.h b/src/lib/libssl/src/crypto/cast/cast_lcl.h
index 6ae6c23d71..ad4e2fede9 100644
--- a/src/lib/libssl/src/crypto/cast/cast_lcl.h
+++ b/src/lib/libssl/src/crypto/cast/cast_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: cast_lcl.h,v 1.10 2014/06/12 15:49:28 deraadt Exp $ */ 1/* $OpenBSD: cast_lcl.h,v 1.11 2015/11/05 21:46:51 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -144,6 +144,7 @@
144 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ 144 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
145 *((c)++)=(unsigned char)(((l) )&0xff)) 145 *((c)++)=(unsigned char)(((l) )&0xff))
146 146
147/* only invoked with 0 <= n <= 31 */
147#define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n)))) 148#define ROTL(a,n) ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n))))
148 149
149#define C_M 0x3fc 150#define C_M 0x3fc