diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2019-03-03 21:12:34 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2019-03-26 18:12:29 +0100 |
commit | 03be7f48fad10aa8da3291c28a185ed750193c7b (patch) | |
tree | 9c12ca2dbbee4b234ece52ee748ef4434735bf68 /src/crypto/poly1305.h | |
parent | 2d46f1be0c3c8b7287aa1f62bb1f5b4a8d00ff6e (diff) |
Add Poly1305 implementation
Diffstat (limited to 'src/crypto/poly1305.h')
-rw-r--r-- | src/crypto/poly1305.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/crypto/poly1305.h b/src/crypto/poly1305.h new file mode 100644 index 0000000000..1598b013b9 --- /dev/null +++ b/src/crypto/poly1305.h @@ -0,0 +1,17 @@ +// Copyright (c) 2019 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_CRYPTO_POLY1305_H +#define BITCOIN_CRYPTO_POLY1305_H + +#include <stdint.h> +#include <stdlib.h> + +#define POLY1305_KEYLEN 32 +#define POLY1305_TAGLEN 16 + +void poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, + const unsigned char key[POLY1305_KEYLEN]); + +#endif // BITCOIN_CRYPTO_POLY1305_H |