Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wim Lewis
nettle
Commits
a98c30c3
Commit
a98c30c3
authored
Jan 25, 2015
by
Niels Möller
Browse files
In arm fat build, hook in sha1 and sha256 armv6 assembly.
parent
c06fb6d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
a98c30c3
2015-01-25 Niels Möller <nisse@lysator.liu.se>
* arm/fat/sha1-compress-2.asm: New file.
* arm/fat/sha256-compress-2.asm: Likewise.
* fat-arm.c (fat_init): Setup for use of additional v6 assembly
functions.
* sha1-compress.c: Prepare for fat build with C and assembly
implementations.
* sha256-compress.c: Likewise.
...
...
arm/fat/sha1-compress-2.asm
0 → 100644
View file @
a98c30c3
C
arm
/
fat
/
sha1
-
compress
-
2
.asm
ifelse
(
<
Copyright
(
C
)
2015
Niels
M
ö
ller
This
file
is
part
of
GNU
Nettle.
GNU
Nettle
is
free
software
:
you
can
redistribute
it
and
/
or
modify
it
under
the
terms
of
either
:
*
the
GNU
Lesser
General
Public
License
as
published
by
the
Free
Software
Foundation
; either version 3 of the License, or (at your
option
)
any
later
version.
or
*
the
GNU
General
Public
License
as
published
by
the
Free
Software
Foundation
; either version 2 of the License, or (at your
option
)
any
later
version.
or
both
in
parallel
,
as
here.
GNU
Nettle
is
di
stributed
in
the
hope
that
it
will
be
useful
,
but
WITHOUT
ANY
WARRANTY
; without even the implied warranty of
MERCHANTABILITY
or
FITNESS
FOR
A
PARTICULAR
PURPOSE.
See
the
GNU
General
Public
License
for
more
details.
You
should
have
received
copies
of
the
GNU
General
Public
License
and
the
GNU
Lesser
General
Public
License
al
ong
with
this
program.
If
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
dnl
PROLOGUE
(
_nettle_sha1_compress
)
picked
up
by
configure
define
(
<
fat_transform
>
,
<
$
1
_armv6
>
)
include_src
(
<
arm
/
v6
/
sha1
-
compress.asm
>
)
arm/fat/sha256-compress-2.asm
0 → 100644
View file @
a98c30c3
C
arm
/
fat
/
sha256
-
compress
-
2
.asm
ifelse
(
<
Copyright
(
C
)
2015
Niels
M
ö
ller
This
file
is
part
of
GNU
Nettle.
GNU
Nettle
is
free
software
:
you
can
redistribute
it
and
/
or
modify
it
under
the
terms
of
either
:
*
the
GNU
Lesser
General
Public
License
as
published
by
the
Free
Software
Foundation
; either version 3 of the License, or (at your
option
)
any
later
version.
or
*
the
GNU
General
Public
License
as
published
by
the
Free
Software
Foundation
; either version 2 of the License, or (at your
option
)
any
later
version.
or
both
in
parallel
,
as
here.
GNU
Nettle
is
di
stributed
in
the
hope
that
it
will
be
useful
,
but
WITHOUT
ANY
WARRANTY
; without even the implied warranty of
MERCHANTABILITY
or
FITNESS
FOR
A
PARTICULAR
PURPOSE.
See
the
GNU
General
Public
License
for
more
details.
You
should
have
received
copies
of
the
GNU
General
Public
License
and
the
GNU
Lesser
General
Public
License
al
ong
with
this
program.
If
not
,
see
http
:
//
www.gnu.org
/
licenses
/
.
>)
dnl
PROLOGUE
(
_nettle_sha256_compress
)
picked
up
by
configure
define
(
<
fat_transform
>
,
<
$
1
_armv6
>
)
include_src
(
<
arm
/
v6
/
sha256
-
compress.asm
>
)
fat-arm.c
View file @
a98c30c3
...
...
@@ -145,6 +145,14 @@ DECLARE_FAT_FUNC(_nettle_salsa20_core, salsa20_core_func)
DECLARE_FAT_FUNC_VAR
(
salsa20_core
,
salsa20_core_func
,
c
)
DECLARE_FAT_FUNC_VAR
(
salsa20_core
,
salsa20_core_func
,
neon
)
DECLARE_FAT_FUNC
(
_nettle_sha1_compress
,
sha1_compress_func
)
DECLARE_FAT_FUNC_VAR
(
sha1_compress
,
sha1_compress_func
,
c
)
DECLARE_FAT_FUNC_VAR
(
sha1_compress
,
sha1_compress_func
,
armv6
)
DECLARE_FAT_FUNC
(
_nettle_sha256_compress
,
sha256_compress_func
)
DECLARE_FAT_FUNC_VAR
(
sha256_compress
,
sha256_compress_func
,
c
)
DECLARE_FAT_FUNC_VAR
(
sha256_compress
,
sha256_compress_func
,
armv6
)
DECLARE_FAT_FUNC
(
_nettle_sha512_compress
,
sha512_compress_func
)
DECLARE_FAT_FUNC_VAR
(
sha512_compress
,
sha512_compress_func
,
c
)
DECLARE_FAT_FUNC_VAR
(
sha512_compress
,
sha512_compress_func
,
neon
)
...
...
@@ -181,6 +189,8 @@ fat_init (void)
fprintf
(
stderr
,
"libnettle: enabling armv6 code.
\n
"
);
_nettle_aes_encrypt_vec
=
_nettle_aes_encrypt_armv6
;
_nettle_aes_decrypt_vec
=
_nettle_aes_decrypt_armv6
;
_nettle_sha1_compress_vec
=
_nettle_sha1_compress_armv6
;
_nettle_sha256_compress_vec
=
_nettle_sha256_compress_armv6
;
}
else
{
...
...
@@ -188,6 +198,8 @@ fat_init (void)
fprintf
(
stderr
,
"libnettle: not enabling armv6 code.
\n
"
);
_nettle_aes_encrypt_vec
=
_nettle_aes_encrypt_arm
;
_nettle_aes_decrypt_vec
=
_nettle_aes_decrypt_arm
;
_nettle_sha1_compress_vec
=
_nettle_sha1_compress_c
;
_nettle_sha256_compress_vec
=
_nettle_sha256_compress_c
;
}
if
(
features
.
have_neon
)
{
...
...
@@ -229,6 +241,14 @@ DEFINE_FAT_FUNC(_nettle_salsa20_core, void,
(
uint32_t
*
dst
,
const
uint32_t
*
src
,
unsigned
rounds
),
(
dst
,
src
,
rounds
))
DEFINE_FAT_FUNC
(
_nettle_sha1_compress
,
void
,
(
uint32_t
*
state
,
const
uint8_t
*
input
),
(
state
,
input
))
DEFINE_FAT_FUNC
(
_nettle_sha256_compress
,
void
,
(
uint32_t
*
state
,
const
uint8_t
*
input
,
const
uint32_t
*
k
),
(
state
,
input
,
k
))
DEFINE_FAT_FUNC
(
_nettle_sha512_compress
,
void
,
(
uint64_t
*
state
,
const
uint8_t
*
input
,
const
uint64_t
*
k
),
(
state
,
input
,
k
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment