Browse Source

HQC: remove bitmask macro

kyber
John M. Schanck 4 years ago
committed by Kris Kwiatkowski
parent
commit
1113fdce69
11 changed files with 15 additions and 19 deletions
  1. +2
    -2
      crypto_kem/hqc-rmrs-128/META.yml
  2. +1
    -2
      crypto_kem/hqc-rmrs-128/avx2/parameters.h
  3. +1
    -1
      crypto_kem/hqc-rmrs-128/avx2/vector.c
  4. +1
    -2
      crypto_kem/hqc-rmrs-128/clean/parameters.h
  5. +2
    -2
      crypto_kem/hqc-rmrs-192/META.yml
  6. +1
    -2
      crypto_kem/hqc-rmrs-192/avx2/parameters.h
  7. +1
    -2
      crypto_kem/hqc-rmrs-192/clean/parameters.h
  8. +2
    -2
      crypto_kem/hqc-rmrs-256/META.yml
  9. +1
    -2
      crypto_kem/hqc-rmrs-256/avx2/parameters.h
  10. +1
    -2
      crypto_kem/hqc-rmrs-256/clean/parameters.h
  11. +2
    -0
      test/duplicate_consistency/hqc-rmrs-128_avx2.yml

+ 2
- 2
crypto_kem/hqc-rmrs-128/META.yml View File

@@ -22,9 +22,9 @@ principal-submitters:
- Loïc Bidoux
implementations:
- name: clean
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/196a2f2f/hqc
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/4924a647/hqc
- name: avx2
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/196a2f2f/hqc
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/4924a647/hqc
supported_platforms:
- architecture: x86_64
operating_systems:


+ 1
- 2
crypto_kem/hqc-rmrs-128/avx2/parameters.h View File

@@ -103,8 +103,7 @@
#define PARAM_FFT 5
#define RS_POLY_COEFS 89,69,153,116,176,117,111,75,73,233,242,233,65,210,21,139,103,173,67,118,105,210,174,110,74,69,228,82,255,181,1

#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1)
#define RED_MASK BITMASK(PARAM_N, 64)
#define RED_MASK 0x1f
#define SHA512_BYTES 64
#define SEED_BYTES 40
#define SEEDEXPANDER_MAX_LENGTH 4294967295


+ 1
- 1
crypto_kem/hqc-rmrs-128/avx2/vector.c View File

@@ -111,7 +111,7 @@ void PQCLEAN_HQCRMRS128_AVX2_vect_set_random(AES_XOF_struct *ctx, uint64_t *v) {
seedexpander(ctx, rand_bytes, VEC_N_SIZE_BYTES);

PQCLEAN_HQCRMRS128_AVX2_load8_arr(v, VEC_N_SIZE_64, rand_bytes, VEC_N_SIZE_BYTES);
v[VEC_N_SIZE_64 - 1] &= BITMASK(PARAM_N, 64);
v[VEC_N_SIZE_64 - 1] &= RED_MASK;
}




+ 1
- 2
crypto_kem/hqc-rmrs-128/clean/parameters.h View File

@@ -90,8 +90,7 @@
#define PARAM_FFT 5
#define RS_POLY_COEFS 89,69,153,116,176,117,111,75,73,233,242,233,65,210,21,139,103,173,67,118,105,210,174,110,74,69,228,82,255,181,1

#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1)
#define RED_MASK BITMASK(PARAM_N, 64)
#define RED_MASK 0x1f
#define SHA512_BYTES 64
#define SEED_BYTES 40
#define SEEDEXPANDER_MAX_LENGTH 4294967295


+ 2
- 2
crypto_kem/hqc-rmrs-192/META.yml View File

@@ -22,9 +22,9 @@ principal-submitters:
- Loïc Bidoux
implementations:
- name: clean
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/196a2f2f/hqc
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/4924a647/hqc
- name: avx2
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/196a2f2f/hqc
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/4924a647/hqc
supported_platforms:
- architecture: x86_64
operating_systems:


