aes-common.c 633 B

123456789101112131415161718192021
  1. /*
  2. * Common variable definitions across all the AES implementations.
  3. */
  4. #include "ssh.h"
  5. #include "aes.h"
  6. const uint8_t aes_key_setup_round_constants[10] = {
  7. /* The first few powers of X in GF(2^8), used during key setup.
  8. * This can safely be a lookup table without side channel risks,
  9. * because key setup iterates through it once in a standard way
  10. * regardless of the key. */
  11. 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36,
  12. };
  13. void aesgcm_cipher_crypt_length(
  14. ssh_cipher *cipher, void *blk, int len, unsigned long seq)
  15. {
  16. /* Do nothing: lengths are sent in clear for this cipher. */
  17. }