diff options
author | Niels Möller <nisse@lysator.liu.se> | 2022-02-18 21:14:49 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2022-02-18 21:14:49 +0100 |
commit | 1d438ad40aa983cf9dc3c0f41cabb6bea70af977 (patch) | |
tree | 9e3c83c277738045adb111c08a5a740dbb5ad373 /Makefile.in | |
parent | bdf820df0b90f210222ef56a27f95e0710c36c92 (diff) | |
download | nettle-1d438ad40aa983cf9dc3c0f41cabb6bea70af977.tar.gz |
Refactor GCM C implementation.
Assembly implementations not yet updated.
* Makefile.in (nettle_SOURCES): Add ghash-set-key.c ghash-update.c.
(DISTFILES): Replaced gcm-internal.h with ghash-internal.h.
* testsuite/gcm-test.c (test_ghash_internal): Updated to use
_ghash_set_key and _ghash_update.
* gcm.c (INC32): Deleted macro, used in only one place.
(gcm_set_key): Update to use _ghash_set_key.
(gcm_hash): Renamed, was _gcm_hash, and implemented in terms of
_ghash_update.
(bswap_if_le): New function (copied from nist-keywrap.c).
(gcm_hash_sizes): Use bswap_if_le and _ghash_update.
(gcm_set_iv): Updated to use gcm_hash and block16_zero.
(gcm_digest): Use _ghash_digest.
* ghash-internal.h: New file, declaring new internal ghash interface.
* gcm-internal.h: Deleted file.
* ghash-update.c (gcm_gf_shift_8): Moved here (from gcm.c)
(gcm_gf_mul): Likewise.
(_ghash_update): New function, extracted from _nettle_gcm_hash_c.
(_ghash_digest): New function.
* ghash-set-key.c (_ghash_set_key): New file and function.
Extracted from _nettle_gcm_init_key_c and _nettle_gcm_set_key.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in index f6bc2155..116b1cc2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -106,7 +106,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c aes-decrypt-table.c \ chacha-set-key.c chacha-set-nonce.c \ ctr.c ctr16.c des.c des3.c \ eax.c eax-aes128.c eax-aes128-meta.c \ - gcm.c gcm-aes.c \ + ghash-set-key.c ghash-update.c gcm.c gcm-aes.c \ gcm-aes128.c gcm-aes128-meta.c \ gcm-aes192.c gcm-aes192-meta.c \ gcm-aes256.c gcm-aes256-meta.c \ @@ -258,7 +258,7 @@ DISTFILES = $(SOURCES) $(HEADERS) getopt.h getopt_int.h \ nettle.pc.in hogweed.pc.in \ desdata.stamp $(des_headers) descore.README \ aes-internal.h block-internal.h blowfish-internal.h camellia-internal.h \ - gcm-internal.h gost28147-internal.h poly1305-internal.h \ + ghash-internal.h gost28147-internal.h poly1305-internal.h \ serpent-internal.h cast128_sboxes.h desinfo.h desCode.h \ ripemd160-internal.h sha2-internal.h \ memxor-internal.h nettle-internal.h nettle-write.h \ |