diff options
author | tb <> | 2023-08-09 09:23:03 +0000 |
---|---|---|
committer | tb <> | 2023-08-09 09:23:03 +0000 |
commit | fb26e3d813e4ccd04c6d557d46d14abf011c4641 (patch) | |
tree | 797f17896c37c12a04247ce5f49fb5c828bb2f3d /src | |
parent | 41d4e0ff7ca56d4526056b45876cfa80a4d37e4a (diff) | |
download | openbsd-fb26e3d813e4ccd04c6d557d46d14abf011c4641.tar.gz openbsd-fb26e3d813e4ccd04c6d557d46d14abf011c4641.tar.bz2 openbsd-fb26e3d813e4ccd04c6d557d46d14abf011c4641.zip |
Move bn_blind.c to rsa_blinding.c
discussed with jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Makefile | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_local.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_blinding.c (renamed from src/lib/libcrypto/bn/bn_blind.c) | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_local.h | 9 |
4 files changed, 14 insertions, 13 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index c882c1a9dd..a0d60b25fb 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.153 2023/07/29 06:46:20 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.154 2023/08/09 09:23:03 tb Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | LIBREBUILD=y | 4 | LIBREBUILD=y |
@@ -168,7 +168,6 @@ SRCS+= bss_sock.c | |||
168 | 168 | ||
169 | # bn/ | 169 | # bn/ |
170 | SRCS+= bn_add.c | 170 | SRCS+= bn_add.c |
171 | SRCS+= bn_blind.c | ||
172 | SRCS+= bn_bpsw.c | 171 | SRCS+= bn_bpsw.c |
173 | SRCS+= bn_const.c | 172 | SRCS+= bn_const.c |
174 | SRCS+= bn_convert.c | 173 | SRCS+= bn_convert.c |
@@ -534,6 +533,7 @@ SRCS+= ripemd.c | |||
534 | # rsa/ | 533 | # rsa/ |
535 | SRCS+= rsa_ameth.c | 534 | SRCS+= rsa_ameth.c |
536 | SRCS+= rsa_asn1.c | 535 | SRCS+= rsa_asn1.c |
536 | SRCS+= rsa_blinding.c | ||
537 | SRCS+= rsa_chk.c | 537 | SRCS+= rsa_chk.c |
538 | SRCS+= rsa_crpt.c | 538 | SRCS+= rsa_crpt.c |
539 | SRCS+= rsa_eay.c | 539 | SRCS+= rsa_eay.c |
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h index 4269f80156..a9ce466db3 100644 --- a/src/lib/libcrypto/bn/bn_local.h +++ b/src/lib/libcrypto/bn/bn_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_local.h,v 1.37 2023/08/09 09:20:00 tb Exp $ */ | 1 | /* $OpenBSD: bn_local.h,v 1.38 2023/08/09 09:23:03 tb 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 | * |
@@ -292,14 +292,6 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | |||
292 | int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, | 292 | int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, |
293 | BN_RECP_CTX *recp, BN_CTX *ctx); | 293 | BN_RECP_CTX *recp, BN_CTX *ctx); |
294 | 294 | ||
295 | BN_BLINDING *BN_BLINDING_new(const BIGNUM *e, const BIGNUM *mod, BN_CTX *ctx, | ||
296 | int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
297 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx), BN_MONT_CTX *m_ctx); | ||
298 | void BN_BLINDING_free(BN_BLINDING *b); | ||
299 | int BN_BLINDING_convert(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *); | ||
300 | int BN_BLINDING_invert(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *); | ||
301 | CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *); | ||
302 | |||
303 | /* Explicitly const time / non-const time versions for internal use */ | 295 | /* Explicitly const time / non-const time versions for internal use */ |
304 | int BN_mod_exp_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | 296 | int BN_mod_exp_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
305 | const BIGNUM *m, BN_CTX *ctx); | 297 | const BIGNUM *m, BN_CTX *ctx); |
diff --git a/src/lib/libcrypto/bn/bn_blind.c b/src/lib/libcrypto/rsa/rsa_blinding.c index 1d0835b27f..bc267b1c51 100644 --- a/src/lib/libcrypto/bn/bn_blind.c +++ b/src/lib/libcrypto/rsa/rsa_blinding.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_blind.c,v 1.43 2023/08/09 09:20:00 tb Exp $ */ | 1 | /* $OpenBSD: rsa_blinding.c,v 1.1 2023/08/09 09:23:03 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -114,8 +114,10 @@ | |||
114 | #include <openssl/opensslconf.h> | 114 | #include <openssl/opensslconf.h> |
115 | 115 | ||
116 | #include <openssl/err.h> | 116 | #include <openssl/err.h> |
117 | #include <openssl/rsa.h> | ||
117 | 118 | ||
118 | #include "bn_local.h" | 119 | #include "bn_local.h" |
120 | #include "rsa_local.h" | ||
119 | 121 | ||
120 | #define BN_BLINDING_COUNTER 32 | 122 | #define BN_BLINDING_COUNTER 32 |
121 | 123 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_local.h b/src/lib/libcrypto/rsa/rsa_local.h index e4c3040b6f..30d18bfa92 100644 --- a/src/lib/libcrypto/rsa/rsa_local.h +++ b/src/lib/libcrypto/rsa/rsa_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_local.h,v 1.4 2023/07/28 10:05:16 tb Exp $ */ | 1 | /* $OpenBSD: rsa_local.h,v 1.5 2023/08/09 09:23:03 tb 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 | * |
@@ -153,6 +153,13 @@ int RSA_padding_check_X931(unsigned char *to, int tlen, | |||
153 | const unsigned char *f, int fl, int rsa_len); | 153 | const unsigned char *f, int fl, int rsa_len); |
154 | int RSA_X931_hash_id(int nid); | 154 | int RSA_X931_hash_id(int nid); |
155 | 155 | ||
156 | BN_BLINDING *BN_BLINDING_new(const BIGNUM *e, const BIGNUM *mod, BN_CTX *ctx, | ||
157 | int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
158 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx), BN_MONT_CTX *m_ctx); | ||
159 | void BN_BLINDING_free(BN_BLINDING *b); | ||
160 | int BN_BLINDING_convert(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *); | ||
161 | int BN_BLINDING_invert(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *); | ||
162 | CRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *); | ||
156 | BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); | 163 | BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); |
157 | 164 | ||
158 | __END_HIDDEN_DECLS | 165 | __END_HIDDEN_DECLS |