mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-27 01:41:40 +00:00
Merge pull request #240 from PQClean/clang9.0.0
Fix Clang 9.0.0 warnings
This commit is contained in:
commit
c8347a0866
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
Checks: '*,-llvm-header-guard,-hicpp-*,-readability-function-size,-google-readability-todo,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-isolate-declaration,-readability-uppercase-literal-suffix'
|
Checks: '*,-llvm-header-guard,-hicpp-*,-readability-function-size,-google-readability-todo,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-readability-isolate-declaration,-readability-uppercase-literal-suffix,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling'
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
HeaderFilterRegex: '.*'
|
HeaderFilterRegex: '.*'
|
||||||
AnalyzeTemporaryDtors: false
|
AnalyzeTemporaryDtors: false
|
||||||
|
@ -199,11 +199,7 @@ static void gen_matrix(polyvec *a, const uint8_t *seed, int transposed) {
|
|||||||
PQCLEAN_KYBER768_AVX2_poly_nttunpack(&a[2].vec[0]);
|
PQCLEAN_KYBER768_AVX2_poly_nttunpack(&a[2].vec[0]);
|
||||||
PQCLEAN_KYBER768_AVX2_poly_nttunpack(&a[2].vec[1]);
|
PQCLEAN_KYBER768_AVX2_poly_nttunpack(&a[2].vec[1]);
|
||||||
|
|
||||||
if (transposed) {
|
|
||||||
PQCLEAN_KYBER768_AVX2_kyber_shake128_absorb(&state1x, seed, 2, 2);
|
PQCLEAN_KYBER768_AVX2_kyber_shake128_absorb(&state1x, seed, 2, 2);
|
||||||
} else {
|
|
||||||
PQCLEAN_KYBER768_AVX2_kyber_shake128_absorb(&state1x, seed, 2, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
PQCLEAN_KYBER768_AVX2_kyber_shake128_squeezeblocks(buf.x[0], GEN_MATRIX_MAXNBLOCKS, &state1x);
|
PQCLEAN_KYBER768_AVX2_kyber_shake128_squeezeblocks(buf.x[0], GEN_MATRIX_MAXNBLOCKS, &state1x);
|
||||||
bufbytes = GEN_MATRIX_MAXNBLOCKS * XOF_BLOCKBYTES;
|
bufbytes = GEN_MATRIX_MAXNBLOCKS * XOF_BLOCKBYTES;
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWIIICCLASSIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define _V1 68
|
#define _V1 68
|
||||||
#define _O1 36
|
#define _O1 36
|
||||||
#define _O2 36
|
#define _O2 36
|
||||||
|
#define _MAX_O 36
|
||||||
#define _HASH_LEN 48
|
#define _HASH_LEN 48
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +28,7 @@
|
|||||||
#define _V2_BYTE (_V2)
|
#define _V2_BYTE (_V2)
|
||||||
#define _O1_BYTE (_O1)
|
#define _O1_BYTE (_O1)
|
||||||
#define _O2_BYTE (_O2)
|
#define _O2_BYTE (_O2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O)
|
||||||
#define _PUB_N_BYTE (_PUB_N)
|
#define _PUB_N_BYTE (_PUB_N)
|
||||||
#define _PUB_M_BYTE (_PUB_M)
|
#define _PUB_M_BYTE (_PUB_M)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWIIICCYCLICCOMPRESSED_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define _V1 68
|
#define _V1 68
|
||||||
#define _O1 36
|
#define _O1 36
|
||||||
#define _O2 36
|
#define _O2 36
|
||||||
|
#define _MAX_O 36
|
||||||
#define _HASH_LEN 48
|
#define _HASH_LEN 48
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +28,7 @@
|
|||||||
#define _V2_BYTE (_V2)
|
#define _V2_BYTE (_V2)
|
||||||
#define _O1_BYTE (_O1)
|
#define _O1_BYTE (_O1)
|
||||||
#define _O2_BYTE (_O2)
|
#define _O2_BYTE (_O2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O)
|
||||||
#define _PUB_N_BYTE (_PUB_N)
|
#define _PUB_N_BYTE (_PUB_N)
|
||||||
#define _PUB_M_BYTE (_PUB_M)
|
#define _PUB_M_BYTE (_PUB_M)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWIIICCYCLIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define _V1 68
|
#define _V1 68
|
||||||
#define _O1 36
|
#define _O1 36
|
||||||
#define _O2 36
|
#define _O2 36
|
||||||
|
#define _MAX_O 36
|
||||||
#define _HASH_LEN 48
|
#define _HASH_LEN 48
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +28,7 @@
|
|||||||
#define _V2_BYTE (_V2)
|
#define _V2_BYTE (_V2)
|
||||||
#define _O1_BYTE (_O1)
|
#define _O1_BYTE (_O1)
|
||||||
#define _O2_BYTE (_O2)
|
#define _O2_BYTE (_O2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O)
|
||||||
#define _PUB_N_BYTE (_PUB_N)
|
#define _PUB_N_BYTE (_PUB_N)
|
||||||
#define _PUB_M_BYTE (_PUB_M)
|
#define _PUB_M_BYTE (_PUB_M)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWIACLASSIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWIACLASSIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#define _V1 32
|
#define _V1 32
|
||||||
#define _O1 32
|
#define _O1 32
|
||||||
#define _O2 32
|
#define _O2 32
|
||||||
|
#define _MAX_O 32
|
||||||
#define _HASH_LEN 32
|
#define _HASH_LEN 32
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +29,7 @@
|
|||||||
#define _V2_BYTE (_V2 / 2)
|
#define _V2_BYTE (_V2 / 2)
|
||||||
#define _O1_BYTE (_O1 / 2)
|
#define _O1_BYTE (_O1 / 2)
|
||||||
#define _O2_BYTE (_O2 / 2)
|
#define _O2_BYTE (_O2 / 2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O / 2)
|
||||||
#define _PUB_N_BYTE (_PUB_N / 2)
|
#define _PUB_N_BYTE (_PUB_N / 2)
|
||||||
#define _PUB_M_BYTE (_PUB_M / 2)
|
#define _PUB_M_BYTE (_PUB_M / 2)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWIACYCLICCOMPRESSED_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#define _V1 32
|
#define _V1 32
|
||||||
#define _O1 32
|
#define _O1 32
|
||||||
#define _O2 32
|
#define _O2 32
|
||||||
|
#define _MAX_O 32
|
||||||
#define _HASH_LEN 32
|
#define _HASH_LEN 32
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +29,7 @@
|
|||||||
#define _V2_BYTE (_V2 / 2)
|
#define _V2_BYTE (_V2 / 2)
|
||||||
#define _O1_BYTE (_O1 / 2)
|
#define _O1_BYTE (_O1 / 2)
|
||||||
#define _O2_BYTE (_O2 / 2)
|
#define _O2_BYTE (_O2 / 2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O / 2)
|
||||||
#define _PUB_N_BYTE (_PUB_N / 2)
|
#define _PUB_N_BYTE (_PUB_N / 2)
|
||||||
#define _PUB_M_BYTE (_PUB_M / 2)
|
#define _PUB_M_BYTE (_PUB_M / 2)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWIACYCLIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWIACYCLIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#define _V1 32
|
#define _V1 32
|
||||||
#define _O1 32
|
#define _O1 32
|
||||||
#define _O2 32
|
#define _O2 32
|
||||||
|
#define _MAX_O 32
|
||||||
#define _HASH_LEN 32
|
#define _HASH_LEN 32
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +29,7 @@
|
|||||||
#define _V2_BYTE (_V2 / 2)
|
#define _V2_BYTE (_V2 / 2)
|
||||||
#define _O1_BYTE (_O1 / 2)
|
#define _O1_BYTE (_O1 / 2)
|
||||||
#define _O2_BYTE (_O2 / 2)
|
#define _O2_BYTE (_O2 / 2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O / 2)
|
||||||
#define _PUB_N_BYTE (_PUB_N / 2)
|
#define _PUB_N_BYTE (_PUB_N / 2)
|
||||||
#define _PUB_M_BYTE (_PUB_M / 2)
|
#define _PUB_M_BYTE (_PUB_M / 2)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWVCCLASSIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWVCCLASSIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define _V1 92
|
#define _V1 92
|
||||||
#define _O1 48
|
#define _O1 48
|
||||||
#define _O2 48
|
#define _O2 48
|
||||||
|
#define _MAX_O 48
|
||||||
#define _HASH_LEN 64
|
#define _HASH_LEN 64
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +28,7 @@
|
|||||||
#define _V2_BYTE (_V2)
|
#define _V2_BYTE (_V2)
|
||||||
#define _O1_BYTE (_O1)
|
#define _O1_BYTE (_O1)
|
||||||
#define _O2_BYTE (_O2)
|
#define _O2_BYTE (_O2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O)
|
||||||
#define _PUB_N_BYTE (_PUB_N)
|
#define _PUB_N_BYTE (_PUB_N)
|
||||||
#define _PUB_M_BYTE (_PUB_M)
|
#define _PUB_M_BYTE (_PUB_M)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWVCCYCLICCOMPRESSED_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define _V1 92
|
#define _V1 92
|
||||||
#define _O1 48
|
#define _O1 48
|
||||||
#define _O2 48
|
#define _O2 48
|
||||||
|
#define _MAX_O 48
|
||||||
#define _HASH_LEN 64
|
#define _HASH_LEN 64
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +28,7 @@
|
|||||||
#define _V2_BYTE (_V2)
|
#define _V2_BYTE (_V2)
|
||||||
#define _O1_BYTE (_O1)
|
#define _O1_BYTE (_O1)
|
||||||
#define _O2_BYTE (_O2)
|
#define _O2_BYTE (_O2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O)
|
||||||
#define _PUB_N_BYTE (_PUB_N)
|
#define _PUB_N_BYTE (_PUB_N)
|
||||||
#define _PUB_M_BYTE (_PUB_M)
|
#define _PUB_M_BYTE (_PUB_M)
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MAX_ATTEMPT_FRMAT 128
|
#define MAX_ATTEMPT_FRMAT 128
|
||||||
#define _MAX_O ((_O1 > _O2) ? _O1 : _O2)
|
|
||||||
#define _MAX_O_BYTE ((_O1_BYTE > _O2_BYTE) ? _O1_BYTE : _O2_BYTE)
|
|
||||||
|
|
||||||
int PQCLEAN_RAINBOWVCCYCLIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
int PQCLEAN_RAINBOWVCCYCLIC_CLEAN_rainbow_sign(uint8_t *signature, const sk_t *sk, const uint8_t *_digest) {
|
||||||
uint8_t mat_l1[_O1 * _O1_BYTE];
|
uint8_t mat_l1[_O1 * _O1_BYTE];
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define _V1 92
|
#define _V1 92
|
||||||
#define _O1 48
|
#define _O1 48
|
||||||
#define _O2 48
|
#define _O2 48
|
||||||
|
#define _MAX_O 48
|
||||||
#define _HASH_LEN 64
|
#define _HASH_LEN 64
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +28,7 @@
|
|||||||
#define _V2_BYTE (_V2)
|
#define _V2_BYTE (_V2)
|
||||||
#define _O1_BYTE (_O1)
|
#define _O1_BYTE (_O1)
|
||||||
#define _O2_BYTE (_O2)
|
#define _O2_BYTE (_O2)
|
||||||
|
#define _MAX_O_BYTE (_MAX_O)
|
||||||
#define _PUB_N_BYTE (_PUB_N)
|
#define _PUB_N_BYTE (_PUB_N)
|
||||||
#define _PUB_M_BYTE (_PUB_M)
|
#define _PUB_M_BYTE (_PUB_M)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user