first step of v2 final release

This commit is contained in:
Zhi Guan
2017-11-05 21:00:36 +08:00
parent 480b9e8d88
commit 27bde477a5
395 changed files with 26341 additions and 31364 deletions

View File

@@ -352,10 +352,7 @@ int BN_GFP2_set_bn(BN_GFP2 *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
BNerr(BN_F_BN_GFP2_SET_BN, ERR_R_BN_LIB);
return 0;
}
if (!BN_zero(r->a1)) {
BNerr(BN_F_BN_GFP2_SET_BN, ERR_R_BN_LIB);
return 0;
}
BN_zero(r->a1);
return 1;
}

View File

@@ -70,6 +70,8 @@
#define BN_SOLINAS_1024V1 7
#define BN_SOLINAS_1024V2 8
#if 0
//remove warnings
static BN_SOLINAS BN_solinas_table[] = {
{ 192, 16, -1, -1 },
{ 192, 64, -1, -1 },
@@ -81,6 +83,7 @@ static BN_SOLINAS BN_solinas_table[] = {
{ 1024, 424, -1, -1 },
{ 1024, 856, -1, 1 },
};
#endif
/*
* solinas = 2^a + s * 2^b + c, where s, c in {1, -1}

View File

@@ -585,12 +585,14 @@ ERR_R_BN_LIB);
goto end;
}
#if 0
//warning
if (!BN_GFP2_div(ret, num, den, p, bn_ctx)) {
ECerr(EC_F_TYPE1CURVE_EVAL_LINE_TEXTBOOK,
ERR_R_BN_LIB);
goto end;
}
#endif
ret = 1;
@@ -783,6 +785,7 @@ int EC_type1curve_tate_ratio(const EC_GROUP *group, BN_GFP2 *r,
return 0;
}
#if 0
typedef struct {
int security_bits;
int n_bits;
@@ -798,6 +801,7 @@ static TYPE1CURVE_SEC sec_tbl[] = {
{192, 7680, 3840, 384},
{256, 15360, 7680, 512}
};
#endif
const EVP_MD *TYPE1CURVE_nbits_to_md(int nbits)
{