···5858#define SMB2_HMACSHA256_SIZE (32)5959#define SMB2_CMACAES_SIZE (16)6060#define SMB3_SIGNKEY_SIZE (16)6161+#define SMB3_GCM256_CRYPTKEY_SIZE (32)61626263/* Maximum buffer size value we can send with 1 credit */6364#define SMB2_MAX_BUFFER_SIZE 65536
···352352/* Encryption Algorithms Ciphers */353353#define SMB2_ENCRYPTION_AES128_CCM cpu_to_le16(0x0001)354354#define SMB2_ENCRYPTION_AES128_GCM cpu_to_le16(0x0002)355355+/* we currently do not request AES256_CCM since presumably GCM faster */355356#define SMB2_ENCRYPTION_AES256_CCM cpu_to_le16(0x0003)356357#define SMB2_ENCRYPTION_AES256_GCM cpu_to_le16(0x0004)357358
+5-3
fs/cifs/smb2transport.c
···849849 struct crypto_aead *tfm;850850851851 if (!server->secmech.ccmaesencrypt) {852852- if (server->cipher_type == SMB2_ENCRYPTION_AES128_GCM)852852+ if ((server->cipher_type == SMB2_ENCRYPTION_AES128_GCM) ||853853+ (server->cipher_type == SMB2_ENCRYPTION_AES256_GCM))853854 tfm = crypto_alloc_aead("gcm(aes)", 0, 0);854855 else855856 tfm = crypto_alloc_aead("ccm(aes)", 0, 0);856857 if (IS_ERR(tfm)) {857857- cifs_server_dbg(VFS, "%s: Failed to alloc encrypt aead\n",858858+ cifs_server_dbg(VFS, "%s: Failed alloc encrypt aead\n",858859 __func__);859860 return PTR_ERR(tfm);860861 }···863862 }864863865864 if (!server->secmech.ccmaesdecrypt) {866866- if (server->cipher_type == SMB2_ENCRYPTION_AES128_GCM)865865+ if ((server->cipher_type == SMB2_ENCRYPTION_AES128_GCM) ||866866+ (server->cipher_type == SMB2_ENCRYPTION_AES256_GCM))867867 tfm = crypto_alloc_aead("gcm(aes)", 0, 0);868868 else869869 tfm = crypto_alloc_aead("ccm(aes)", 0, 0);