summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec
diff options
context:
space:
mode:
authortb <>2025-12-05 14:12:32 +0000
committertb <>2025-12-05 14:12:32 +0000
commitf3f05f0cf8c30a990193e332e26fdd8e54b3f59b (patch)
tree47450b6c993423a79d52c43b0bd9849c40035aa1 /src/lib/libcrypto/ec
parentd604767b3782a7a003bea4677652538af9e3bd8e (diff)
downloadopenbsd-f3f05f0cf8c30a990193e332e26fdd8e54b3f59b.tar.gz
openbsd-f3f05f0cf8c30a990193e332e26fdd8e54b3f59b.tar.bz2
openbsd-f3f05f0cf8c30a990193e332e26fdd8e54b3f59b.zip
libcrypto: make most of the BN_* macro pollution internal
This is a first sweep of reducing the number of terribly named macros in bn.h More can go away. Those we need internally go to bn_local.h. Annoyingly bn_internal.h uses some of them, so it includes bn_local.h now. This can be cleaned up later. ok jsing kenjiro
Diffstat (limited to 'src/lib/libcrypto/ec')
-rw-r--r--src/lib/libcrypto/ec/ec_internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_internal.h b/src/lib/libcrypto/ec/ec_internal.h
index 327d9ea94d..de0affa206 100644
--- a/src/lib/libcrypto/ec/ec_internal.h
+++ b/src/lib/libcrypto/ec/ec_internal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_internal.h,v 1.2 2025/08/02 15:44:09 jsing Exp $ */ 1/* $OpenBSD: ec_internal.h,v 1.3 2025/12/05 14:12:32 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2024 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -24,7 +24,7 @@
24#define EC_FIELD_ELEMENT_MAX_BYTES \ 24#define EC_FIELD_ELEMENT_MAX_BYTES \
25 (EC_FIELD_ELEMENT_MAX_BITS + 7) / 8 25 (EC_FIELD_ELEMENT_MAX_BITS + 7) / 8
26#define EC_FIELD_ELEMENT_MAX_WORDS \ 26#define EC_FIELD_ELEMENT_MAX_WORDS \
27 ((EC_FIELD_ELEMENT_MAX_BYTES + BN_BYTES - 1) / BN_BYTES) 27 ((EC_FIELD_ELEMENT_MAX_BYTES + sizeof(BN_ULONG) - 1) / sizeof(BN_ULONG))
28 28
29typedef struct { 29typedef struct {
30 BN_ULONG w[EC_FIELD_ELEMENT_MAX_WORDS]; 30 BN_ULONG w[EC_FIELD_ELEMENT_MAX_WORDS];