sync with OpenBSD -current

This commit is contained in:
purplerain 2024-04-10 21:48:14 +00:00
parent fe31ca4724
commit 2d743fc5aa
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
189 changed files with 3737 additions and 1337 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ec.h,v 1.46 2023/08/11 04:45:27 tb Exp $ */
/* $OpenBSD: ec.h,v 1.47 2024/04/10 15:01:31 beck Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@ -108,9 +108,7 @@ const EC_METHOD *EC_GFp_mont_method(void);
EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
void EC_GROUP_free(EC_GROUP *group);
#ifndef LIBRESSL_INTERNAL
void EC_GROUP_clear_free(EC_GROUP *group);
#endif
int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
@ -145,12 +143,10 @@ int EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
BN_CTX *ctx);
#if !defined(LIBRESSL_INTERNAL)
int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
const BIGNUM *b, BN_CTX *ctx);
int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
BIGNUM *b, BN_CTX *ctx);
#endif
int EC_GROUP_get_degree(const EC_GROUP *group);
@ -176,9 +172,7 @@ int EC_curve_nist2nid(const char *name);
EC_POINT *EC_POINT_new(const EC_GROUP *group);
void EC_POINT_free(EC_POINT *point);
#ifndef LIBRESSL_INTERNAL
void EC_POINT_clear_free(EC_POINT *point);
#endif
int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
@ -193,7 +187,6 @@ int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, int y_bit, BN_CTX *ctx);
#ifndef LIBRESSL_INTERNAL
int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
@ -204,7 +197,6 @@ int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, int y_bit, BN_CTX *ctx);
#endif /* !LIBRESSL_INTERNAL */
size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx);
int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ec_lib.c,v 1.65 2023/07/25 06:57:26 tb Exp $ */
/* $OpenBSD: ec_lib.c,v 1.66 2024/04/10 15:01:31 beck Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@ -136,6 +136,7 @@ EC_GROUP_clear_free(EC_GROUP *group)
{
EC_GROUP_free(group);
}
LCRYPTO_ALIAS(EC_GROUP_clear_free);
int
EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)
@ -542,6 +543,7 @@ EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,
{
return EC_GROUP_set_curve(group, p, a, b, ctx);
}
LCRYPTO_ALIAS(EC_GROUP_set_curve_GFp);
int
EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
@ -549,6 +551,7 @@ EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
{
return EC_GROUP_get_curve(group, p, a, b, ctx);
}
LCRYPTO_ALIAS(EC_GROUP_get_curve_GFp);
int
EC_GROUP_get_degree(const EC_GROUP *group)
@ -727,6 +730,7 @@ EC_POINT_clear_free(EC_POINT *point)
{
EC_POINT_free(point);
}
LCRYPTO_ALIAS(EC_POINT_clear_free);
int
EC_POINT_copy(EC_POINT *dest, const EC_POINT *src)
@ -862,6 +866,7 @@ EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
{
return EC_POINT_set_Jprojective_coordinates(group, point, x, y, z, ctx);
}
LCRYPTO_ALIAS(EC_POINT_set_Jprojective_coordinates_GFp);
int
EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
@ -869,6 +874,7 @@ EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
{
return EC_POINT_get_Jprojective_coordinates(group, point, x, y, z, ctx);
}
LCRYPTO_ALIAS(EC_POINT_get_Jprojective_coordinates_GFp);
int
EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point,
@ -914,6 +920,7 @@ EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
{
return EC_POINT_set_affine_coordinates(group, point, x, y, ctx);
}
LCRYPTO_ALIAS(EC_POINT_set_affine_coordinates_GFp);
int
EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point,
@ -951,6 +958,7 @@ EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point
{
return EC_POINT_get_affine_coordinates(group, point, x, y, ctx);
}
LCRYPTO_ALIAS(EC_POINT_get_affine_coordinates_GFp);
int
EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ec_oct.c,v 1.16 2023/07/07 19:37:53 beck Exp $ */
/* $OpenBSD: ec_oct.c,v 1.17 2024/04/10 15:01:31 beck Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
@ -107,6 +107,7 @@ EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point,
{
return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
}
LCRYPTO_ALIAS(EC_POINT_set_compressed_coordinates_GFp);
size_t
EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point,