瀏覽代碼

Apply astyle

tags/v0.0.1
Douglas Stebila 5 年之前
父節點
當前提交
6ca367e2e6
共有 6 個檔案被更改,包括 15 行新增15 行删除
  1. +4
    -4
      crypto_kem/frodokem1344aes/clean/matrix_aes.c
  2. +1
    -1
      crypto_kem/frodokem1344aes/clean/util.c
  3. +4
    -4
      crypto_kem/frodokem640aes/clean/matrix_aes.c
  4. +1
    -1
      crypto_kem/frodokem640aes/clean/util.c
  5. +4
    -4
      crypto_kem/frodokem976aes/clean/matrix_aes.c
  6. +1
    -1
      crypto_kem/frodokem976aes/clean/util.c

+ 4
- 4
crypto_kem/frodokem1344aes/clean/matrix_aes.c 查看文件

@@ -24,8 +24,8 @@ int PQCLEAN_FRODOKEM1344AES_CLEAN_mul_add_as_plus_e(uint16_t *out, const uint16_
aes128_keyexp(&ctx128, seed_A);
for (i = 0; i < PARAMS_N; i++) {
for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) {
A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i*PARAMS_N + j + 1] = (int16_t) j;
A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i * PARAMS_N + j + 1] = (int16_t) j;
}
}
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
@@ -64,8 +64,8 @@ int PQCLEAN_FRODOKEM1344AES_CLEAN_mul_add_sa_plus_e(uint16_t *out, const uint16_
aes128_keyexp(&ctx128, seed_A);
for (i = 0; i < PARAMS_N; i++) {
for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) {
A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i*PARAMS_N + j + 1] = (int16_t) j;
A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i * PARAMS_N + j + 1] = (int16_t) j;
}
}
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {


+ 1
- 1
crypto_kem/frodokem1344aes/clean/util.c 查看文件

@@ -13,7 +13,7 @@
#define min(x, y) (((x) < (y)) ? (x) : (y))

uint16_t PQCLEAN_FRODOKEM1344AES_CLEAN_LE_TO_UINT16(const uint16_t n) {
return (((uint8_t *) &(n))[0] | (((uint8_t *) &(n))[1] << 8));
return (((uint8_t *) &n)[0] | (((uint8_t *) &n)[1] << 8));
}

uint16_t PQCLEAN_FRODOKEM1344AES_CLEAN_UINT16_TO_LE(const uint16_t n) {


+ 4
- 4
crypto_kem/frodokem640aes/clean/matrix_aes.c 查看文件

@@ -24,8 +24,8 @@ int PQCLEAN_FRODOKEM640AES_CLEAN_mul_add_as_plus_e(uint16_t *out, const uint16_t
aes128_keyexp(&ctx128, seed_A);
for (i = 0; i < PARAMS_N; i++) {
for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) {
A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i*PARAMS_N + j + 1] = (int16_t) j;
A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i * PARAMS_N + j + 1] = (int16_t) j;
}
}
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
@@ -64,8 +64,8 @@ int PQCLEAN_FRODOKEM640AES_CLEAN_mul_add_sa_plus_e(uint16_t *out, const uint16_t
aes128_keyexp(&ctx128, seed_A);
for (i = 0; i < PARAMS_N; i++) {
for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) {
A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i*PARAMS_N + j + 1] = (int16_t) j;
A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i * PARAMS_N + j + 1] = (int16_t) j;
}
}
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {


+ 1
- 1
crypto_kem/frodokem640aes/clean/util.c 查看文件

@@ -13,7 +13,7 @@
#define min(x, y) (((x) < (y)) ? (x) : (y))

uint16_t PQCLEAN_FRODOKEM640AES_CLEAN_LE_TO_UINT16(const uint16_t n) {
return (((uint8_t *) &(n))[0] | (((uint8_t *) &(n))[1] << 8));
return (((uint8_t *) &n)[0] | (((uint8_t *) &n)[1] << 8));
}

uint16_t PQCLEAN_FRODOKEM640AES_CLEAN_UINT16_TO_LE(const uint16_t n) {


+ 4
- 4
crypto_kem/frodokem976aes/clean/matrix_aes.c 查看文件

@@ -24,8 +24,8 @@ int PQCLEAN_FRODOKEM976AES_CLEAN_mul_add_as_plus_e(uint16_t *out, const uint16_t
aes128_keyexp(&ctx128, seed_A);
for (i = 0; i < PARAMS_N; i++) {
for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) {
A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i*PARAMS_N + j + 1] = (int16_t) j;
A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i * PARAMS_N + j + 1] = (int16_t) j;
}
}
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {
@@ -64,8 +64,8 @@ int PQCLEAN_FRODOKEM976AES_CLEAN_mul_add_sa_plus_e(uint16_t *out, const uint16_t
aes128_keyexp(&ctx128, seed_A);
for (i = 0; i < PARAMS_N; i++) {
for (j = 0; j < PARAMS_N; j += PARAMS_STRIPE_STEP) {
A[i*PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i*PARAMS_N + j + 1] = (int16_t) j;
A[i * PARAMS_N + j] = (int16_t) i; // Loading values in the little-endian order
A[i * PARAMS_N + j + 1] = (int16_t) j;
}
}
for (i = 0; i < PARAMS_N * PARAMS_N; i++) {


+ 1
- 1
crypto_kem/frodokem976aes/clean/util.c 查看文件

@@ -13,7 +13,7 @@
#define min(x, y) (((x) < (y)) ? (x) : (y))

uint16_t PQCLEAN_FRODOKEM976AES_CLEAN_LE_TO_UINT16(const uint16_t n) {
return (((uint8_t *) &(n))[0] | (((uint8_t *) &(n))[1] << 8));
return (((uint8_t *) &n)[0] | (((uint8_t *) &n)[1] << 8));
}

uint16_t PQCLEAN_FRODOKEM976AES_CLEAN_UINT16_TO_LE(const uint16_t n) {


Loading…
取消
儲存