summaryrefslogtreecommitdiffstats
path: root/crypto/ec/curve448/curve448.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-12-05 16:14:11 +0000
committerMatt Caswell <matt@openssl.org>2018-02-20 12:59:30 +0000
commit35b7c85a22a214512da9ce374ba7ff737b52f49d (patch)
tree37ff2f96e520f22a2e07ae919c4796ae66628d4b /crypto/ec/curve448/curve448.c
parent8d55f844b08199e0ac6a2ddc501de39f3237c5e9 (diff)
Remove some unneeded code
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/5105)
Diffstat (limited to 'crypto/ec/curve448/curve448.c')
-rw-r--r--crypto/ec/curve448/curve448.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/crypto/ec/curve448/curve448.c b/crypto/ec/curve448/curve448.c
index 12ed36d8b8..e2c5770803 100644
--- a/crypto/ec/curve448/curve448.c
+++ b/crypto/ec/curve448/curve448.c
@@ -23,7 +23,6 @@
#define COMBS_N 5
#define COMBS_T 5
#define COMBS_S 18
-#define DECAF_WINDOW_BITS 5
#define DECAF_WNAF_FIXED_TABLE_BITS 5
#define DECAF_WNAF_VAR_TABLE_BITS 3
@@ -37,15 +36,8 @@ static const curve448_scalar_t precomputed_scalarmul_adjustment = {
}
};
-const uint8_t decaf_x448_base_point[DECAF_X448_PUBLIC_BYTES] = { 0x05 };
-
#define TWISTED_D ((EDWARDS_D)-1)
-#define EFF_D (-(TWISTED_D))
-#define NEG_D 1
-
-/* End of template stuff */
-
#define WBITS DECAF_WORD_BITS /* NB this may be different from ARCH_WORD_BITS */
/* Projective Niels coordinates */
@@ -55,7 +47,7 @@ typedef struct {
typedef struct {
niels_t n;
gf z;
-} VECTOR_ALIGNED pniels_s, pniels_t[1];
+} VECTOR_ALIGNED pniels_t[1];
/* Precomputed base */
struct curve448_precomputed_s {
@@ -481,34 +473,6 @@ decaf_error_t decaf_x448(uint8_t out[X_PUBLIC_BYTES],
return decaf_succeed_if(mask_to_bool(nz));
}
-/* Thanks Johan Pascal */
-void decaf_ed448_convert_public_key_to_x448(uint8_t x[DECAF_X448_PUBLIC_BYTES],
- const uint8_t
- ed[DECAF_EDDSA_448_PUBLIC_BYTES])
-{
- gf y;
- const uint8_t mask = (uint8_t)(0xFE << (7));
- ignore_result(gf_deserialize(y, ed, 1, mask));
-
- {
- gf n, d;
-
- /* u = y^2 * (1-dy^2) / (1-y^2) */
- gf_sqr(n, y); /* y^2 */
- gf_sub(d, ONE, n); /* 1-y^2 */
- gf_invert(d, d, 0); /* 1/(1-y^2) */
- gf_mul(y, n, d); /* y^2 / (1-y^2) */
- gf_mulw(d, n, EDWARDS_D); /* dy^2 */
- gf_sub(d, ONE, d); /* 1-dy^2 */
- gf_mul(n, y, d); /* y^2 * (1-dy^2) / (1-y^2) */
- gf_serialize(x, n, 1);
-
- OPENSSL_cleanse(y, sizeof(y));
- OPENSSL_cleanse(n, sizeof(n));
- OPENSSL_cleanse(d, sizeof(d));
- }
-}
-
void curve448_point_mul_by_ratio_and_encode_like_x448(uint8_t
out[X_PUBLIC_BYTES],
const curve448_point_t p)