1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-22 23:48:58 +00:00

Matthias' feedback

This commit is contained in:
Thom Wiggers 2019-12-12 13:51:46 +01:00 committed by Kris Kwiatkowski
parent 9c35647461
commit 2b9759912d
9 changed files with 18 additions and 18 deletions

View File

@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM2_AVX2_unpack_sk(
* Arguments: - uint8_t sig[]: output byte array * Arguments: - uint8_t sig[]: output byte array
* - const polyvecl *z: pointer to vector z * - const polyvecl *z: pointer to vector z
* - const polyveck *h: pointer to hint vector h * - 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( void PQCLEAN_DILITHIUM2_AVX2_pack_sig(
uint8_t *sig, uint8_t *sig,
@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM2_AVX2_pack_sig(
* *
* Arguments: - polyvecl *z: pointer to output vector z * Arguments: - polyvecl *z: pointer to output vector z
* - polyveck *h: pointer to output hint vector h * - 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 * - const uint8_t sig[]: byte array containing
* bit-packed signature * bit-packed signature
* *

View File

@ -87,7 +87,7 @@ static const uint32_t PQCLEAN_DILITHIUM2_CLEAN_zetas_inv[N] = {
* *
* Arguments: - uint32_t p[N]: input/output coefficient array * 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; size_t k, j;
uint32_t zeta, t; 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 * 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; size_t start, len, j, k;
uint32_t t, zeta; uint32_t t, zeta;
const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q; const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q;

View File

@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM2_CLEAN_unpack_sk(
* Arguments: - uint8_t sig[]: output byte array * Arguments: - uint8_t sig[]: output byte array
* - const polyvecl *z: pointer to vector z * - const polyvecl *z: pointer to vector z
* - const polyveck *h: pointer to hint vector h * - 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( void PQCLEAN_DILITHIUM2_CLEAN_pack_sig(
uint8_t *sig, uint8_t *sig,
@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM2_CLEAN_pack_sig(
* *
* Arguments: - polyvecl *z: pointer to output vector z * Arguments: - polyvecl *z: pointer to output vector z
* - polyveck *h: pointer to output hint vector h * - 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 * - const uint8_t sig[]: byte array containing
* bit-packed signature * bit-packed signature
* *

View File

@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM3_AVX2_unpack_sk(
* Arguments: - uint8_t sig[]: output byte array * Arguments: - uint8_t sig[]: output byte array
* - const polyvecl *z: pointer to vector z * - const polyvecl *z: pointer to vector z
* - const polyveck *h: pointer to hint vector h * - 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( void PQCLEAN_DILITHIUM3_AVX2_pack_sig(
uint8_t *sig, uint8_t *sig,
@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM3_AVX2_pack_sig(
* *
* Arguments: - polyvecl *z: pointer to output vector z * Arguments: - polyvecl *z: pointer to output vector z
* - polyveck *h: pointer to output hint vector h * - 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 * - const uint8_t sig[]: byte array containing
* bit-packed signature * bit-packed signature
* *

View File

@ -87,7 +87,7 @@ static const uint32_t PQCLEAN_DILITHIUM3_CLEAN_zetas_inv[N] = {
* *
* Arguments: - uint32_t p[N]: input/output coefficient array * 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; size_t k, j;
uint32_t zeta, t; 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 * 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; size_t start, len, j, k;
uint32_t t, zeta; uint32_t t, zeta;
const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q; const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q;

View File

@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM3_CLEAN_unpack_sk(
* Arguments: - uint8_t sig[]: output byte array * Arguments: - uint8_t sig[]: output byte array
* - const polyvecl *z: pointer to vector z * - const polyvecl *z: pointer to vector z
* - const polyveck *h: pointer to hint vector h * - 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( void PQCLEAN_DILITHIUM3_CLEAN_pack_sig(
uint8_t *sig, uint8_t *sig,
@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM3_CLEAN_pack_sig(
* *
* Arguments: - polyvecl *z: pointer to output vector z * Arguments: - polyvecl *z: pointer to output vector z
* - polyveck *h: pointer to output hint vector h * - 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 * - const uint8_t sig[]: byte array containing
* bit-packed signature * bit-packed signature
* *

View File

@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM4_AVX2_unpack_sk(
* Arguments: - uint8_t sig[]: output byte array * Arguments: - uint8_t sig[]: output byte array
* - const polyvecl *z: pointer to vector z * - const polyvecl *z: pointer to vector z
* - const polyveck *h: pointer to hint vector h * - 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( void PQCLEAN_DILITHIUM4_AVX2_pack_sig(
uint8_t *sig, uint8_t *sig,
@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM4_AVX2_pack_sig(
* *
* Arguments: - polyvecl *z: pointer to output vector z * Arguments: - polyvecl *z: pointer to output vector z
* - polyveck *h: pointer to output hint vector h * - 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 * - const uint8_t sig[]: byte array containing
* bit-packed signature * bit-packed signature
* *

View File

@ -87,7 +87,7 @@ static const uint32_t PQCLEAN_DILITHIUM4_CLEAN_zetas_inv[N] = {
* *
* Arguments: - uint32_t p[N]: input/output coefficient array * 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; size_t k, j;
uint32_t zeta, t; 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 * 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; size_t start, len, j, k;
uint32_t t, zeta; uint32_t t, zeta;
const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q; const uint32_t f = (((uint64_t)MONT * MONT % Q) * (Q - 1) % Q) * ((Q - 1) >> 8) % Q;

View File

@ -159,7 +159,7 @@ void PQCLEAN_DILITHIUM4_CLEAN_unpack_sk(
* Arguments: - uint8_t sig[]: output byte array * Arguments: - uint8_t sig[]: output byte array
* - const polyvecl *z: pointer to vector z * - const polyvecl *z: pointer to vector z
* - const polyveck *h: pointer to hint vector h * - 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( void PQCLEAN_DILITHIUM4_CLEAN_pack_sig(
uint8_t *sig, uint8_t *sig,
@ -218,7 +218,7 @@ void PQCLEAN_DILITHIUM4_CLEAN_pack_sig(
* *
* Arguments: - polyvecl *z: pointer to output vector z * Arguments: - polyvecl *z: pointer to output vector z
* - polyveck *h: pointer to output hint vector h * - 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 * - const uint8_t sig[]: byte array containing
* bit-packed signature * bit-packed signature
* *