Fix nistp512 typos, should be nistp521
authorViktor Dukhovni <openssl-users@dukhovni.org>
Wed, 13 Jan 2016 22:19:42 +0000 (17:19 -0500)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Wed, 13 Jan 2016 22:47:23 +0000 (17:47 -0500)
Note, this now compiles, but fails tests, so further remediation
is required.

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
crypto/ec/ec_lcl.h
crypto/ec/ecp_nistp521.c

index 036f9eed208789849c4c2533fa27bed8c3caf609..36432e16f587ddf097f4c526238e70f54a683aef 100644 (file)
@@ -203,7 +203,7 @@ struct ec_method_st {
  */
 typedef struct nistp224_pre_comp_st NISTP224_PRE_COMP;
 typedef struct nistp256_pre_comp_st NISTP256_PRE_COMP;
-typedef struct nistp512_pre_comp_st NISTP521_PRE_COMP;
+typedef struct nistp521_pre_comp_st NISTP521_PRE_COMP;
 typedef struct nistz256_pre_comp_st NISTZ256_PRE_COMP;
 typedef struct ec_pre_comp_st EC_PRE_COMP;
 
index 97744b273e66d04b83405d23847c0f4f3a456449..516101c1867883d2fc10be1efa7a98414e4dc619 100644 (file)
@@ -1585,7 +1585,7 @@ static void batch_mul(felem x_out, felem y_out, felem z_out,
 }
 
 /* Precomputation for the group generator. */
-struct nistp512_pre_comp_st {
+struct nistp521_pre_comp_st {
     felem g_pre_comp[16][3];
     int references;
 };
@@ -2104,7 +2104,7 @@ int ec_GFp_nistp521_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
 
 int ec_GFp_nistp521_have_precompute_mult(const EC_GROUP *group)
 {
-    return HAVEPRECOMP(group, nistp512);
+    return HAVEPRECOMP(group, nistp521);
 }
 
 #else