Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wim Lewis
nettle
Commits
c06fb6d4
Commit
c06fb6d4
authored
10 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Prepare for additional fat functions.
parent
c4ae6233
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
ChangeLog
+10
-0
10 additions, 0 deletions
ChangeLog
configure.ac
+4
-1
4 additions, 1 deletion
configure.ac
fat-setup.h
+3
-0
3 additions, 0 deletions
fat-setup.h
sha1-compress.c
+7
-0
7 additions, 0 deletions
sha1-compress.c
sha256-compress.c
+7
-0
7 additions, 0 deletions
sha256-compress.c
with
31 additions
and
1 deletion
ChangeLog
+
10
−
0
View file @
c06fb6d4
2015-01-25 Niels Möller <nisse@lysator.liu.se>
2015-01-25 Niels Möller <nisse@lysator.liu.se>
* sha1-compress.c: Prepare for fat build with C and assembly
implementations.
* sha256-compress.c: Likewise.
* fat-setup.h (sha1_compress_func, sha256_compress_func): New typedefs.
* configure.ac (asm_nettle_optional_list): Added
sha1-compress-2.asm and sha256-compress-2.asm, and corresponding
HAVE_NATIVE_*.
From Martin Storsjö:
From Martin Storsjö:
* arm: Add .arch directives for armv6. This allows building these
* arm: Add .arch directives for armv6. This allows building these
files as part of a fat build, even if the assembler by default
files as part of a fat build, even if the assembler by default
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
4
−
1
View file @
c06fb6d4
...
@@ -307,7 +307,8 @@ asm_replace_list="aes-encrypt-internal.asm aes-decrypt-internal.asm \
...
@@ -307,7 +307,8 @@ asm_replace_list="aes-encrypt-internal.asm aes-decrypt-internal.asm \
# Assembler files which generate additional object files if they are used.
# Assembler files which generate additional object files if they are used.
asm_nettle_optional_list="gcm-hash8.asm cpuid.asm \
asm_nettle_optional_list="gcm-hash8.asm cpuid.asm \
aes-encrypt-internal-2.asm aes-decrypt-internal-2.asm memxor-2.asm \
aes-encrypt-internal-2.asm aes-decrypt-internal-2.asm memxor-2.asm \
salsa20-core-internal-2.asm sha3-permute-2.asm sha512-compress-2.asm \
salsa20-core-internal-2.asm sha1-compress-2.asm sha256-compress-2.asm \
sha3-permute-2.asm sha512-compress-2.asm \
umac-nh-n-2.asm umac-nh-2.asm"
umac-nh-n-2.asm umac-nh-2.asm"
asm_hogweed_optional_list=""
asm_hogweed_optional_list=""
...
@@ -413,6 +414,8 @@ AH_VERBATIM([HAVE_NATIVE],
...
@@ -413,6 +414,8 @@ AH_VERBATIM([HAVE_NATIVE],
#undef HAVE_NATIVE_ecc_521_redc
#undef HAVE_NATIVE_ecc_521_redc
#undef HAVE_NATIVE_gcm_hash8
#undef HAVE_NATIVE_gcm_hash8
#undef HAVE_NATIVE_salsa20_core
#undef HAVE_NATIVE_salsa20_core
#undef HAVE_NATIVE_sha1_compress
#undef HAVE_NATIVE_sha256_compress
#undef HAVE_NATIVE_sha512_compress
#undef HAVE_NATIVE_sha512_compress
#undef HAVE_NATIVE_sha3_permute
#undef HAVE_NATIVE_sha3_permute
#undef HAVE_NATIVE_umac_nh
#undef HAVE_NATIVE_umac_nh
...
...
This diff is collapsed.
Click to expand it.
fat-setup.h
+
3
−
0
View file @
c06fb6d4
...
@@ -154,6 +154,9 @@ typedef void *(memxor_func)(void *dst, const void *src, size_t n);
...
@@ -154,6 +154,9 @@ typedef void *(memxor_func)(void *dst, const void *src, size_t n);
typedef
void
salsa20_core_func
(
uint32_t
*
dst
,
const
uint32_t
*
src
,
unsigned
rounds
);
typedef
void
salsa20_core_func
(
uint32_t
*
dst
,
const
uint32_t
*
src
,
unsigned
rounds
);
typedef
void
sha1_compress_func
(
uint32_t
*
state
,
const
uint8_t
*
input
);
typedef
void
sha256_compress_func
(
uint32_t
*
state
,
const
uint8_t
*
input
,
const
uint32_t
*
k
);
struct
sha3_state
;
struct
sha3_state
;
typedef
void
sha3_permute_func
(
struct
sha3_state
*
state
);
typedef
void
sha3_permute_func
(
struct
sha3_state
*
state
);
...
...
This diff is collapsed.
Click to expand it.
sha1-compress.c
+
7
−
0
View file @
c06fb6d4
...
@@ -129,6 +129,13 @@
...
@@ -129,6 +129,13 @@
#define subRound(a, b, c, d, e, f, k, data) \
#define subRound(a, b, c, d, e, f, k, data) \
( e += ROTL32( 5, a ) + f( b, c, d ) + k + data, b = ROTL32( 30, b ) )
( e += ROTL32( 5, a ) + f( b, c, d ) + k + data, b = ROTL32( 30, b ) )
/* For fat builds */
#if HAVE_NATIVE_sha1_compress
void
_nettle_sha1_compress_c
(
uint32_t
*
state
,
const
uint8_t
*
input
);
#define _nettle_sha1_compress _nettle_sha1_compress_c
#endif
/* Perform the SHA transformation. Note that this code, like MD5, seems to
/* Perform the SHA transformation. Note that this code, like MD5, seems to
break some optimizing compilers due to the complexity of the expressions
break some optimizing compilers due to the complexity of the expressions
and the size of the basic block. It may be necessary to split it into
and the size of the basic block. It may be necessary to split it into
...
...
This diff is collapsed.
Click to expand it.
sha256-compress.c
+
7
−
0
View file @
c06fb6d4
...
@@ -116,6 +116,13 @@
...
@@ -116,6 +116,13 @@
h += S0(a) + Majority(a,b,c); \
h += S0(a) + Majority(a,b,c); \
} while (0)
} while (0)
/* For fat builds */
#if HAVE_NATIVE_sha256_compress
void
_nettle_sha256_compress_c
(
uint32_t
*
state
,
const
uint8_t
*
input
,
const
uint32_t
*
k
);
#define _nettle_sha256_compress _nettle_sha256_compress_c
#endif
void
void
_nettle_sha256_compress
(
uint32_t
*
state
,
const
uint8_t
*
input
,
const
uint32_t
*
k
)
_nettle_sha256_compress
(
uint32_t
*
state
,
const
uint8_t
*
input
,
const
uint32_t
*
k
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment