| 1 |
// Copyright (c) 2016, Google Inc. |
| 2 |
// SPDX-License-Identifier: ISC |
| 3 |
|
| 4 |
#ifndef OPENSSL_HEADER_POLY1305_INTERNAL_H |
| 5 |
#define OPENSSL_HEADER_POLY1305_INTERNAL_H |
| 6 |
|
| 7 |
#include <openssl/base.h> |
| 8 |
#include <openssl/poly1305.h> |
| 9 |
|
| 10 |
#include "../internal.h" |
| 11 |
|
| 12 |
#if defined(__cplusplus) |
| 13 |
extern "C" { |
| 14 |
#endif |
| 15 |
|
| 16 |
static inline struct poly1305_state_st *poly1305_aligned_state( |
| 17 |
poly1305_state *state) { |
| 18 |
return align_pointer(state, 64); |
| 19 |
} |
| 20 |
|
| 21 |
#if defined(OPENSSL_ARM) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_APPLE) |
| 22 |
#define OPENSSL_POLY1305_NEON |
| 23 |
|
| 24 |
void CRYPTO_poly1305_init_neon(poly1305_state *state, const uint8_t key[32]); |
| 25 |
|
| 26 |
void CRYPTO_poly1305_update_neon(poly1305_state *state, const uint8_t *in, |
| 27 |
size_t in_len); |
| 28 |
|
| 29 |
void CRYPTO_poly1305_finish_neon(poly1305_state *state, uint8_t mac[16]); |
| 30 |
#endif |
| 31 |
|
| 32 |
|
| 33 |
#if defined(__cplusplus) |
| 34 |
} // extern C |
| 35 |
#endif |
| 36 |
|
| 37 |
#endif // OPENSSL_HEADER_POLY1305_INTERNAL_H |