Files
xen/xen/include/crypto
Jan Beulich c6ad5a701b crypto: adjust rijndaelEncrypt() prototype for gcc11
The upcoming release complains, not entirely unreasonably:

In file included from rijndael.c:33:
.../xen/include/crypto/rijndael.h:55:53: note: previously declared as 'const unsigned char[]'
   55 | void    rijndaelEncrypt(const unsigned int [], int, const unsigned char [],
      |                                                     ^~~~~~~~~~~~~~~~~~~~~~
rijndael.c:865:8: error: argument 4 of type 'u8[16]' {aka 'unsigned char[16]'} with mismatched bound [-Werror=array-parameter=]
  865 |     u8 ct[16])
      |     ~~~^~~~~~
In file included from rijndael.c:33:
.../xen/include/crypto/rijndael.h:56:13: note: previously declared as 'unsigned char[]'
   56 |             unsigned char []);
      |             ^~~~~~~~~~~~~~~~

Simply declare the correct array dimensions right away. This then allows
compilers to apply checking at call sites, which seems desirable anyway.

For the moment I'm leaving untouched the disagreement between u8/u32
used in the function definition and unsigned {char,int} used in the
declaration, as making this consistent would call for touching further
functions.

Reported-by: Charles Arnold <carnold@suse.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
2021-03-04 16:47:51 +01:00
..
2011-03-09 16:31:00 +00:00

About
=====
This documents the upstream sources for files in this directory.

rijndael.h
==========
This file comes from 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/crypto/

vmac.h
======
This file was developed by Ted Krovetz and Wei Dai (more details 
are in the files). 

See
- https://en.wikipedia.org/wiki/VMAC
- http://www.fastcrypto.org/vmac/vmac.h