From 3943dde3f1532017155a9ff985e40979b38368c8 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Thu, 12 Dec 2019 13:51:46 +0100 Subject: [PATCH] Matthias' feedback --- crypto_sign/dilithium2/avx2/packing.c | 4 ++-- crypto_sign/dilithium2/clean/ntt.c | 4 ++-- crypto_sign/dilithium2/clean/packing.c | 4 ++-- crypto_sign/dilithium3/avx2/packing.c | 4 ++-- crypto_sign/dilithium3/clean/ntt.c | 4 ++-- crypto_sign/dilithium3/clean/packing.c | 4 ++-- crypto_sign/dilithium4/avx2/packing.c | 4 ++-- crypto_sign/dilithium4/clean/ntt.c | 4 ++-- crypto_sign/dilithium4/clean/packing.c | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/crypto_sign/dilithium2/avx2/packing.c b/crypto_sign/dilithium2/avx2/packing.c index 5a144ca1..d322ae88 100644 --- a/crypto_sign/dilithium2/avx2/packing.c +++ b/crypto_sign/dilithium2/avx2/packing.c @@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM2_AVX2_unpack_sk( * Arguments: - uint8_t sig[]: output byte array * - const polyvecl *z: pointer to vector z * - const polyveck *h: pointer to hint vector h -* - const poly *c: pointer to PQCLEAN_DILITHIUM2_AVX2_challenge polynomial +* - const poly *c: pointer to challenge polynomial **************************************************/ void PQCLEAN_DILITHIUM2_AVX2_pack_sig( uint8_t *sig, @@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM2_AVX2_pack_sig( * * Arguments: - polyvecl *z: pointer to output vector z * - polyveck *h: pointer to output hint vector h -* - poly *c: pointer to output PQCLEAN_DILITHIUM2_AVX2_challenge polynomial +* - poly *c: pointer to output challenge polynomial * - const uint8_t sig[]: byte array containing * bit-packed signature * diff --git a/crypto_sign/dilithium2/clean/ntt.c b/crypto_sign/dilithium2/clean/ntt.c index 7045df64..a684c3fd 100644 --- a/crypto_sign/dilithium2/clean/ntt.c +++ b/crypto_sign/dilithium2/clean/ntt.c @@ -87,7 +87,7 @@ static const uint32_t PQCLEAN_DILITHIUM2_CLEAN_zetas_inv[N] = { * * Arguments: - uint32_t p[N]: input/output coefficient array **************************************************/ -void PQCLEAN_DILITHIUM2_CLEAN_ntt(uint32_t *p) { +void PQCLEAN_DILITHIUM2_CLEAN_ntt(uint32_t p[N]) { size_t k, j; uint32_t zeta, t; @@ -114,7 +114,7 @@ void PQCLEAN_DILITHIUM2_CLEAN_ntt(uint32_t *p) { * * Arguments: - uint32_t p[N]: input/output coefficient array **************************************************/ -void PQCLEAN_DILITHIUM2_CLEAN_invntt_frominvmont(uint32_t *p) { +void PQCLEAN_DILITHIUM2_CLEAN_invntt_frominvmont(uint32_t p[N]) { size_t start, len, j, k; uint32_t t, zeta; const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q; diff --git a/crypto_sign/dilithium2/clean/packing.c b/crypto_sign/dilithium2/clean/packing.c index 0eadaee1..d86e9fe2 100644 --- a/crypto_sign/dilithium2/clean/packing.c +++ b/crypto_sign/dilithium2/clean/packing.c @@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM2_CLEAN_unpack_sk( * Arguments: - uint8_t sig[]: output byte array * - const polyvecl *z: pointer to vector z * - const polyveck *h: pointer to hint vector h -* - const poly *c: pointer to PQCLEAN_DILITHIUM2_CLEAN_challenge polynomial +* - const poly *c: pointer to challenge polynomial **************************************************/ void PQCLEAN_DILITHIUM2_CLEAN_pack_sig( uint8_t *sig, @@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM2_CLEAN_pack_sig( * * Arguments: - polyvecl *z: pointer to output vector z * - polyveck *h: pointer to output hint vector h -* - poly *c: pointer to output PQCLEAN_DILITHIUM2_CLEAN_challenge polynomial +* - poly *c: pointer to output challenge polynomial * - const uint8_t sig[]: byte array containing * bit-packed signature * diff --git a/crypto_sign/dilithium3/avx2/packing.c b/crypto_sign/dilithium3/avx2/packing.c index 9b9511ff..a65d8ff5 100644 --- a/crypto_sign/dilithium3/avx2/packing.c +++ b/crypto_sign/dilithium3/avx2/packing.c @@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM3_AVX2_unpack_sk( * Arguments: - uint8_t sig[]: output byte array * - const polyvecl *z: pointer to vector z * - const polyveck *h: pointer to hint vector h -* - const poly *c: pointer to PQCLEAN_DILITHIUM3_AVX2_challenge polynomial +* - const poly *c: pointer to challenge polynomial **************************************************/ void PQCLEAN_DILITHIUM3_AVX2_pack_sig( uint8_t *sig, @@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM3_AVX2_pack_sig( * * Arguments: - polyvecl *z: pointer to output vector z * - polyveck *h: pointer to output hint vector h -* - poly *c: pointer to output PQCLEAN_DILITHIUM3_AVX2_challenge polynomial +* - poly *c: pointer to output challenge polynomial * - const uint8_t sig[]: byte array containing * bit-packed signature * diff --git a/crypto_sign/dilithium3/clean/ntt.c b/crypto_sign/dilithium3/clean/ntt.c index 7a0b1001..9856d734 100644 --- a/crypto_sign/dilithium3/clean/ntt.c +++ b/crypto_sign/dilithium3/clean/ntt.c @@ -87,7 +87,7 @@ static const uint32_t PQCLEAN_DILITHIUM3_CLEAN_zetas_inv[N] = { * * Arguments: - uint32_t p[N]: input/output coefficient array **************************************************/ -void PQCLEAN_DILITHIUM3_CLEAN_ntt(uint32_t *p) { +void PQCLEAN_DILITHIUM3_CLEAN_ntt(uint32_t p[N]) { size_t k, j; uint32_t zeta, t; @@ -114,7 +114,7 @@ void PQCLEAN_DILITHIUM3_CLEAN_ntt(uint32_t *p) { * * Arguments: - uint32_t p[N]: input/output coefficient array **************************************************/ -void PQCLEAN_DILITHIUM3_CLEAN_invntt_frominvmont(uint32_t *p) { +void PQCLEAN_DILITHIUM3_CLEAN_invntt_frominvmont(uint32_t p[N]) { size_t start, len, j, k; uint32_t t, zeta; const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q; diff --git a/crypto_sign/dilithium3/clean/packing.c b/crypto_sign/dilithium3/clean/packing.c index 55846fa4..8e3ab8c5 100644 --- a/crypto_sign/dilithium3/clean/packing.c +++ b/crypto_sign/dilithium3/clean/packing.c @@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM3_CLEAN_unpack_sk( * Arguments: - uint8_t sig[]: output byte array * - const polyvecl *z: pointer to vector z * - const polyveck *h: pointer to hint vector h -* - const poly *c: pointer to PQCLEAN_DILITHIUM3_CLEAN_challenge polynomial +* - const poly *c: pointer to challenge polynomial **************************************************/ void PQCLEAN_DILITHIUM3_CLEAN_pack_sig( uint8_t *sig, @@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM3_CLEAN_pack_sig( * * Arguments: - polyvecl *z: pointer to output vector z * - polyveck *h: pointer to output hint vector h -* - poly *c: pointer to output PQCLEAN_DILITHIUM3_CLEAN_challenge polynomial +* - poly *c: pointer to output challenge polynomial * - const uint8_t sig[]: byte array containing * bit-packed signature * diff --git a/crypto_sign/dilithium4/avx2/packing.c b/crypto_sign/dilithium4/avx2/packing.c index 64ef76a3..e9f6ca32 100644 --- a/crypto_sign/dilithium4/avx2/packing.c +++ b/crypto_sign/dilithium4/avx2/packing.c @@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM4_AVX2_unpack_sk( * Arguments: - uint8_t sig[]: output byte array * - const polyvecl *z: pointer to vector z * - const polyveck *h: pointer to hint vector h -* - const poly *c: pointer to PQCLEAN_DILITHIUM4_AVX2_challenge polynomial +* - const poly *c: pointer to challenge polynomial **************************************************/ void PQCLEAN_DILITHIUM4_AVX2_pack_sig( uint8_t *sig, @@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM4_AVX2_pack_sig( * * Arguments: - polyvecl *z: pointer to output vector z * - polyveck *h: pointer to output hint vector h -* - poly *c: pointer to output PQCLEAN_DILITHIUM4_AVX2_challenge polynomial +* - poly *c: pointer to output challenge polynomial * - const uint8_t sig[]: byte array containing * bit-packed signature * diff --git a/crypto_sign/dilithium4/clean/ntt.c b/crypto_sign/dilithium4/clean/ntt.c index 0a543448..f150818e 100644 --- a/crypto_sign/dilithium4/clean/ntt.c +++ b/crypto_sign/dilithium4/clean/ntt.c @@ -87,7 +87,7 @@ static const uint32_t PQCLEAN_DILITHIUM4_CLEAN_zetas_inv[N] = { * * Arguments: - uint32_t p[N]: input/output coefficient array **************************************************/ -void PQCLEAN_DILITHIUM4_CLEAN_ntt(uint32_t *p) { +void PQCLEAN_DILITHIUM4_CLEAN_ntt(uint32_t p[N]) { size_t k, j; uint32_t zeta, t; @@ -114,7 +114,7 @@ void PQCLEAN_DILITHIUM4_CLEAN_ntt(uint32_t *p) { * * Arguments: - uint32_t p[N]: input/output coefficient array **************************************************/ -void PQCLEAN_DILITHIUM4_CLEAN_invntt_frominvmont(uint32_t *p) { +void PQCLEAN_DILITHIUM4_CLEAN_invntt_frominvmont(uint32_t p[N]) { size_t start, len, j, k; uint32_t t, zeta; const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q; diff --git a/crypto_sign/dilithium4/clean/packing.c b/crypto_sign/dilithium4/clean/packing.c index af277897..64826a42 100644 --- a/crypto_sign/dilithium4/clean/packing.c +++ b/crypto_sign/dilithium4/clean/packing.c @@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM4_CLEAN_unpack_sk( * Arguments: - uint8_t sig[]: output byte array * - const polyvecl *z: pointer to vector z * - const polyveck *h: pointer to hint vector h -* - const poly *c: pointer to PQCLEAN_DILITHIUM4_CLEAN_challenge polynomial +* - const poly *c: pointer to challenge polynomial **************************************************/ void PQCLEAN_DILITHIUM4_CLEAN_pack_sig( uint8_t *sig, @@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM4_CLEAN_pack_sig( * * Arguments: - polyvecl *z: pointer to output vector z * - polyveck *h: pointer to output hint vector h -* - poly *c: pointer to output PQCLEAN_DILITHIUM4_CLEAN_challenge polynomial +* - poly *c: pointer to output challenge polynomial * - const uint8_t sig[]: byte array containing * bit-packed signature *