summaryrefslogtreecommitdiff
path: root/umac.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-04-10 00:10:49 +0000
committerDamien Miller <djm@mindrot.org>2018-04-10 10:17:15 +1000
commit001aa55484852370488786bd40e9fdad4b465811 (patch)
tree8b98f20603dea5362f66fbfcc8c400e29c7492bb /umac.c
parent260ede2787fe80b18b8d5920455b4fb268519c7d (diff)
upstream: lots of typos in comments/docs. Patch from Karsten Weiss
after checking with codespell tool (https://github.com/lucasdemarchi/codespell) OpenBSD-Commit-ID: 373222f12d7ab606598a2d36840c60be93568528
Diffstat (limited to 'umac.c')
-rw-r--r--umac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/umac.c b/umac.c
index eab831072..ccae39f30 100644
--- a/umac.c
+++ b/umac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: umac.c,v 1.16 2017/12/12 15:06:12 naddy Exp $ */ 1/* $OpenBSD: umac.c,v 1.17 2018/04/10 00:10:49 djm Exp $ */
2/* ----------------------------------------------------------------------- 2/* -----------------------------------------------------------------------
3 * 3 *
4 * umac.c -- C Implementation UMAC Message Authentication 4 * umac.c -- C Implementation UMAC Message Authentication
@@ -65,7 +65,7 @@
65/* #define AES_IMPLEMENTAION 1 1 = OpenSSL, 2 = Barreto, 3 = Gladman */ 65/* #define AES_IMPLEMENTAION 1 1 = OpenSSL, 2 = Barreto, 3 = Gladman */
66/* #define SSE2 0 Is SSE2 is available? */ 66/* #define SSE2 0 Is SSE2 is available? */
67/* #define RUN_TESTS 0 Run basic correctness/speed tests */ 67/* #define RUN_TESTS 0 Run basic correctness/speed tests */
68/* #define UMAC_AE_SUPPORT 0 Enable auhthenticated encrytion */ 68/* #define UMAC_AE_SUPPORT 0 Enable authenticated encryption */
69 69
70/* ---------------------------------------------------------------------- */ 70/* ---------------------------------------------------------------------- */
71/* -- Global Includes --------------------------------------------------- */ 71/* -- Global Includes --------------------------------------------------- */
@@ -295,9 +295,9 @@ static void pdf_gen_xor(pdf_ctx *pc, const UINT8 nonce[8], UINT8 buf[8])
295 * Before beginning another hash calculation the nh_reset() routine 295 * Before beginning another hash calculation the nh_reset() routine
296 * must be called. The single-buffer routine, nh(), is equivalent to 296 * must be called. The single-buffer routine, nh(), is equivalent to
297 * the sequence of calls nh_update() and nh_final(); however it is 297 * the sequence of calls nh_update() and nh_final(); however it is
298 * optimized and should be prefered whenever the multiple-buffer interface 298 * optimized and should be preferred whenever the multiple-buffer interface
299 * is not necessary. When using either interface, it is the client's 299 * is not necessary. When using either interface, it is the client's
300 * responsability to pass no more than L1_KEY_LEN bytes per hash result. 300 * responsibility to pass no more than L1_KEY_LEN bytes per hash result.
301 * 301 *
302 * The routine nh_init() initializes the nh_ctx data structure and 302 * The routine nh_init() initializes the nh_ctx data structure and
303 * must be called once, before any other PDF routine. 303 * must be called once, before any other PDF routine.
@@ -319,8 +319,8 @@ static void pdf_gen_xor(pdf_ctx *pc, const UINT8 nonce[8], UINT8 buf[8])
319typedef struct { 319typedef struct {
320 UINT8 nh_key [L1_KEY_LEN + L1_KEY_SHIFT * (STREAMS - 1)]; /* NH Key */ 320 UINT8 nh_key [L1_KEY_LEN + L1_KEY_SHIFT * (STREAMS - 1)]; /* NH Key */
321 UINT8 data [HASH_BUF_BYTES]; /* Incoming data buffer */ 321 UINT8 data [HASH_BUF_BYTES]; /* Incoming data buffer */
322 int next_data_empty; /* Bookeeping variable for data buffer. */ 322 int next_data_empty; /* Bookkeeping variable for data buffer. */
323 int bytes_hashed; /* Bytes (out of L1_KEY_LEN) incorperated. */ 323 int bytes_hashed; /* Bytes (out of L1_KEY_LEN) incorporated. */
324 UINT64 state[STREAMS]; /* on-line state */ 324 UINT64 state[STREAMS]; /* on-line state */
325} nh_ctx; 325} nh_ctx;
326 326
@@ -851,7 +851,7 @@ static void poly_hash(uhash_ctx_t hc, UINT32 data_in[])
851 851
852 852
853/* The final step in UHASH is an inner-product hash. The poly hash 853/* The final step in UHASH is an inner-product hash. The poly hash
854 * produces a result not neccesarily WORD_LEN bytes long. The inner- 854 * produces a result not necessarily WORD_LEN bytes long. The inner-
855 * product hash breaks the polyhash output into 16-bit chunks and 855 * product hash breaks the polyhash output into 16-bit chunks and
856 * multiplies each with a 36 bit key. 856 * multiplies each with a 36 bit key.
857 */ 857 */