Latest update.
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
* Originally written by Mike Hamburg
|
||||
*/
|
||||
|
||||
#ifndef HEADER_ARCH_32_ARCH_INTRINSICS_H
|
||||
# define HEADER_ARCH_32_ARCH_INTRINSICS_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H
|
||||
|
||||
#include "internal/constant_time_locl.h"
|
||||
#include "internal/constant_time.h"
|
||||
|
||||
# define ARCH_WORD_BITS 32
|
||||
|
||||
@@ -24,4 +24,4 @@ static ossl_inline uint64_t widemul(uint32_t a, uint32_t b)
|
||||
return ((uint64_t)a) * b;
|
||||
}
|
||||
|
||||
#endif /* HEADER_ARCH_32_ARCH_INTRINSICS_H */
|
||||
#endif /* OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H */
|
||||
@@ -10,8 +10,8 @@
|
||||
* Originally written by Mike Hamburg
|
||||
*/
|
||||
|
||||
#ifndef HEADER_ARCH_32_F_IMPL_H
|
||||
# define HEADER_ARCH_32_F_IMPL_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448_ARCH_32_F_IMPL_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448_ARCH_32_F_IMPL_H
|
||||
|
||||
# define GF_HEADROOM 2
|
||||
# define LIMB(x) ((x) & ((1 << 28) - 1)), ((x) >> 28)
|
||||
@@ -57,4 +57,4 @@ void gf_weak_reduce(gf a)
|
||||
a->limb[0] = (a->limb[0] & mask) + tmp;
|
||||
}
|
||||
|
||||
#endif /* HEADER_ARCH_32_F_IMPL_H */
|
||||
#endif /* OSSL_CRYPTO_EC_CURVE448_ARCH_32_F_IMPL_H */
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "point_448.h"
|
||||
#include "ed448.h"
|
||||
#include "curve448_lcl.h"
|
||||
#include "curve448_local.h"
|
||||
|
||||
#define COFACTOR 4
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
#ifndef HEADER_CURVE448_LCL_H
|
||||
# define HEADER_CURVE448_LCL_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448_LOCAL_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448_LOCAL_H
|
||||
# include "curve448utils.h"
|
||||
|
||||
int X448(uint8_t out_shared_key[56], const uint8_t private_key[56],
|
||||
@@ -36,4 +36,4 @@ int ED448ph_verify(OPENSSL_CTX *ctx, const uint8_t hash[64],
|
||||
int ED448_public_from_private(OPENSSL_CTX *ctx, uint8_t out_public_key[57],
|
||||
const uint8_t private_key[57]);
|
||||
|
||||
#endif /* HEADER_CURVE448_LCL_H */
|
||||
#endif /* OSSL_CRYPTO_EC_CURVE448_LOCAL_H */
|
||||
@@ -10,8 +10,8 @@
|
||||
* Originally written by Mike Hamburg
|
||||
*/
|
||||
|
||||
#ifndef HEADER_CURVE448UTILS_H
|
||||
# define HEADER_CURVE448UTILS_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448UTILS_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448UTILS_H
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* Originally written by Mike Hamburg
|
||||
*/
|
||||
|
||||
#ifndef HEADER_ED448_H
|
||||
# define HEADER_ED448_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448_ED448_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448_ED448_H
|
||||
|
||||
# include "point_448.h"
|
||||
|
||||
@@ -198,4 +198,4 @@ c448_error_t c448_ed448_convert_private_key_to_x448(
|
||||
uint8_t x[X448_PRIVATE_BYTES],
|
||||
const uint8_t ed[EDDSA_448_PRIVATE_BYTES]);
|
||||
|
||||
#endif /* HEADER_ED448_H */
|
||||
#endif /* OSSL_CRYPTO_EC_CURVE448_ED448_H */
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <string.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/evp.h>
|
||||
#include "curve448_lcl.h"
|
||||
#include "curve448_local.h"
|
||||
#include "word.h"
|
||||
#include "ed448.h"
|
||||
#include "internal/numbers.h"
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
* Originally written by Mike Hamburg
|
||||
*/
|
||||
|
||||
#ifndef HEADER_FIELD_H
|
||||
# define HEADER_FIELD_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448_FIELD_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448_FIELD_H
|
||||
|
||||
# include "internal/constant_time_locl.h"
|
||||
# include "internal/constant_time.h"
|
||||
# include <string.h>
|
||||
# include <assert.h>
|
||||
# include "word.h"
|
||||
@@ -165,4 +165,4 @@ static ossl_inline void gf_cond_swap(gf x, gf_s * RESTRICT y, mask_t swap)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HEADER_FIELD_H */
|
||||
#endif /* OSSL_CRYPTO_EC_CURVE448_FIELD_H */
|
||||
@@ -10,8 +10,8 @@
|
||||
* Originally written by Mike Hamburg
|
||||
*/
|
||||
|
||||
#ifndef HEADER_POINT_448_H
|
||||
# define HEADER_POINT_448_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448_POINT_448_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448_POINT_448_H
|
||||
|
||||
# include "curve448utils.h"
|
||||
# include "field.h"
|
||||
@@ -298,4 +298,4 @@ void curve448_scalar_destroy(curve448_scalar_t scalar);
|
||||
/* Overwrite point with zeros. */
|
||||
void curve448_point_destroy(curve448_point_t point);
|
||||
|
||||
#endif /* HEADER_POINT_448_H */
|
||||
#endif /* OSSL_CRYPTO_EC_CURVE448_POINT_448_H */
|
||||
@@ -10,8 +10,8 @@
|
||||
* Originally written by Mike Hamburg
|
||||
*/
|
||||
|
||||
#ifndef HEADER_WORD_H
|
||||
# define HEADER_WORD_H
|
||||
#ifndef OSSL_CRYPTO_EC_CURVE448_WORD_H
|
||||
# define OSSL_CRYPTO_EC_CURVE448_WORD_H
|
||||
|
||||
# include <string.h>
|
||||
# include <assert.h>
|
||||
@@ -78,4 +78,4 @@ static ossl_inline mask_t bool_to_mask(c448_bool_t m)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* HEADER_WORD_H */
|
||||
#endif /* OSSL_CRYPTO_EC_CURVE448_WORD_H */
|
||||
Reference in New Issue
Block a user