+ 1
- 2
crypto_kem/hqc-rmrs-192/avx2/parameters.h View File

@@ -101,8 +101,7 @@
#define PARAM_FFT 5
#define RS_POLY_COEFS 45,216,239,24,253,104,27,40,107,50,163,210,227,134,224,158,119,13,158,1,238,164,82,43,15,232,246,142,50,189,29,232,1

#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1)
#define RED_MASK BITMASK(PARAM_N, 64)
#define RED_MASK 0x7ff
#define SHA512_BYTES 64
#define SEED_BYTES 40
#define SEEDEXPANDER_MAX_LENGTH 4294967295


+ 1
- 2
crypto_kem/hqc-rmrs-192/clean/parameters.h View File

@@ -90,8 +90,7 @@
#define PARAM_FFT 5
#define RS_POLY_COEFS 45,216,239,24,253,104,27,40,107,50,163,210,227,134,224,158,119,13,158,1,238,164,82,43,15,232,246,142,50,189,29,232,1

#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1)
#define RED_MASK BITMASK(PARAM_N, 64)
#define RED_MASK 0x7ff
#define SHA512_BYTES 64
#define SEED_BYTES 40
#define SEEDEXPANDER_MAX_LENGTH 4294967295


+ 2
- 2
crypto_kem/hqc-rmrs-256/META.yml View File

@@ -22,9 +22,9 @@ principal-submitters:
- Loïc Bidoux
implementations:
- name: clean
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/196a2f2f/hqc
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/4924a647/hqc
- name: avx2
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/196a2f2f/hqc
version: hqc-submission_2020-10-01 via https://github.com/jschanck/package-pqclean/tree/4924a647/hqc
supported_platforms:
- architecture: x86_64
operating_systems:


+ 1
- 2
crypto_kem/hqc-rmrs-256/avx2/parameters.h View File

@@ -101,8 +101,7 @@
#define PARAM_FFT 5
#define RS_POLY_COEFS 49,167,49,39,200,121,124,91,240,63,148,71,150,123,87,101,32,215,159,71,201,115,97,210,186,183,141,217,123,12,31,243,180,219,152,239,99,141,4,246,191,144,8,232,47,27,141,178,130,64,124,47,39,188,216,48,199,187,1

#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1)
#define RED_MASK BITMASK(PARAM_N, 64)
#define RED_MASK 0x1fffffffff
#define SHA512_BYTES 64
#define SEED_BYTES 40
#define SEEDEXPANDER_MAX_LENGTH 4294967295


+ 1
- 2
crypto_kem/hqc-rmrs-256/clean/parameters.h View File

@@ -90,8 +90,7 @@
#define PARAM_FFT 5
#define RS_POLY_COEFS 49,167,49,39,200,121,124,91,240,63,148,71,150,123,87,101,32,215,159,71,201,115,97,210,186,183,141,217,123,12,31,243,180,219,152,239,99,141,4,246,191,144,8,232,47,27,141,178,130,64,124,47,39,188,216,48,199,187,1

#define BITMASK(a, size) ((1UL << ((a) % (size))) - 1)
#define RED_MASK BITMASK(PARAM_N, 64)
#define RED_MASK 0x1fffffffff
#define SHA512_BYTES 64
#define SEED_BYTES 40
#define SEEDEXPANDER_MAX_LENGTH 4294967295


+ 2
- 0
test/duplicate_consistency/hqc-rmrs-128_avx2.yml View File

@@ -37,6 +37,7 @@ consistency_checks:
- kem.c
- parsing.c
- reed_muller.c
- vector.c
- source:
scheme: hqc-rmrs-256
implementation: clean
@@ -65,3 +66,4 @@ consistency_checks:
- kem.c
- parsing.c
- reed_muller.c
- vector.c

Loading…
Cancel
Save