Go to the documentation of this file.
26 #include "../internal.h"
29 #if !defined(BORINGSSL_HAS_UINT128) || !defined(OPENSSL_X86_64)
55 "poly1305_state isn't large enough to hold aligned poly1305_state_st");
75 goto poly1305_donna_atmost15bytes;
78 poly1305_donna_16bytes:
91 state->h4 += (t3 >> 8) | (1 << 24);
127 goto poly1305_donna_16bytes;
131 poly1305_donna_atmost15bytes:
136 for (j = 0; j <
len; j++) {
140 for (; j < 16; j++) {
153 state->h3 += ((((
uint64_t)t3 << 32) | t2) >> 14) & 0x3ffffff;
154 state->h4 += (t3 >> 8);
156 goto poly1305_donna_mul;
163 #if defined(OPENSSL_POLY1305_NEON)
164 if (CRYPTO_is_NEON_capable()) {
165 CRYPTO_poly1305_init_neon(statep,
key);
185 state->r3 = t2 & 0x3f03fff;
187 state->r4 = t3 & 0x00fffff;
209 #if defined(OPENSSL_POLY1305_NEON)
210 if (CRYPTO_is_NEON_capable()) {
211 CRYPTO_poly1305_update_neon(statep,
in, in_len);
216 if (
state->buf_used) {
221 for (
size_t i = 0;
i <
todo;
i++) {
228 if (
state->buf_used == 16) {
235 size_t todo = in_len & ~0xf;
242 for (
size_t i = 0;
i < in_len;
i++) {
245 state->buf_used = in_len;
255 #if defined(OPENSSL_POLY1305_NEON)
256 if (CRYPTO_is_NEON_capable()) {
257 CRYPTO_poly1305_finish_neon(statep, mac);
262 if (
state->buf_used) {
294 g4 =
state->h4 +
b - (1 << 26);
321 #endif // !BORINGSSL_HAS_UINT128 || !OPENSSL_X86_64
static void poly1305_update(struct poly1305_state_st *state, const uint8_t *in, size_t len)
void CRYPTO_poly1305_finish(poly1305_state *statep, uint8_t mac[16])
void CRYPTO_poly1305_update(poly1305_state *statep, const uint8_t *in, size_t in_len)
static void * align_pointer(void *ptr, size_t alignment)
static struct poly1305_state_st * poly1305_aligned_state(poly1305_state *state)
static uint64_t mul32x32_64(uint32_t a, uint32_t b)
static void U32TO8_LE(uint8_t *m, uint32_t v)
static uint32_t U8TO32_LE(const uint8_t *m)
unsigned __int64 uint64_t
static void * OPENSSL_memcpy(void *dst, const void *src, size_t n)
void CRYPTO_poly1305_init(poly1305_state *statep, const uint8_t key[32])
const T1 const T2 const T3 & f3
uint8_t poly1305_state[512]
OPENSSL_STATIC_ASSERT(sizeof(struct poly1305_state_st)+63<=sizeof(poly1305_state), "poly1305_state isn't large enough to hold aligned poly1305_state_st")
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:44