Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
8aefe253
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
12 个月 前同步成功
通知
8
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8aefe253
编写于
8月 26, 2002
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move EC_GROUP_get_basis_type() from ec_lib.c to ec_asn1.c
上级
7e31164a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
54 addition
and
45 deletion
+54
-45
crypto/ec/ec.h
crypto/ec/ec.h
+7
-6
crypto/ec/ec_asn1.c
crypto/ec/ec_asn1.c
+42
-0
crypto/ec/ec_lcl.h
crypto/ec/ec_lcl.h
+5
-0
crypto/ec/ec_lib.c
crypto/ec/ec_lib.c
+0
-39
未找到文件。
crypto/ec/ec.h
浏览文件 @
8aefe253
...
@@ -191,12 +191,6 @@ const char *EC_GROUP_get0_comment(int nid);
...
@@ -191,12 +191,6 @@ const char *EC_GROUP_get0_comment(int nid);
* with the given index i from the internal curve list */
* with the given index i from the internal curve list */
int
ec_group_index2nid
(
int
i
);
int
ec_group_index2nid
(
int
i
);
/* EC_GROUP_get_basis_type() returns the NID of the basis type
* used to represent the field elements (in case of a pentanomial or trinomial
* basis the coefficient are returned in the k? arguments) */
int
EC_GROUP_get_basis_type
(
const
EC_GROUP
*
,
unsigned
int
*
k1
,
unsigned
int
*
k2
,
unsigned
int
*
k3
);
/* EC_POINT functions */
/* EC_POINT functions */
...
@@ -261,6 +255,13 @@ int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *);
...
@@ -261,6 +255,13 @@ int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *);
/* ASN1 stuff */
/* ASN1 stuff */
/* EC_GROUP_get_basis_type() returns the NID of the basis type
* used to represent the field elements (in case of a pentanomial or trinomial
* basis the coefficient are returned in the k? arguments) */
int
EC_GROUP_get_basis_type
(
const
EC_GROUP
*
,
unsigned
int
*
k1
,
unsigned
int
*
k2
,
unsigned
int
*
k3
);
#define OPENSSL_EC_NAMED_CURVE 0x001
#define OPENSSL_EC_NAMED_CURVE 0x001
typedef
struct
ecpk_parameters_st
ECPKPARAMETERS
;
typedef
struct
ecpk_parameters_st
ECPKPARAMETERS
;
...
...
crypto/ec/ec_asn1.c
浏览文件 @
8aefe253
...
@@ -62,6 +62,48 @@
...
@@ -62,6 +62,48 @@
#include <openssl/asn1t.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
#include <openssl/objects.h>
int
EC_GROUP_get_basis_type
(
const
EC_GROUP
*
group
,
unsigned
int
*
k1
,
unsigned
int
*
k2
,
unsigned
int
*
k3
)
{
int
i
=
0
;
if
(
group
==
NULL
)
return
0
;
if
(
EC_METHOD_get_field_type
(
EC_GROUP_method_of
(
group
))
!=
NID_X9_62_characteristic_two_field
)
/* everything else is currently not supported */
return
0
;
while
(
group
->
poly
[
i
]
!=
0
)
i
++
;
if
(
i
==
4
)
{
if
(
k1
)
*
k1
=
group
->
poly
[
3
];
if
(
k2
)
*
k2
=
group
->
poly
[
2
];
if
(
k3
)
*
k3
=
group
->
poly
[
1
];
return
NID_X9_62_ppBasis
;
}
else
if
(
i
==
2
)
{
if
(
k1
)
*
k1
=
group
->
poly
[
1
];
return
NID_X9_62_tpBasis
;
}
else
/* everything else is currently not supported */
return
0
;
}
/* some structures needed for the asn1 encoding */
/* some structures needed for the asn1 encoding */
typedef
struct
x9_62_fieldid_st
{
typedef
struct
x9_62_fieldid_st
{
ASN1_OBJECT
*
fieldType
;
ASN1_OBJECT
*
fieldType
;
...
...
crypto/ec/ec_lcl.h
浏览文件 @
8aefe253
...
@@ -89,6 +89,11 @@
...
@@ -89,6 +89,11 @@
#include <openssl/ec.h>
#include <openssl/ec.h>
/* internal function: ec_group_index2nid() returns the NID of curve
* with the given index i from the internal curve list */
int
ec_group_index2nid
(
int
i
);
/* Structure details are not part of the exported interface,
/* Structure details are not part of the exported interface,
* so all this may change in future versions. */
* so all this may change in future versions. */
...
...
crypto/ec/ec_lib.c
浏览文件 @
8aefe253
...
@@ -537,45 +537,6 @@ void EC_GROUP_clear_free_extra_data(EC_GROUP *group)
...
@@ -537,45 +537,6 @@ void EC_GROUP_clear_free_extra_data(EC_GROUP *group)
}
}
int
EC_GROUP_get_basis_type
(
const
EC_GROUP
*
group
,
unsigned
int
*
k1
,
unsigned
int
*
k2
,
unsigned
int
*
k3
)
{
int
i
=
0
;
if
(
group
==
NULL
)
return
0
;
if
(
EC_METHOD_get_field_type
(
EC_GROUP_method_of
(
group
))
!=
NID_X9_62_characteristic_two_field
)
/* everything else is currently not supported */
return
0
;
while
(
group
->
poly
[
i
]
!=
0
)
i
++
;
if
(
i
==
4
)
{
if
(
k1
)
*
k1
=
group
->
poly
[
3
];
if
(
k2
)
*
k2
=
group
->
poly
[
2
];
if
(
k3
)
*
k3
=
group
->
poly
[
1
];
return
NID_X9_62_ppBasis
;
}
else
if
(
i
==
2
)
{
if
(
k1
)
*
k1
=
group
->
poly
[
1
];
return
NID_X9_62_tpBasis
;
}
else
/* everything else is currently not supported */
return
0
;
}
/* functions for EC_POINT objects */
/* functions for EC_POINT objects */
EC_POINT
*
EC_POINT_new
(
const
EC_GROUP
*
group
)
EC_POINT
*
EC_POINT_new
(
const
EC_GROUP
*
group
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录