mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-27 15:43:42 +08:00
first step of v2 final release
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user