Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
9ee5916d
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,发现更多精彩内容 >>
提交
9ee5916d
编写于
10月 14, 2011
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aesni-x86[_64].pl: fix bug in CCM code.
上级
af9b610c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
9 deletion
+7
-9
crypto/aes/asm/aesni-x86.pl
crypto/aes/asm/aesni-x86.pl
+4
-5
crypto/aes/asm/aesni-x86_64.pl
crypto/aes/asm/aesni-x86_64.pl
+3
-4
未找到文件。
crypto/aes/asm/aesni-x86.pl
浏览文件 @
9ee5916d
...
...
@@ -612,9 +612,10 @@ if ($PREFIX eq "aesni") {
&shr
(
$rounds
,
1
);
&lea
(
$key_
,
&DWP
(
0
,
$key
));
&movdqa
(
$inout3
,
&QWP
(
0
,"
esp
"));
&movdqa
(
$inout0
,
$ivec
);
&mov
(
$rounds_
,
$rounds
);
&
movdqa
(
$inout3
,
&QWP
(
0
,"
esp
")
);
&
pshufb
(
$ivec
,
$inout3
);
&set_label
("
ccm64_enc_outer
");
&$movekey
(
$rndkey0
,
&QWP
(
0
,
$key_
));
...
...
@@ -638,7 +639,6 @@ if ($PREFIX eq "aesni") {
&aesenc
(
$cmac
,
$rndkey0
);
&$movekey
(
$rndkey0
,
&QWP
(
0
,
$key
));
&jnz
(
&label
("
ccm64_enc2_loop
"));
&pshufb
(
$ivec
,
$inout3
);
&aesenc
(
$inout0
,
$rndkey1
);
&aesenc
(
$cmac
,
$rndkey1
);
&paddq
(
$ivec
,
&QWP
(
16
,"
esp
"));
...
...
@@ -651,7 +651,7 @@ if ($PREFIX eq "aesni") {
&movdqa
(
$inout0
,
$ivec
);
&movups
(
&QWP
(
0
,
$out
),
$in0
);
# save output
&lea
(
$out
,
&DWP
(
16
,
$out
));
&pshufb
(
$i
vec
,
$inout3
);
&pshufb
(
$i
nout0
,
$inout3
);
&jnz
(
&label
("
ccm64_enc_outer
"));
&mov
("
esp
",
&DWP
(
48
,"
esp
"));
...
...
@@ -702,7 +702,6 @@ if ($PREFIX eq "aesni") {
{
&call
("
_aesni_encrypt1
");
}
&movups
(
$in0
,
&QWP
(
0
,
$inp
));
# load inp
&paddq
(
$ivec
,
&QWP
(
16
,"
esp
"));
&pshufb
(
$ivec
,
$inout3
);
&lea
(
$inp
,
&QWP
(
16
,
$inp
));
&jmp
(
&label
("
ccm64_dec_outer
"));
...
...
@@ -712,6 +711,7 @@ if ($PREFIX eq "aesni") {
&mov
(
$rounds
,
$rounds_
);
&movups
(
&QWP
(
0
,
$out
),
$in0
);
# save output
&lea
(
$out
,
&DWP
(
16
,
$out
));
&pshufb
(
$inout0
,
$inout3
);
&sub
(
$len
,
1
);
&jz
(
&label
("
ccm64_dec_break
"));
...
...
@@ -739,7 +739,6 @@ if ($PREFIX eq "aesni") {
&paddq
(
$ivec
,
&QWP
(
16
,"
esp
"));
&aesenc
(
$inout0
,
$rndkey1
);
&aesenc
(
$cmac
,
$rndkey1
);
&pshufb
(
$ivec
,
$inout3
);
&lea
(
$inp
,
&QWP
(
16
,
$inp
));
&aesenclast
(
$inout0
,
$rndkey0
);
&aesenclast
(
$cmac
,
$rndkey0
);
...
...
crypto/aes/asm/aesni-x86_64.pl
浏览文件 @
9ee5916d
...
...
@@ -849,6 +849,7 @@ $code.=<<___;
movdqu ($cmac),$inout1
movdqa $iv,$inout0
mov $rounds,$rnds_
pshufb $bswap_mask,$iv
jmp .Lccm64_enc_outer
.align 16
.Lccm64_enc_outer:
...
...
@@ -873,7 +874,6 @@ $code.=<<___;
aesenc $rndkey0,$inout1
$movkey 0($key),$rndkey0
jnz .Lccm64_enc2_loop
pshufb $bswap_mask,$iv
aesenc $rndkey1,$inout0
aesenc $rndkey1,$inout1
paddq $increment,$iv
...
...
@@ -886,7 +886,7 @@ $code.=<<___;
movdqa $iv,$inout0
movups $in0,($out) # save output
lea 16($out),$out
pshufb $bswap_mask,$i
v
pshufb $bswap_mask,$i
nout0
jnz .Lccm64_enc_outer
movups $inout1,($cmac)
...
...
@@ -934,7 +934,6 @@ ___
$code
.=
<<___;
movups ($inp),$in0 # load inp
paddq $increment,$iv
pshufb $bswap_mask,$iv
lea 16($inp),$inp
jmp .Lccm64_dec_outer
.align 16
...
...
@@ -944,6 +943,7 @@ $code.=<<___;
mov $rnds_,$rounds
movups $in0,($out) # save output
lea 16($out),$out
pshufb $bswap_mask,$inout0
sub \$1,$len
jz .Lccm64_dec_break
...
...
@@ -971,7 +971,6 @@ $code.=<<___;
paddq $increment,$iv
aesenc $rndkey1,$inout0
aesenc $rndkey1,$inout1
pshufb $bswap_mask,$iv
lea 16($inp),$inp
aesenclast $rndkey0,$inout0
aesenclast $rndkey0,$inout1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录