summaryrefslogtreecommitdiff
path: root/umac.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-04-16 14:54:20 +0200
committerNiels Möller <nisse@lysator.liu.se>2013-04-16 14:54:20 +0200
commite1646357a32fc37f98c9c54e6cdabee12dd50119 (patch)
tree53242e2a1af717fa91d4a5cf8e53c924888e638e /umac.h
parent448502d686b1da11b44734da195e288c733e3e54 (diff)
downloadnettle-e1646357a32fc37f98c9c54e6cdabee12dd50119.tar.gz
Eliminated l1_out from umac context structs, store at end of l2_state instead.
Diffstat (limited to 'umac.h')
-rw-r--r--umac.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/umac.h b/umac.h
index 6f4d831c..339130de 100644
--- a/umac.h
+++ b/umac.h
@@ -73,11 +73,10 @@ extern "C" {
uint32_t l3_key2[(n)]; \
/* AES cipher for encrypting the nonce */ \
struct aes_ctx pdf_key; \
- /* Buffer l1 output for one block. \
- FIXME: Make part of l2 state? */ \
- uint64_t l1_out[(n)]; \
- /* For both poly64-hashing and poly128 hashing */ \
- uint64_t l2_state[2*(n)]; \
+ /* The l2_state consists of 2*n uint64_t, for poly64 \
+ and poly128 hashing, followed by n additional \
+ uint64_t used as an input buffer. */ \
+ uint64_t l2_state[3*(n)]; \
/* Input to the pdf_key, zero-padded and low bits \
cleared if appropriate. */ \
uint8_t nonce[AES_BLOCK_SIZE]; \
@@ -219,11 +218,11 @@ _umac_l2_init (unsigned size, uint32_t *k);
void
_umac_l2(const uint32_t *key, uint64_t *state, unsigned n,
- uint64_t count, uint64_t *prev, const uint64_t *m);
+ uint64_t count, const uint64_t *m);
void
_umac_l2_final(const uint32_t *key, uint64_t *state, unsigned n,
- uint64_t count, uint64_t *prev);
+ uint64_t count);
void
_umac_l3_init (unsigned size, uint64_t *k);