summaryrefslogtreecommitdiff
path: root/gcm.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-01-13 11:06:17 +0100
committerNiels Möller <nisse@lysator.liu.se>2014-01-13 11:21:56 +0100
commit61d9a6a04bb7e75dc01acc7ba9c30b003e7739ac (patch)
tree85625d7938d3e329bccc036838355b309570f2a7 /gcm.h
parent5ea9dfb0fc65c56aae2198579c926b1ac6cac721 (diff)
downloadnettle-61d9a6a04bb7e75dc01acc7ba9c30b003e7739ac.tar.gz
New type nettle_block16.
Diffstat (limited to 'gcm.h')
-rw-r--r--gcm.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/gcm.h b/gcm.h
index f50c7363..39b9e48a 100644
--- a/gcm.h
+++ b/gcm.h
@@ -60,27 +60,20 @@ extern "C" {
#define GCM_TABLE_BITS 8
-/* To make sure that we have proper alignment. */
-union gcm_block
-{
- uint8_t b[GCM_BLOCK_SIZE];
- unsigned long w[GCM_BLOCK_SIZE / sizeof(unsigned long)];
-};
-
/* Hashing subkey */
struct gcm_key
{
- union gcm_block h[1 << GCM_TABLE_BITS];
+ union nettle_block16 h[1 << GCM_TABLE_BITS];
};
/* Per-message state, depending on the iv */
struct gcm_ctx {
/* Original counter block */
- union gcm_block iv;
+ union nettle_block16 iv;
/* Updated for each block. */
- union gcm_block ctr;
+ union nettle_block16 ctr;
/* Hashing state */
- union gcm_block x;
+ union nettle_block16 x;
uint64_t auth_size;
uint64_t data_size;
};