Home | History | Annotate | Download | only in sha3

Lines Matching defs:sha3

1 /*	$NetBSD: sha3.c,v 1.4 2024/01/19 19:32:42 christos Exp $	*/
41 __KERNEL_RCSID(0, "$NetBSD: sha3.c,v 1.4 2024/01/19 19:32:42 christos Exp $");
48 __RCSID("$NetBSD: sha3.c,v 1.4 2024/01/19 19:32:42 christos Exp $");
60 #include <sys/sha3.h>
107 sha3_init(struct sha3 *C, unsigned rw)
117 sha3_update(struct sha3 *C, const uint8_t *data, size_t len, unsigned rw)
196 sha3_final(uint8_t *h, unsigned d, struct sha3 *C, unsigned rw)
219 /* For SHA3-224, we need to expose a partial word. */
231 shake_final(uint8_t *h, size_t d, struct sha3 *C, unsigned rw)
432 static const uint8_t d224_0[] = { /* SHA3-224(0-bit) */
438 static const uint8_t d256_0[] = { /* SHA3-256(0-bit) */
444 static const uint8_t d384_0[] = { /* SHA3-384(0-bit) */
452 static const uint8_t d512_0[] = { /* SHA3-512(0-bit) */
480 static const uint8_t d224_1600[] = { /* SHA3-224(200 * 0xa3) */
486 static const uint8_t d256_1600[] = { /* SHA3-256(200 * 0xa3) */
492 static const uint8_t d384_1600[] = { /* SHA3-384(200 * 0xa3) */
500 static const uint8_t d512_1600[] = { /* SHA3-512(200 * 0xa3) */
542 struct sha3 sha3;
543 SHA3_224_CTX *sha3224 = (SHA3_224_CTX *)&sha3;
544 SHA3_256_CTX *sha3256 = (SHA3_256_CTX *)&sha3;
545 SHA3_384_CTX *sha3384 = (SHA3_384_CTX *)&sha3;
546 SHA3_512_CTX *sha3512 = (SHA3_512_CTX *)&sha3;
547 SHAKE128_CTX *shake128 = (SHAKE128_CTX *)&sha3;
548 SHAKE256_CTX *shake256 = (SHAKE256_CTX *)&sha3;