libbb: cose shrink in sha1
function old new delta sha1_process_block64 356 342 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
44075929a8
commit
f1d06462e8
@ -523,9 +523,6 @@ static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx)
|
|||||||
work = (work & b) ^ d;
|
work = (work & b) ^ d;
|
||||||
if (j <= 3)
|
if (j <= 3)
|
||||||
goto ge16;
|
goto ge16;
|
||||||
/* Used to do SWAP_BE32 here, but this
|
|
||||||
* requires ctx (see comment above) */
|
|
||||||
work += W[cnt];
|
|
||||||
} else {
|
} else {
|
||||||
if (i == 2)
|
if (i == 2)
|
||||||
work = ((b | c) & d) | (b & c);
|
work = ((b | c) & d) | (b & c);
|
||||||
@ -533,14 +530,14 @@ static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx)
|
|||||||
work ^= b;
|
work ^= b;
|
||||||
ge16:
|
ge16:
|
||||||
W[cnt] = W[cnt+16] = rotl32(W[cnt+13] ^ W[cnt+8] ^ W[cnt+2] ^ W[cnt], 1);
|
W[cnt] = W[cnt+16] = rotl32(W[cnt+13] ^ W[cnt+8] ^ W[cnt+2] ^ W[cnt], 1);
|
||||||
work += W[cnt];
|
|
||||||
}
|
}
|
||||||
|
work += W[cnt];
|
||||||
work += e + rotl32(a, 5) + rconsts[i];
|
work += e + rotl32(a, 5) + rconsts[i];
|
||||||
|
|
||||||
/* Rotate by one for next time */
|
/* Rotate by one for next time */
|
||||||
e = d;
|
e = d;
|
||||||
d = c;
|
d = c;
|
||||||
c = /* b = */ rotl32(b, 30);
|
c = rotl32(b, 30);
|
||||||
b = a;
|
b = a;
|
||||||
a = work;
|
a = work;
|
||||||
cnt = (cnt + 1) & 15;
|
cnt = (cnt + 1) & 15;
|
||||||
|
Loading…
Reference in New Issue
Block a user