symm/gcm.c: Make `gcm_mktable' and `gcm_mulk_...' be CPU-dependent.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 13 Nov 2018 11:26:56 +0000 (11:26 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 8 Sep 2019 17:33:28 +0000 (18:33 +0100)
commit1d30a9b905cb0d622934dd438117e0a1b354c3f8
tree3d2f67e84dc5a3d8e581a5a1c4b5a70ba8ef1206
parent8f6a527673a54c73b26abc5e6bf597f2574bdcb5
symm/gcm.c: Make `gcm_mktable' and `gcm_mulk_...' be CPU-dependent.

A couple of other changes to ease the way:

  * Split `gcm_mulk_...' into two endianness variants, so that
    CPU-specific variants don't have to track what's going on through
    the key table.

  * Abstract out `recover_k' to decode the key value from a table, for
    the use of `gcm_concat'.  This is, of course, necessary if the table
    format is CPU-dependent.

  * Add testing to make sure that `mktable'/`recover_k' agree with each
    other.

There are currently no fancy implementations, but you can tell what's
coming.  No actual functional change, except for logging if you set
`CATACOMB_CPUDISPATCH_DEBUG' in the environment.
symm/gcm-def.h
symm/gcm.c