diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_gf2m.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_gf2m.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/bn/bn_gf2m.c b/src/lib/libcrypto/bn/bn_gf2m.c index 3a0accb4a2..62ac2a5151 100644 --- a/src/lib/libcrypto/bn/bn_gf2m.c +++ b/src/lib/libcrypto/bn/bn_gf2m.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_gf2m.c,v 1.31 2023/03/27 10:20:27 tb Exp $ */ | 1 | /* $OpenBSD: bn_gf2m.c,v 1.32 2023/03/27 10:25:02 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
4 | * | 4 | * |
@@ -643,7 +643,7 @@ BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) | |||
643 | if (BN_is_zero(u)) | 643 | if (BN_is_zero(u)) |
644 | goto err; | 644 | goto err; |
645 | 645 | ||
646 | if (!BN_copy(v, p)) | 646 | if (!bn_copy(v, p)) |
647 | goto err; | 647 | goto err; |
648 | #if 0 | 648 | #if 0 |
649 | if (!BN_one(b)) | 649 | if (!BN_one(b)) |
@@ -773,7 +773,7 @@ BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) | |||
773 | } | 773 | } |
774 | #endif | 774 | #endif |
775 | 775 | ||
776 | if (!BN_copy(r, b)) | 776 | if (!bn_copy(r, b)) |
777 | goto err; | 777 | goto err; |
778 | ret = 1; | 778 | ret = 1; |
779 | 779 | ||
@@ -865,7 +865,7 @@ BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *y, const BIGNUM *x, const BIGNUM *p, | |||
865 | goto err; | 865 | goto err; |
866 | if (!BN_GF2m_mod(a, x, p)) | 866 | if (!BN_GF2m_mod(a, x, p)) |
867 | goto err; | 867 | goto err; |
868 | if (!BN_copy(b, p)) | 868 | if (!bn_copy(b, p)) |
869 | goto err; | 869 | goto err; |
870 | 870 | ||
871 | while (!BN_is_odd(a)) { | 871 | while (!BN_is_odd(a)) { |
@@ -912,7 +912,7 @@ BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *y, const BIGNUM *x, const BIGNUM *p, | |||
912 | } | 912 | } |
913 | } while (1); | 913 | } while (1); |
914 | 914 | ||
915 | if (!BN_copy(r, u)) | 915 | if (!bn_copy(r, u)) |
916 | goto err; | 916 | goto err; |
917 | ret = 1; | 917 | ret = 1; |
918 | 918 | ||
@@ -985,7 +985,7 @@ BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const int p[], | |||
985 | goto err; | 985 | goto err; |
986 | } | 986 | } |
987 | } | 987 | } |
988 | if (!BN_copy(r, u)) | 988 | if (!bn_copy(r, u)) |
989 | goto err; | 989 | goto err; |
990 | ret = 1; | 990 | ret = 1; |
991 | 991 | ||
@@ -1117,7 +1117,7 @@ BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const int p[], | |||
1117 | if (p[0] & 0x1) /* m is odd */ | 1117 | if (p[0] & 0x1) /* m is odd */ |
1118 | { | 1118 | { |
1119 | /* compute half-trace of a */ | 1119 | /* compute half-trace of a */ |
1120 | if (!BN_copy(z, a)) | 1120 | if (!bn_copy(z, a)) |
1121 | goto err; | 1121 | goto err; |
1122 | for (j = 1; j <= (p[0] - 1) / 2; j++) { | 1122 | for (j = 1; j <= (p[0] - 1) / 2; j++) { |
1123 | if (!BN_GF2m_mod_sqr_arr(z, z, p, ctx)) | 1123 | if (!BN_GF2m_mod_sqr_arr(z, z, p, ctx)) |
@@ -1143,7 +1143,7 @@ BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const int p[], | |||
1143 | if (!BN_GF2m_mod_arr(rho, rho, p)) | 1143 | if (!BN_GF2m_mod_arr(rho, rho, p)) |
1144 | goto err; | 1144 | goto err; |
1145 | BN_zero(z); | 1145 | BN_zero(z); |
1146 | if (!BN_copy(w, rho)) | 1146 | if (!bn_copy(w, rho)) |
1147 | goto err; | 1147 | goto err; |
1148 | for (j = 1; j <= p[0] - 1; j++) { | 1148 | for (j = 1; j <= p[0] - 1; j++) { |
1149 | if (!BN_GF2m_mod_sqr_arr(z, z, p, ctx)) | 1149 | if (!BN_GF2m_mod_sqr_arr(z, z, p, ctx)) |
@@ -1174,7 +1174,7 @@ BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const int p[], | |||
1174 | goto err; | 1174 | goto err; |
1175 | } | 1175 | } |
1176 | 1176 | ||
1177 | if (!BN_copy(r, z)) | 1177 | if (!bn_copy(r, z)) |
1178 | goto err; | 1178 | goto err; |
1179 | 1179 | ||
1180 | ret = 1; | 1180 | ret = 1; |