mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-24 17:26:28 +08:00
update crypto
This commit is contained in:
@@ -169,6 +169,13 @@ int BN_GFP2_cmp(const BN_GFP2 *a, const BN_GFP2 *b)
|
||||
return ((BN_cmp(a->a0, b->a0) == 0) && (BN_cmp(a->a1, b->a1) == 0));
|
||||
}
|
||||
|
||||
int BN_GFP2_equ(const BN_GFP2 *a, const BN_GFP2 *b)
|
||||
{
|
||||
//FIXME
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int BN_GFP2_add(BN_GFP2 *r, const BN_GFP2 *a, const BN_GFP2 *b,
|
||||
const BIGNUM *p, BN_CTX *ctx)
|
||||
{
|
||||
@@ -494,4 +501,3 @@ int BN_gfp22bn(const BN_GFP2 *gfp2, BIGNUM *bn, const BIGNUM *p, BN_CTX *ctx)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,14 +127,14 @@ int BN_bn2solinas(const BIGNUM *bn, BN_SOLINAS *solinas)
|
||||
}
|
||||
|
||||
end:
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int BN_solinas2bn(const BN_SOLINAS *solinas, BIGNUM *bn)
|
||||
{
|
||||
int ret = 0;
|
||||
BIGNUM *tmp = NULL;
|
||||
#if 0
|
||||
BIGNUM *tmp = NULL;
|
||||
if (b <= 0 || a <= b || (s != 1 && s != -1) ||
|
||||
(c != 1 && c != -1)) {
|
||||
BNerr(BN_F_BN_SOLINAS2BN, BN_R_INVALID_SOLINAS_PARAMETERS);
|
||||
|
||||
Reference in New Issue
Block a user