summaryrefslogtreecommitdiff
path: root/gcm.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix file header copy&paste errors.Niels Möller2014-07-041-1/+1
|
* Update copyright headers for dual licensing.Niels Möller2014-04-121-29/+37
|
* Define and use nettle_cipher_func, for block ciphers.Niels Möller2014-03-181-5/+5
|
* Comment fixes.Niels Möller2014-01-261-7/+1
|
* New type nettle_block16.Niels Möller2014-01-131-14/+15
|
* New x86_64 assembly for gcm hashing.Niels Möller2013-09-221-5/+8
|
* Support optional assembly files for both nettle and hogweed.Niels Möller2013-09-091-1/+7
| | | | Prepare for assembly gcm_gf_mul_8.
* Use size_t rather than unsigned for all hash-related functions.Niels Möller2013-04-261-3/+3
|
* Use size_t rather than unsigned for all cipher-related functions.Niels Möller2013-04-261-4/+4
|
* Updated FSF address. Patch from David Woodhouse.Niels Möller2012-07-071-2/+2
|
* Consistently use foo_func *f (rather than foo_func f) for declaring function ↵Niels Möller2012-06-251-1/+1
| | | | pointer arguments.
* Trivial whitespace fix.Niels Möller2011-07-241-1/+1
| | | | Rev: nettle/gcm.c:1.15
* * gcm.h (GCM_UPDATE): Renamed, from...Niels Möller2011-02-131-3/+3
| | | | | | | | | | | | | | | (GCM_AUTH): ...old name. * gcm-aes.c (gcm_aes_update): Renamed, from... (gcm_aes_auth): ...old name. * gcm.c (gcm_update): Renamed, and fixed an assert. From... (gcm_auth): ...old name. Rev: nettle/ChangeLog:1.150 Rev: nettle/gcm-aes.c:1.3 Rev: nettle/gcm.c:1.14 Rev: nettle/gcm.h:1.11
* * gcm.c (gcm_hash_sizes): New function.Niels Möller2011-02-091-31/+47
| | | | | | | | | (gcm_set_iv): Added support for IVs of arbitrary size. Needed another argument, for the hash subkey. (gcm_digest): Use gcm_hash_sizes. Rev: nettle/gcm.c:1.13 Rev: nettle/gcm.h:1.8
* * gcm.c (gcm_set_key): Replaced context argument by a structNiels Möller2011-02-091-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | gcm_key *. (gcm_hash): Replaced context argument by a struct gcm_key * and a pointer to the hashing state block. (gcm_auth): Added struct gcm_key * argument. (gcm_encrypt): Likewise. (gcm_decrypt): Likewise. (gcm_digest): Likewise. * gcm.h (struct gcm_key): Moved the key-dependent and message-independent state to its own struct. (struct gcm_ctx): ... and removed it here. (GCM_CTX): New macro. (GCM_SET_KEY): Likewise. (GCM_AUTH): Likewise. (GCM_ENCRYPT): Likewise. (GCM_DECRYPT): Likewise. (GCM_DIGEST): Likewise. (struct gcm_aes_ctx): New struct. Rev: nettle/ChangeLog:1.142 Rev: nettle/gcm.c:1.12 Rev: nettle/gcm.h:1.7
* * gcm.c (gcm_gf_shift): Added a separate result argument.Niels Möller2011-02-081-115/+100
| | | | | | | | | | | | | | | | | | | (gcm_gf_mul): Compile bitwise version only when GCM_TABLE_BITS == 0. Simplified interface with just two arguments pointing to complete blocks. (gcm_gf_shift_4, gcm_gf_shift_8): Renamed table-based functions, from... (gcm_gf_shift_chunk): ... old name. (gcm_gf_mul): Renamed both table-based versions and made the argument types compatible with the bitwise gcm_gf_mul. (gcm_gf_mul_chunk): ... the old name. (gcm_set_key): Initialize the table using adds and shifts only. When GCM_TABLE_BITS > 0, this eliminates the only use of the bitwise multiplication. (gcm_hash): Simplified, now that we have the same interface for gcm_gf_mul, regardless of table size. Rev: nettle/ChangeLog:1.140 Rev: nettle/gcm.c:1.11
* * gcm.c (GHASH_POLYNOMIAL): Use unsigned long for this constant.Niels Möller2011-02-081-5/+6
| | | | | | | | (gcm_gf_shift_chunk): Fixed bugs for the big endian 64-bit case, e.g., sparc64. For both 4-bit and 8-bit tables. Rev: nettle/ChangeLog:1.139 Rev: nettle/gcm.c:1.10
* * gcm.c: Use the new union gcm_block for all gf operations.Niels Möller2011-02-081-66/+59
| | | | | | | | * gcm.h (union gcm_block): New union, used to enforce alignment. Rev: nettle/ChangeLog:1.138 Rev: nettle/gcm.c:1.9 Rev: nettle/gcm.h:1.5
* * gcm.c (gcm_gf_shift_chunk) : Bug fix for little-endian 8-bitNiels Möller2011-02-071-2/+1
| | | | | | | tables. Rev: nettle/ChangeLog:1.137 Rev: nettle/gcm.c:1.8
* * gcm.c (gcm_gf_mul_chunk): Special case first and last iteration.Niels Möller2011-02-071-7/+23
| | | | | | | | | (gcm_gf_add): New function, a special case of memxor. Use it for all memxor calls with word-aligned 16 byte blocks. Improves performance to 152 cycles/byte with no tables, 28 cycles per byte with 4-bit tables and 10.5 cycles per byte with 8-bit tables. Rev: nettle/gcm.c:1.7
* (gcm_gf_shift_chunk): New implementation for 8-bit tables.Niels Möller2011-02-071-5/+72
| | | | | | | (gcm_gf_mul_chunk): Likewise. (gcm_set_key): Generate 8-bit tables. Rev: nettle/gcm.c:1.6
* Introduced 4-bit tables. Gives gmac performance of 45 cycles perNiels Möller2011-02-061-12/+158
| | | | | | | | | | | | | | | | | byte (still on intel x86_64). * gcm.c (gcm_gf_shift): Renamed. Tweaked little-endian masks. (gcm_rightshift): ... old name. (gcm_gf_mul): New argument for the output. Added length argument for one of the inputs (implicitly padding with zeros). (shift_table): New table (in 4-bit and 8-bit versions), generated by gcmdata. (gcm_gf_shift_chunk): New function shifting 4 bits at a time. (gcm_gf_mul_chunk): New function processing 4 bits at a time. (gcm_set_key): Generation of 4-bit key table. (gcm_hash): Use tables, when available. Rev: nettle/gcm.c:1.5
* * gcm.c (gcm_rightshift): Moved the reduction of the shifted outNiels Möller2011-02-061-12/+13
| | | | | | | | bit here. (gcm_gf_mul): Updated for gcm_rightshift change. Improves gmac performance to 181 cycles/byte. Rev: nettle/gcm.c:1.4
* (gcm_gf_mul): Rewrote. Still uses the bitwise algorithm from theNiels Möller2011-02-061-31/+27
| | | | | | | specification, but with separate byte and bit loops. Improves gmac performance a bit further, to 227 cycles/byte. Rev: nettle/gcm.c:1.3
* (gcm_rightshift): Complete rewrite, to use word ratherNiels Möller2011-02-061-13/+41
| | | | | | | than byte operations. Improves gmac performance from 830 cycles / byte to (still poor) 268 cycles per byte on intel x86_64. Rev: nettle/gcm.c:1.2
* * gcm.c: New file.Nikos Mavrogiannopoulos2011-02-051-0/+253
* gcm.h: New file. Rev: nettle/gcm.c:1.1 Rev: nettle/gcm.h:1.1