Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
6f766a41
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
6f766a41
编写于
11月 15, 2009
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aesni-x86.pl: eliminate development comments.
上级
f741382b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
27 addition
and
8 deletion
+27
-8
crypto/aes/asm/aesni-x86.pl
crypto/aes/asm/aesni-x86.pl
+27
-8
未找到文件。
crypto/aes/asm/aesni-x86.pl
浏览文件 @
6f766a41
...
...
@@ -15,6 +15,7 @@
$PREFIX
=
"
aesni
";
# if $PREFIX is set to "AES", the script
# generates drop-in replacement for
# crypto/aes/asm/aes-586.pl:-)
$inline
=
1
;
# inline _aesni_[en|de]crypt
$
0
=~
m/(.*[\/\\])[^\/\\]+$/
;
$dir
=
$
1
;
push
(
@INC
,"
${dir}
","
${dir}
../../perlasm
");
...
...
@@ -105,27 +106,33 @@ sub aesni_generate1 # fully unrolled loop
}
# void $PREFIX_encrypt (const void *inp,void *out,const AES_KEY *key);
# &aesni_generate1("dec"
);
&aesni_generate1
("
enc
")
if
(
!
$inline
);
&function_begin_B
("
${PREFIX}
_encrypt
");
&mov
("
eax
",
&wparam
(
0
));
&mov
(
$key
,
&wparam
(
2
));
&movups
(
$inout0
,
&QWP
(
0
,"
eax
"));
&mov
(
$rounds
,
&DWP
(
240
,
$key
));
&mov
("
eax
",
&wparam
(
1
));
&aesni_inline_generate1
("
enc
");
# &call ("_aesni_encrypt1");
if
(
$inline
)
{
&aesni_inline_generate1
("
enc
");
}
else
{
&call
("
_aesni_encrypt1
");
}
&movups
(
&QWP
(
0
,"
eax
"),
$inout0
);
&ret
();
&function_end_B
("
${PREFIX}
_encrypt
");
# void $PREFIX_decrypt (const void *inp,void *out,const AES_KEY *key);
# &aesni_generate1("dec"
);
&aesni_generate1
("
dec
")
if
(
!
$inline
);
&function_begin_B
("
${PREFIX}
_decrypt
");
&mov
("
eax
",
&wparam
(
0
));
&mov
(
$key
,
&wparam
(
2
));
&movups
(
$inout0
,
&QWP
(
0
,"
eax
"));
&mov
(
$rounds
,
&DWP
(
240
,
$key
));
&mov
("
eax
",
&wparam
(
1
));
&aesni_inline_generate1
("
dec
");
# &call ("_aesni_decrypt1");
if
(
$inline
)
{
&aesni_inline_generate1
("
dec
");
}
else
{
&call
("
_aesni_decrypt1
");
}
&movups
(
&QWP
(
0
,"
eax
"),
$inout0
);
&ret
();
&function_end_B
("
${PREFIX}
_decrypt
");
...
...
@@ -283,7 +290,10 @@ if ($PREFIX eq "aesni") {
jmp
(
&label
("
ecb_ret
"));
&set_label
("
ecb_enc_one
",
16
);
&aesni_inline_generate1
("
enc
");
# &call ("_aesni_encrypt1");
if
(
$inline
)
{
&aesni_inline_generate1
("
enc
");
}
else
{
&call
("
_aesni_encrypt1
");
}
&movups
(
&QWP
(
0
,
$out
),
$inout0
);
&jmp
(
&label
("
ecb_ret
"));
...
...
@@ -342,7 +352,10 @@ if ($PREFIX eq "aesni") {
&jmp
(
&label
("
ecb_ret
"));
&set_label
("
ecb_dec_one
",
16
);
&aesni_inline_generate1
("
dec
");
# &call ("_aesni_decrypt3");
if
(
$inline
)
{
&aesni_inline_generate1
("
dec
");
}
else
{
&call
("
_aesni_decrypt1
");
}
&movups
(
&QWP
(
0
,
$out
),
$inout0
);
&jmp
(
&label
("
ecb_ret
"));
...
...
@@ -391,7 +404,10 @@ if ($PREFIX eq "aesni") {
&movups
(
$ivec
,
&QWP
(
0
,
$inp
));
&lea
(
$inp
,
&DWP
(
16
,
$inp
));
&pxor
(
$inout0
,
$ivec
);
&aesni_inline_generate1
("
enc
");
# &call ("_aesni_encrypt3");
if
(
$inline
)
{
&aesni_inline_generate1
("
enc
");
}
else
{
&call
("
_aesni_encrypt1
");
}
&sub
(
$len
,
16
);
&lea
(
$out
,
&DWP
(
16
,
$out
));
&mov
(
$rounds
,
$rounds_
);
# restore $rounds
...
...
@@ -474,7 +490,10 @@ if ($PREFIX eq "aesni") {
&jmp
(
&label
("
cbc_dec_tail_collected
"));
&set_label
("
cbc_dec_one
");
&aesni_inline_generate1
("
dec
");
# &call ("_aesni_decrypt3");
if
(
$inline
)
{
&aesni_inline_generate1
("
dec
");
}
else
{
&call
("
_aesni_decrypt1
");
}
&pxor
(
$inout0
,
$ivec
);
&movaps
(
$ivec
,
$in0
);
&jmp
(
&label
("
cbc_dec_tail_collected
"));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录