Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
42909e39
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
42909e39
编写于
3月 08, 2001
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix ec_GFp_simple_cmp.
Use example group from Annex I of X9.62 in ectest.c.
上级
c1081080
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
5 deletion
+10
-5
crypto/ec/ecp_smpl.c
crypto/ec/ecp_smpl.c
+6
-1
crypto/ec/ectest.c
crypto/ec/ectest.c
+4
-4
未找到文件。
crypto/ec/ecp_smpl.c
浏览文件 @
42909e39
...
...
@@ -1409,13 +1409,18 @@ int ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *
{
if
(
!
field_mul
(
group
,
Zb23
,
Zb23
,
&
b
->
Z
,
ctx
))
goto
end
;
if
(
!
field_mul
(
group
,
tmp1
,
&
a
->
Y
,
Zb23
,
ctx
))
goto
end
;
/* tmp1_ = tmp1 */
}
else
tmp1_
=
&
a
->
Y
;
if
(
!
a
->
Z_is_one
)
{
if
(
!
field_mul
(
group
,
Za23
,
Za23
,
&
a
->
Z
,
ctx
))
goto
end
;
if
(
!
field_mul
(
group
,
tmp2
,
&
b
->
Y
,
Za23
,
ctx
))
goto
end
;
/* tmp2_ = tmp2 */
}
/* tmp1_ and tmp2_ are still ok */
else
tmp2_
=
&
b
->
Y
;
/* compare Y_a*Z_b^3 with Y_b*Z_a^3 */
if
(
BN_cmp
(
tmp1_
,
tmp2_
)
!=
0
)
...
...
crypto/ec/ectest.c
浏览文件 @
42909e39
...
...
@@ -94,9 +94,9 @@ int main(int argc, char *argv[])
b
=
BN_new
();
if
(
!
p
||
!
a
||
!
b
)
ABORT
;
if
(
!
BN_hex2bn
(
&
p
,
"
D
"
))
ABORT
;
if
(
!
BN_hex2bn
(
&
a
,
"
7
"
))
ABORT
;
if
(
!
BN_hex2bn
(
&
b
,
"
C
"
))
ABORT
;
if
(
!
BN_hex2bn
(
&
p
,
"
17
"
))
ABORT
;
if
(
!
BN_hex2bn
(
&
a
,
"
1
"
))
ABORT
;
if
(
!
BN_hex2bn
(
&
b
,
"
1
"
))
ABORT
;
group
=
EC_GROUP_new
(
EC_GFp_mont_method
());
if
(
!
group
)
ABORT
;
...
...
@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
z
=
BN_new
();
if
(
!
x
||
!
y
||
!
z
)
ABORT
;
if
(
!
BN_hex2bn
(
&
x
,
"
C
"
))
ABORT
;
if
(
!
BN_hex2bn
(
&
x
,
"
D
"
))
ABORT
;
if
(
!
EC_POINT_set_compressed_coordinates_GFp
(
group
,
Q
,
x
,
1
,
ctx
))
ABORT
;
if
(
!
EC_POINT_is_on_curve
(
group
,
Q
,
ctx
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录