From b513e09c868855f076a4a370c449f8266330d35a Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 12 Jul 2022 16:08:19 +0000 Subject: Move BN_lsw() to bn_lcl.h so that other code can use it. ok jsing --- src/lib/libcrypto/bn/bn_kron.c | 5 +---- src/lib/libcrypto/bn/bn_lcl.h | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/bn/bn_kron.c b/src/lib/libcrypto/bn/bn_kron.c index 15033ff9db..998adedcd8 100644 --- a/src/lib/libcrypto/bn/bn_kron.c +++ b/src/lib/libcrypto/bn/bn_kron.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_kron.c,v 1.9 2022/06/20 19:42:58 tb Exp $ */ +/* $OpenBSD: bn_kron.c,v 1.10 2022/07/12 16:08:19 tb Exp $ */ /* ==================================================================== * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. * @@ -55,9 +55,6 @@ #include "bn_lcl.h" -/* The least significant word of a BIGNUM. */ -#define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0]) - /* * Kronecker symbol, implemented according to Henri Cohen, "A Course in * Computational Algebraic Number Theory", Algorithm 1.4.10. diff --git a/src/lib/libcrypto/bn/bn_lcl.h b/src/lib/libcrypto/bn/bn_lcl.h index d8c9e20f40..91ce5951e5 100644 --- a/src/lib/libcrypto/bn/bn_lcl.h +++ b/src/lib/libcrypto/bn/bn_lcl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_lcl.h,v 1.31 2022/01/14 08:01:47 tb Exp $ */ +/* $OpenBSD: bn_lcl.h,v 1.32 2022/07/12 16:08:19 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -493,6 +493,9 @@ struct bn_gencb_st { } #endif /* !BN_LLONG */ +/* The least significant word of a BIGNUM. */ +#define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0]) + void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb); void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b); void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b); -- cgit v1.2.3-55-g6feb