Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
7d1f55e9
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看板
提交
7d1f55e9
编写于
9月 10, 2010
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add ghash-s390x.pl.
上级
d52d5ad1
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
174 addition
and
3 deletion
+174
-3
Configure
Configure
+1
-1
TABLE
TABLE
+2
-2
crypto/modes/asm/ghash-s390x.pl
crypto/modes/asm/ghash-s390x.pl
+171
-0
未找到文件。
Configure
浏览文件 @
7d1f55e9
...
@@ -133,7 +133,7 @@ my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-
...
@@ -133,7 +133,7 @@ my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-
my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o::::::::::::void";
my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o::::::::::::void";
my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o:::::sha1-alpha.o:::::::ghash-alpha.o:void";
my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o:::::sha1-alpha.o:::::::ghash-alpha.o:void";
my $mips3_asm=":bn-mips3.o:::::::::::::void";
my $mips3_asm=":bn-mips3.o:::::::::::::void";
my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o::aes_ctr.o aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o::::::void";
my $s390x_asm="s390xcap.o s390xcpuid.o:bn-s390x.o s390x-mont.o::aes_ctr.o aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::
ghash-s390x.o
:void";
my $armv4_asm=":bn_asm.o armv4-mont.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::ghash-armv4.o:void";
my $armv4_asm=":bn_asm.o armv4-mont.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::ghash-armv4.o:void";
my $parisc11_asm="pariscid.o:bn_asm.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o:32";
my $parisc11_asm="pariscid.o:bn_asm.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o:32";
my $parisc20_asm="pariscid.o:pa-risc2W.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o:64";
my $parisc20_asm="pariscid.o:pa-risc2W.o parisc-mont.o::aes_core.o aes_cbc.o aes-parisc.o:::sha1-parisc.o sha256-parisc.o sha512-parisc.o::rc4-parisc.o:::::ghash-parisc.o:64";
...
...
TABLE
浏览文件 @
7d1f55e9
...
@@ -1506,7 +1506,7 @@ $multilib =
...
@@ -1506,7 +1506,7 @@ $multilib =
*** debug-ben-debug
*** debug-ben-debug
$cc = gcc
$cc = gcc
$cflags = -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -DBN_DEBUG -DCONF_DEBUG -D
BN_CTX_DEBUG -D
DEBUG_SAFESTACK -g3 -O2 -pipe
$cflags = -Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -g3 -O2 -pipe
$unistd =
$unistd =
$thread_cflag = (unknown)
$thread_cflag = (unknown)
$sys_id =
$sys_id =
...
@@ -3893,7 +3893,7 @@ $rmd160_obj =
...
@@ -3893,7 +3893,7 @@ $rmd160_obj =
$rc5_obj =
$rc5_obj =
$wp_obj =
$wp_obj =
$cmll_obj =
$cmll_obj =
$modes_obj =
$modes_obj =
ghash-s390x.o
$perlasm_scheme = void
$perlasm_scheme = void
$dso_scheme = dlfcn
$dso_scheme = dlfcn
$shared_target= linux-shared
$shared_target= linux-shared
...
...
crypto/modes/asm/ghash-s390x.pl
0 → 100644
浏览文件 @
7d1f55e9
#!/usr/bin/env perl
# ====================================================================
# Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
# project. The module is, however, dual licensed under OpenSSL and
# CRYPTOGAMS licenses depending on where you obtain it. For further
# details see http://www.openssl.org/~appro/cryptogams/.
# ====================================================================
# September 2010.
while
((
$output
=
shift
)
&&
(
$output
!~
/^\w[\w\-]*\.\w+$/
))
{}
open
STDOUT
,"
>
$output
";
$Zhi
=
"
%r0
";
$Zlo
=
"
%r1
";
$Xi
=
"
%r2
";
# argument block
$Htbl
=
"
%r3
";
$inp
=
"
%r4
";
$len
=
"
%r5
";
$rem0
=
"
%r6
";
# variables
$rem1
=
"
%r7
";
$nlo
=
"
%r8
";
$nhi
=
"
%r9
";
$xi
=
"
%r10
";
$cnt
=
"
%r11
";
$tmp
=
"
%r12
";
$x78
=
"
%r13
";
$rem_4bit
=
"
%r14
";
$sp
=
"
%r15
";
$code
.=
<<___;
.text
.globl gcm_gmult_4bit
.align 32
gcm_gmult_4bit:
stmg %r6,%r14,48($sp)
aghi $Xi,-1
lghi $len,1
lghi $x78,`0xf<<3`
larl $rem_4bit,rem_4bit
lg $Zlo,8+1($Xi) # Xi
j .Lgmult_shortcut
.type gcm_gmult_4bit,\@function
.size gcm_gmult_4bit,(.-gcm_gmult_4bit)
.globl gcm_ghash_4bit
.align 32
gcm_ghash_4bit:
stmg %r6,%r14,48($sp)
aghi $Xi,-1
srlg $len,$len,4
lghi $x78,`0xf<<3`
larl $rem_4bit,rem_4bit
lg $Zlo,8+1($Xi) # Xi
lg $Zhi,0+1($Xi)
.Louter:
xg $Zlo,8($inp) # Xi ^= inp
xg $Zhi,0($inp)
stg $Zlo,8+1($Xi)
stg $Zhi,0+1($Xi)
.Lgmult_shortcut:
lghi $tmp,0xff
srlg $xi,$Zlo,8 # extract first two bytes
lgr $nhi,$Zlo
ngr $xi,$tmp
ngr $nhi,$tmp
sllg $nlo,$nhi,4
nill $nhi,0xf0
nill $nlo,0xf0
lghi $cnt,14
lg $Zlo,8($nlo,$Htbl)
lg $Zhi,0($nlo,$Htbl)
sllg $nlo,$xi,4
nill $xi,0xf0
sllg $rem0,$Zlo,3
nill $nlo,0xf0
srlg $Zlo,$Zlo,4
ngr $rem0,$x78
sllg $tmp,$Zhi,60
xg $Zlo,8($nhi,$Htbl)
srlg $Zhi,$Zhi,4
xgr $Zlo,$tmp
xg $Zhi,0($nhi,$Htbl)
lgr $nhi,$xi
sllg $rem1,$Zlo,3
.Lghash_inner:
srlg $Zlo,$Zlo,4
ngr $rem1,$x78
xg $Zlo,8($nlo,$Htbl)
sllg $tmp,$Zhi,60
xg $Zhi,0($rem0,$rem_4bit)
xgr $Zlo,$tmp
srlg $Zhi,$Zhi,4
llgc $xi,0($cnt,$Xi)
sllg $rem0,$Zlo,3
xg $Zhi,0($nlo,$Htbl)
sllg $nlo,$xi,4
nill $xi,0xf0
nill $nlo,0xf0
srlg $Zlo,$Zlo,4
ngr $rem0,$x78
xg $Zlo,8($nhi,$Htbl)
sllg $tmp,$Zhi,60
xg $Zhi,0($rem1,$rem_4bit)
xgr $Zlo,$tmp
srlg $Zhi,$Zhi,4
sllg $rem1,$Zlo,3
xg $Zhi,0($nhi,$Htbl)
lgr $nhi,$xi
brct $cnt,.Lghash_inner
srlg $Zlo,$Zlo,4
ngr $rem1,$x78
xg $Zlo,8($nlo,$Htbl)
sllg $tmp,$Zhi,60
xg $Zhi,0($rem0,$rem_4bit)
xgr $Zlo,$tmp
srlg $Zhi,$Zhi,4
sllg $rem0,$Zlo,3
xg $Zhi,0($nlo,$Htbl)
srlg $Zlo,$Zlo,4
ngr $rem0,$x78
xg $Zhi,0($rem1,$rem_4bit)
sllg $tmp,$Zhi,60
xg $Zlo,8($nhi,$Htbl)
srlg $Zhi,$Zhi,4
xgr $Zlo,$tmp
xg $Zhi,0($nhi,$Htbl)
la $inp,16($inp)
xg $Zhi,0($rem0,$rem_4bit)
brctg $len,.Louter
stg $Zlo,8+1($Xi)
stg $Zhi,0+1($Xi)
lmg %r6,%r14,48($sp)
br %r14
.type gcm_ghash_4bit,\@function
.size gcm_ghash_4bit,(.-gcm_ghash_4bit)
.align 64
rem_4bit:
.long `0x0000<<16`,0,`0x1C20<<16`,0,`0x3840<<16`,0,`0x2460<<16`,0
.long `0x7080<<16`,0,`0x6CA0<<16`,0,`0x48C0<<16`,0,`0x54E0<<16`,0
.long `0xE100<<16`,0,`0xFD20<<16`,0,`0xD940<<16`,0,`0xC560<<16`,0
.long `0x9180<<16`,0,`0x8DA0<<16`,0,`0xA9C0<<16`,0,`0xB5E0<<16`,0
.type rem_4bit,\@object
.size rem_4bit,(.-rem_4bit)
.string "GHASH for s390x, CRYPTOGAMS by <appro\@openssl.org>"
___
$code
=~
s/\`([^\`]*)\`/eval $1/g
em
;
print
$code
;
close
STDOUT
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录