Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/aes-common.c')
-rw-r--r--crypto/aes-common.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/aes-common.c b/crypto/aes-common.c
new file mode 100644
index 00000000..3bed2af1
--- /dev/null
+++ b/crypto/aes-common.c
@@ -0,0 +1,20 @@
+/*
+ * Common variable definitions across all the AES implementations.
+ */
+
+#include "ssh.h"
+#include "aes.h"
+
+const uint8_t aes_key_setup_round_constants[10] = {
+ /* The first few powers of X in GF(2^8), used during key setup.
+ * This can safely be a lookup table without side channel risks,
+ * because key setup iterates through it once in a standard way
+ * regardless of the key. */
+ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36,
+};
+
+void aesgcm_cipher_crypt_length(
+ ssh_cipher *cipher, void *blk, int len, unsigned long seq)
+{
+ /* Do nothing: lengths are sent in clear for this cipher. */
+}