Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
79eeb470
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看板
提交
79eeb470
编写于
1月 05, 2008
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make AES_T[ed] private to aes-586 module.
上级
9911b749
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
2 addition
and
11 deletion
+2
-11
crypto/aes/asm/aes-586.pl
crypto/aes/asm/aes-586.pl
+2
-11
未找到文件。
crypto/aes/asm/aes-586.pl
浏览文件 @
79eeb470
...
@@ -191,6 +191,8 @@ push(@INC,"${dir}","${dir}../../perlasm");
...
@@ -191,6 +191,8 @@ push(@INC,"${dir}","${dir}../../perlasm");
require
"
x86asm.pl
";
require
"
x86asm.pl
";
&asm_init
(
$ARGV
[
0
],"
aes-586.pl
",
$x86only
=
$ARGV
[
$#ARGV
]
eq
"
386
");
&asm_init
(
$ARGV
[
0
],"
aes-586.pl
",
$x86only
=
$ARGV
[
$#ARGV
]
eq
"
386
");
&static_label
("
AES_Te
");
&static_label
("
AES_Td
");
$s0
=
"
eax
";
$s0
=
"
eax
";
$s1
=
"
ebx
";
$s1
=
"
ebx
";
...
@@ -494,7 +496,6 @@ sub enctransform()
...
@@ -494,7 +496,6 @@ sub enctransform()
&xor
(
$s
[
$i
],
$tmp
);
&xor
(
$s
[
$i
],
$tmp
);
}
}
&public_label
("
AES_Te
");
&function_begin_B
("
_x86_AES_encrypt_compact
");
&function_begin_B
("
_x86_AES_encrypt_compact
");
# note that caller is expected to allocate stack frame for me!
# note that caller is expected to allocate stack frame for me!
&mov
(
$__key
,
$key
);
# save key
&mov
(
$__key
,
$key
);
# save key
...
@@ -688,7 +689,6 @@ sub sse_enccompact()
...
@@ -688,7 +689,6 @@ sub sse_enccompact()
}
}
if
(
!
$x86only
)
{
if
(
!
$x86only
)
{
&public_label
("
AES_Te
");
&function_begin_B
("
_sse_AES_encrypt_compact
");
&function_begin_B
("
_sse_AES_encrypt_compact
");
&pxor
("
mm0
",
&QWP
(
0
,
$key
));
# 7, 6, 5, 4, 3, 2, 1, 0
&pxor
("
mm0
",
&QWP
(
0
,
$key
));
# 7, 6, 5, 4, 3, 2, 1, 0
&pxor
("
mm4
",
&QWP
(
8
,
$key
));
# 15,14,13,12,11,10, 9, 8
&pxor
("
mm4
",
&QWP
(
8
,
$key
));
# 15,14,13,12,11,10, 9, 8
...
@@ -836,7 +836,6 @@ sub enclast()
...
@@ -836,7 +836,6 @@ sub enclast()
if
(
$i
==
3
)
{
&mov
(
$s
[
3
],
$acc
);
}
if
(
$i
==
3
)
{
&mov
(
$s
[
3
],
$acc
);
}
}
}
&public_label
("
AES_Te
");
&function_begin_B
("
_x86_AES_encrypt
");
&function_begin_B
("
_x86_AES_encrypt
");
if
(
$vertical_spin
)
{
if
(
$vertical_spin
)
{
# I need high parts of volatile registers to be accessible...
# I need high parts of volatile registers to be accessible...
...
@@ -1158,7 +1157,6 @@ sub enclast()
...
@@ -1158,7 +1157,6 @@ sub enclast()
&function_end_B
("
_x86_AES_encrypt
");
&function_end_B
("
_x86_AES_encrypt
");
# void AES_encrypt (const void *inp,void *out,const AES_KEY *key);
# void AES_encrypt (const void *inp,void *out,const AES_KEY *key);
&public_label
("
AES_Te
");
&function_begin
("
AES_encrypt
");
&function_begin
("
AES_encrypt
");
&mov
(
$acc
,
&wparam
(
0
));
# load inp
&mov
(
$acc
,
&wparam
(
0
));
# load inp
&mov
(
$key
,
&wparam
(
2
));
# load key
&mov
(
$key
,
&wparam
(
2
));
# load key
...
@@ -1324,7 +1322,6 @@ sub dectransform()
...
@@ -1324,7 +1322,6 @@ sub dectransform()
&mov
(
&DWP
(
4
+
4
*$i
,"
esp
"),
$s
[
$i
])
if
(
$i
>=
2
);
&mov
(
&DWP
(
4
+
4
*$i
,"
esp
"),
$s
[
$i
])
if
(
$i
>=
2
);
}
}
&public_label
("
AES_Td
");
&function_begin_B
("
_x86_AES_decrypt_compact
");
&function_begin_B
("
_x86_AES_decrypt_compact
");
# note that caller is expected to allocate stack frame for me!
# note that caller is expected to allocate stack frame for me!
&mov
(
$__key
,
$key
);
# save key
&mov
(
$__key
,
$key
);
# save key
...
@@ -1477,7 +1474,6 @@ sub sse_deccompact()
...
@@ -1477,7 +1474,6 @@ sub sse_deccompact()
}
}
if
(
!
$x86only
)
{
if
(
!
$x86only
)
{
&public_label
("
AES_Td
");
&function_begin_B
("
_sse_AES_decrypt_compact
");
&function_begin_B
("
_sse_AES_decrypt_compact
");
&pxor
("
mm0
",
&QWP
(
0
,
$key
));
# 7, 6, 5, 4, 3, 2, 1, 0
&pxor
("
mm0
",
&QWP
(
0
,
$key
));
# 7, 6, 5, 4, 3, 2, 1, 0
&pxor
("
mm4
",
&QWP
(
8
,
$key
));
# 15,14,13,12,11,10, 9, 8
&pxor
("
mm4
",
&QWP
(
8
,
$key
));
# 15,14,13,12,11,10, 9, 8
...
@@ -1662,7 +1658,6 @@ sub declast()
...
@@ -1662,7 +1658,6 @@ sub declast()
&lea
(
$td
,
&DWP
(
-
2048
,
$td
));
}
&lea
(
$td
,
&DWP
(
-
2048
,
$td
));
}
}
}
&public_label
("
AES_Td
");
&function_begin_B
("
_x86_AES_decrypt
");
&function_begin_B
("
_x86_AES_decrypt
");
# note that caller is expected to allocate stack frame for me!
# note that caller is expected to allocate stack frame for me!
&mov
(
$__key
,
$key
);
# save key
&mov
(
$__key
,
$key
);
# save key
...
@@ -1951,7 +1946,6 @@ sub declast()
...
@@ -1951,7 +1946,6 @@ sub declast()
&function_end_B
("
_x86_AES_decrypt
");
&function_end_B
("
_x86_AES_decrypt
");
# void AES_decrypt (const void *inp,void *out,const AES_KEY *key);
# void AES_decrypt (const void *inp,void *out,const AES_KEY *key);
&public_label
("
AES_Td
");
&function_begin
("
AES_decrypt
");
&function_begin
("
AES_decrypt
");
&mov
(
$acc
,
&wparam
(
0
));
# load inp
&mov
(
$acc
,
&wparam
(
0
));
# load inp
&mov
(
$key
,
&wparam
(
2
));
# load key
&mov
(
$key
,
&wparam
(
2
));
# load key
...
@@ -2035,8 +2029,6 @@ my $ivec=&DWP(60,"esp"); # ivec[16]
...
@@ -2035,8 +2029,6 @@ my $ivec=&DWP(60,"esp"); # ivec[16]
my
$aes_key
=
&DWP
(
76
,"
esp
");
# copy of aes_key
my
$aes_key
=
&DWP
(
76
,"
esp
");
# copy of aes_key
my
$mark
=
&DWP
(
76
+
240
,"
esp
");
# copy of aes_key->rounds
my
$mark
=
&DWP
(
76
+
240
,"
esp
");
# copy of aes_key->rounds
&public_label
("
AES_Te
");
&public_label
("
AES_Td
");
&function_begin
("
AES_cbc_encrypt
");
&function_begin
("
AES_cbc_encrypt
");
&mov
(
$s2
eq
"
ecx
"?
$s2
:
"",
&wparam
(
2
));
# load len
&mov
(
$s2
eq
"
ecx
"?
$s2
:
"",
&wparam
(
2
));
# load len
&cmp
(
$s2
,
0
);
&cmp
(
$s2
,
0
);
...
@@ -2657,7 +2649,6 @@ sub enckey()
...
@@ -2657,7 +2649,6 @@ sub enckey()
&xor
("
eax
",
&DWP
(
1024
-
128
,
$tbl
,"
ecx
",
4
));
# rcon
&xor
("
eax
",
&DWP
(
1024
-
128
,
$tbl
,"
ecx
",
4
));
# rcon
}
}
&public_label
("
AES_Te
");
&function_begin
("
_x86_AES_set_encrypt_key
");
&function_begin
("
_x86_AES_set_encrypt_key
");
&mov
("
esi
",
&wparam
(
1
));
# user supplied key
&mov
("
esi
",
&wparam
(
1
));
# user supplied key
&mov
("
edi
",
&wparam
(
3
));
# private key schedule
&mov
("
edi
",
&wparam
(
3
));
# private key schedule
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录