cifs: Adjust key sizes and key generation routines for AES256 encryption
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 25 Mar 2021 12:34:54 +0000 (12:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:32:07 +0000 (14:32 +0200)
commitd4ce2a8f465dfa007298c6b156cf1b0033d6a2c3
tree0be1570fa485fcc3a083bf689bec9ca8e5af10f3
parent86cc799e1d9d96358ed8fe4c868b42b2fd6c7646
cifs: Adjust key sizes and key generation routines for AES256 encryption

commit 45a4546c6167a2da348a31ca439d8a8ff773b6ea upstream.

For AES256 encryption (GCM and CCM), we need to adjust the size of a few
fields to 32 bytes instead of 16 to accommodate the larger keys.

Also, the L value supplied to the key generator needs to be changed from
to 256 when these algorithms are used.

Keeping the ioctl struct for dumping keys of the same size for now.
Will send out a different patch for that one.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
CC: <stable@vger.kernel.org> # v5.10+
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsglob.h
fs/cifs/cifspdu.h
fs/cifs/smb2glob.h
fs/cifs/smb2ops.c
fs/cifs/smb2transport.c