[BACK]Return to poly1305.h CVS log [TXT][DIR] Up to [local] / src / sys / crypto

File: [local] / src / sys / crypto / poly1305.h (download)

Revision 1.2, Wed Jul 22 13:54:30 2020 UTC (3 years, 10 months ago) by tobhe
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, HEAD
Changes since 1.1: +1 -0 lines

Add missing CVS tags.

ok patrick@

/*	$OpenBSD: poly1305.h,v 1.2 2020/07/22 13:54:30 tobhe Exp $	*/
/*
 * Public Domain poly1305 from Andrew Moon
 *
 * poly1305 implementation using 32 bit * 32 bit = 64 bit multiplication
 * and 64 bit addition from https://github.com/floodyberry/poly1305-donna
 */

#ifndef _POLY1305_H_
#define _POLY1305_H_

#define poly1305_block_size 16

typedef struct poly1305_state {
	unsigned long r[5];
	unsigned long h[5];
	unsigned long pad[4];
	size_t leftover;
	unsigned char buffer[poly1305_block_size];
	unsigned char final;
} poly1305_state;

void	poly1305_init(poly1305_state *, const unsigned char[32]);
void	poly1305_update(poly1305_state *, const unsigned char *, size_t);
void	poly1305_finish(poly1305_state *, unsigned char[16]);

#endif	/* _POLY1305_H_ */