mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-30 16:13:54 +08:00
da5c78c826
Define (missing) hash message size for SHA1. Define hashing size constants specific to TCP cookies. Add new function: tcp_cookie_generator(). Maintain global secret values for tcp_cookie_generator(). This is a significantly revised implementation of earlier (15-year-old) Photuris [RFC-2522] code for the KA9Q cooperative multitasking platform. Linux RCU technique appears to be well-suited to this application, though neither of the circular queue items are freed. These functions will also be used in subsequent patches that implement additional features. Signed-off-by: William.Allen.Simpson@gmail.com Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
14 lines
309 B
C
14 lines
309 B
C
#ifndef __CRYPTOHASH_H
|
|
#define __CRYPTOHASH_H
|
|
|
|
#define SHA_DIGEST_WORDS 5
|
|
#define SHA_MESSAGE_BYTES (512 /*bits*/ / 8)
|
|
#define SHA_WORKSPACE_WORDS 80
|
|
|
|
void sha_init(__u32 *buf);
|
|
void sha_transform(__u32 *digest, const char *data, __u32 *W);
|
|
|
|
__u32 half_md4_transform(__u32 buf[4], __u32 const in[8]);
|
|
|
|
#endif
|