From 53c047305665076419ac9af8f915d9b41e380316 Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 3 Jan 2025 08:19:24 +0000 Subject: Fix typo: multipy -> multiply Reflow the comment to avoid some very unfortunate line wraps. "Note that" is like "literally" a bunch of generally useless noise and best omitted. --- src/lib/libcrypto/mlkem/mlkem1024.c | 18 +++++++++--------- src/lib/libcrypto/mlkem/mlkem768.c | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/mlkem/mlkem1024.c b/src/lib/libcrypto/mlkem/mlkem1024.c index 1de14fde52..f6fccdf6a8 100644 --- a/src/lib/libcrypto/mlkem/mlkem1024.c +++ b/src/lib/libcrypto/mlkem/mlkem1024.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mlkem1024.c,v 1.5 2024/12/19 23:52:26 tb Exp $ */ +/* $OpenBSD: mlkem1024.c,v 1.6 2025/01/03 08:19:24 tb Exp $ */ /* * Copyright (c) 2024, Google Inc. * Copyright (c) 2024, Bob Beck @@ -339,14 +339,14 @@ scalar_sub(scalar *lhs, const scalar *rhs) } /* - * Multiplying two scalars in the number theoretically transformed state. Since - * 3329 does not have a 512th root of unity, this means we have to interpret - * the 2*ith and (2*i+1)th entries of the scalar as elements of GF(3329)[X]/(X^2 - * - 17^(2*bitreverse(i)+1)) The value of 17^(2*bitreverse(i)+1) mod 3329 is - * stored in the precomputed |kModRoots| table. Note that our Barrett transform - * only allows us to multipy two reduced numbers together, so we need some - * intermediate reduction steps, even if an uint64_t could hold 3 multiplied - * numbers. + * Multiplying two scalars in the number theoretically transformed state. + * Since 3329 does not have a 512th root of unity, this means we have to + * interpret the 2*ith and (2*i+1)th entries of the scalar as elements of + * GF(3329)[X]/(X^2 - 17^(2*bitreverse(i)+1)). + * The value of 17^(2*bitreverse(i)+1) mod 3329 is stored in the precomputed + * |kModRoots| table. Our Barrett transform only allows us to multiply two + * reduced numbers together, so we need some intermediate reduction steps, + * even if an uint64_t could hold 3 multiplied numbers. */ static void scalar_mult(scalar *out, const scalar *lhs, const scalar *rhs) diff --git a/src/lib/libcrypto/mlkem/mlkem768.c b/src/lib/libcrypto/mlkem/mlkem768.c index 7d99041152..bacde0c0b7 100644 --- a/src/lib/libcrypto/mlkem/mlkem768.c +++ b/src/lib/libcrypto/mlkem/mlkem768.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mlkem768.c,v 1.6 2024/12/19 23:52:26 tb Exp $ */ +/* $OpenBSD: mlkem768.c,v 1.7 2025/01/03 08:19:24 tb Exp $ */ /* * Copyright (c) 2024, Google Inc. * Copyright (c) 2024, Bob Beck @@ -338,14 +338,14 @@ scalar_sub(scalar *lhs, const scalar *rhs) } /* - * Multiplying two scalars in the number theoretically transformed state. Since - * 3329 does not have a 512th root of unity, this means we have to interpret - * the 2*ith and (2*i+1)th entries of the scalar as elements of GF(3329)[X]/(X^2 - * - 17^(2*bitreverse(i)+1)) The value of 17^(2*bitreverse(i)+1) mod 3329 is - * stored in the precomputed |kModRoots| table. Note that our Barrett transform - * only allows us to multipy two reduced numbers together, so we need some - * intermediate reduction steps, even if an uint64_t could hold 3 multiplied - * numbers. + * Multiplying two scalars in the number theoretically transformed state. + * Since 3329 does not have a 512th root of unity, this means we have to + * interpret the 2*ith and (2*i+1)th entries of the scalar as elements of + * GF(3329)[X]/(X^2 - 17^(2*bitreverse(i)+1)). + * The value of 17^(2*bitreverse(i)+1) mod 3329 is stored in the precomputed + * |kModRoots| table. Our Barrett transform only allows us to multiply two + * reduced numbers together, so we need some intermediate reduction steps, + * even if an uint64_t could hold 3 multiplied numbers. */ static void scalar_mult(scalar *out, const scalar *lhs, const scalar *rhs) -- cgit v1.2.3-55-g6feb