Skip to content

Commit 1d21941

Browse files
authored
Merge pull request #392 from Tarsnap/import
Import from libcperciva and tarsnap
2 parents 6b6fbd7 + f97332f commit 1d21941

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

lib/scryptenc/scryptenc_cpuperf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,7 @@ scryptenc_cpuperf(double * opps)
110110

111111
/* We can do approximately i salsa20/8 cores per diffd seconds. */
112112
*opps = (double)i / diffd;
113+
114+
/* Success! */
113115
return (SCRYPT_OK);
114116
}

libcperciva/alg/sha256_arm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ static const uint32_t Krnd[64] = {
4949
X0 = vsha256su1q_u32(vsha256su0q_u32(X0, X1), X2, X3)
5050

5151
/**
52-
* SHA256_Transform_arm(state, block, W, S):
52+
* SHA256_Transform_arm(state, block):
5353
* Compute the SHA256 block compression function, transforming ${state} using
5454
* the data in ${block}. This implementation uses ARM SHA256 instructions,
5555
* and should only be used if _SHA256 is defined and cpusupport_arm_sha256()
56-
* returns nonzero. The arrays W and S may be filled with sensitive data, and
57-
* should be cleared by the callee.
56+
* returns nonzero.
5857
*/
5958
#ifdef POSIXFAIL_ABSTRACT_DECLARATOR
6059
void

libcperciva/alg/sha256_arm.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
#include <stdint.h>
55

66
/**
7-
* SHA256_Transform_arm(state, block, W, S):
7+
* SHA256_Transform_arm(state, block):
88
* Compute the SHA256 block compression function, transforming ${state} using
99
* the data in ${block}. This implementation uses ARM SHA256 instructions,
1010
* and should only be used if _SHA256 is defined and cpusupport_arm_sha256()
11-
* returns nonzero. The arrays W and S may be filled with sensitive data, and
12-
* should be cleared by the callee.
11+
* returns nonzero.
1312
*/
1413
#ifdef POSIXFAIL_ABSTRACT_DECLARATOR
1514
void SHA256_Transform_arm(uint32_t state[8], const uint8_t block[64]);

libcperciva/alg/sha256_sse2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mm_bswap_epi32(__m128i a)
2121
{
2222

2323
/* Swap bytes in each 16-bit word. */
24-
a = _mm_or_si128(_mm_slli_epi16(a, 8), _mm_srli_epi16(a, 8));
24+
a = _mm_or_si128(_mm_slli_epi16(a, 8), _mm_srli_epi16(a, 8));
2525

2626
/* Swap all 16-bit words. */
2727
a = _mm_shufflelo_epi16(a, _MM_SHUFFLE(2, 3, 0, 1));
@@ -167,7 +167,7 @@ MSG4(__m128i X0, __m128i X1, __m128i X2, __m128i X3)
167167
}
168168

169169
/**
170-
* SHA256_Transform_sse2(state, block):
170+
* SHA256_Transform_sse2(state, block, W, S):
171171
* Compute the SHA256 block compression function, transforming ${state} using
172172
* the data in ${block}. This implementation uses x86 SSE2 instructions, and
173173
* should only be used if _SSE2 is defined and cpusupport_x86_sse2() returns

libcperciva/alg/sha256_sse2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <stdint.h>
55

66
/**
7-
* SHA256_Transform_sse2(state, block):
7+
* SHA256_Transform_sse2(state, block, W, S):
88
* Compute the SHA256 block compression function, transforming ${state} using
99
* the data in ${block}. This implementation uses x86 SSE2 instructions, and
1010
* should only be used if _SSE2 is defined and cpusupport_x86_sse2() returns

libcperciva/util/entropy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int entropy_read_fill(struct entropy_read_cookie *, uint8_t *, size_t);
2525
* entropy_read_done(er):
2626
* Release any resources used by ${er}.
2727
*/
28-
int entropy_read_done(struct entropy_read_cookie * er);
28+
int entropy_read_done(struct entropy_read_cookie *);
2929

3030
/**
3131
* entropy_read(buf, buflen):

0 commit comments

Comments
 (0)