#if defined(POLY1305_SSE2)
POLY1305_SSE2,
#endif
- };
+};
static const poly1305_impl_t *poly1305_opt = &poly1305_list[0];
-;
/* is the pointer aligned on a word boundary? */
static int poly1305_is_aligned(const void *p)
*/
#include "config.h"
+#include "poly1305.h"
enum {
POLY1305_BLOCK_SIZE = 16
};
p[7] = (unsigned char)(v >> 56) & 0xff;
}
-static size_t
+size_t
poly1305_block_size_ref(void) {
return POLY1305_BLOCK_SIZE;
}
-static void
+void
poly1305_init_ext_ref(void *state, const poly1305_key *key, size_t bytes_hint) {
poly1305_state_ref_t *st = (poly1305_state_ref_t *)state;
uint64_t t0, t1;
st->final = 0;
}
-static void
+void
poly1305_blocks_ref(void *state, const unsigned char *in, size_t inlen) {
poly1305_state_ref_t *st = (poly1305_state_ref_t *)state;
const uint64_t hibit = (st->final) ? 0 : ((uint64_t)1 << 40); /* 1 << 128 */
st->h[2] = h2;
}
-static void
+void
poly1305_finish_ext_ref(void *state, const unsigned char *in, size_t remaining, unsigned char mac[16]) {
poly1305_state_ref_t *st = (poly1305_state_ref_t *)state;
uint64_t h0, h1, h2, c;
}
-static void
+void
poly1305_auth_ref(unsigned char mac[16], const unsigned char *in, size_t inlen, const poly1305_key *key) {
poly1305_state_ref_t st;
size_t blocks;
#include "../chacha20/macro.S"
#include "constants.S"
+
SECTION_TEXT
GLOBAL_HIDDEN_FN poly1305_block_size_sse2
FN_END poly1305_finish_ext_sse2
GLOBAL_HIDDEN_FN poly1305_auth_sse2
+/*
cmpq $128, %rdx
jb poly1305_auth_x86_local
+*/
pushq %rbp
movq %rsp, %rbp
pushq %r14