Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
b4a9d5bf
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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,发现更多精彩内容 >>
提交
b4a9d5bf
编写于
3月 29, 2013
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aesni-x86_64.pl: fix typo and optimize small block performance.
上级
3d1160d5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
43 addition
and
21 deletion
+43
-21
crypto/aes/asm/aesni-x86_64.pl
crypto/aes/asm/aesni-x86_64.pl
+43
-21
未找到文件。
crypto/aes/asm/aesni-x86_64.pl
浏览文件 @
b4a9d5bf
...
...
@@ -1014,7 +1014,7 @@ ___
# does not update *ivec! (see crypto/modes/ctr128.c for details)
#
# Overhaul based on suggestions from Shay Gueron and Vlad Krasnov,
# http://rt.openssl.org/Ticket/Display.html?id=30
3
1&user=guest&pass=guest.
# http://rt.openssl.org/Ticket/Display.html?id=30
2
1&user=guest&pass=guest.
# Keywords are full unroll and modulo-schedule counter calculations
# with zero-round key xor.
{
...
...
@@ -1058,9 +1058,9 @@ $code.=<<___;
mov 12($key),$key0 # 0-round key LSB
movdqa $inout0,0x00(%rsp) # populate counter block
bswap $ctr
movdqa $inout0,
0x10(%rsp)
movdqa $inout0,
0x20(%rsp)
movdqa $inout0,
0x30(%rsp)
movdqa $inout0,
$inout1
movdqa $inout0,
$inout2
movdqa $inout0,
$inout3
movdqa $inout0,0x40(%rsp)
movdqa $inout0,0x50(%rsp)
movdqa $inout0,0x60(%rsp)
...
...
@@ -1074,15 +1074,18 @@ $code.=<<___;
bswap %r10d
xor $key0,%r9d
xor $key0,%r10d
mov %r9d,0x10+12(%rsp)
pinsrd \$3,%r9d,$inout1
lea 3($ctr),%r9
mov %r10d,0x20+12(%rsp)
movdqa $inout1,0x10(%rsp)
pinsrd \$3,%r10d,$inout2
bswap %r9d
lea 4($ctr),%r10
movdqa $inout2,0x20(%rsp)
xor $key0,%r9d
bswap %r10d
mov %r9d,0x30+12(%rsp)
pinsrd \$3,%r9d,$inout3
xor $key0,%r10d
movdqa $inout3,0x30(%rsp)
lea 5($ctr),%r9
mov %r10d,0x40+12(%rsp)
bswap %r9d
...
...
@@ -1099,9 +1102,6 @@ $code.=<<___;
$movkey 0x10($key),$rndkey1
movdqa 0x10(%rsp),$inout1
movdqa 0x20(%rsp),$inout2
movdqa 0x30(%rsp),$inout3
movdqa 0x40(%rsp),$inout4
movdqa 0x50(%rsp),$inout5
...
...
@@ -1278,9 +1278,11 @@ $code.=<<___;
.Lctr32_tail:
lea 16($key),$key
cmp \$4,$len
jbe .Lctr32_loop4
jb .Lctr32_loop3
je .Lctr32_loop4
movdqa 0x60(%rsp),$inout6
pxor $inout7,$inout7
$movkey 16($key),$rndkey0
aesenc $rndkey1,$inout0
...
...
@@ -1290,17 +1292,16 @@ $code.=<<___;
aesenc $rndkey1,$inout2
dec $rounds
aesenc $rndkey1,$inout3
movups ($inp),$in0
aesenc $rndkey1,$inout4
movups 0x10($inp),$in1
aesenc $rndkey1,$inout5
movups 0x20($inp),$in2
aesenc $rndkey1,$inout6
pxor $inout7,$inout7
$movkey 16($key),$rndkey1
call .Lenc_loop8_enter
movups ($inp),$in0
movups 0x10($inp),$in1
movups 0x20($inp),$in2
xorps $in0,$inout0
movups 0x30($inp),$in3
xorps $in1,$inout1
...
...
@@ -1337,9 +1338,36 @@ $code.=<<___;
dec $rounds
jnz .Lctr32_loop4
aesenclast $rndkey1,$inout0
movups ($inp),$in0
aesenclast $rndkey1,$inout1
movups 0x10($inp),$in1
aesenclast $rndkey1,$inout2
movups 0x20($inp),$in2
aesenclast $rndkey1,$inout3
movups 0x30($inp),$in3
xorps $in0,$inout0
movups $inout0,($out)
xorps $in1,$inout1
movups $inout1,0x10($out)
xorps $in2,$inout2
movups $inout2,0x20($out)
xorps $in3,$inout3
movups $inout3,0x30($out)
jmp .Lctr32_done
.align 32
.Lctr32_loop3:
aesenc $rndkey1,$inout0
lea 16($key),$key
aesenc $rndkey1,$inout1
aesenc $rndkey1,$inout2
$movkey ($key),$rndkey1
dec $rounds
jnz .Lctr32_loop3
aesenclast $rndkey1,$inout0
aesenclast $rndkey1,$inout1
aesenclast $rndkey1,$inout2
movups ($inp),$in0
xorps $in0,$inout0
...
...
@@ -1355,12 +1383,6 @@ $code.=<<___;
movups 0x20($inp),$in2
xorps $in2,$inout2
movups $inout2,0x20($out)
cmp \$4,$len
jb .Lctr32_done
movups 0x30($inp),$in3
xorps $in3,$inout3
movups $inout3,0x30($out)
jmp .Lctr32_done
.align 16
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录