Browse Source

CentOS6 fixes

pull/262/head
lucaderi 4 years ago
parent
commit
cd62591ade
  1. 2
      Makefile.in
  2. 2
      tools/Makefile.in
  3. 4
      transform_speck.c

2
Makefile.in

@ -7,7 +7,7 @@ GIT_COMMITS=@GIT_COMMITS@
CC?=gcc
DEBUG?=-g3
OPTIMIZATION?=-O3 -march=native
OPTIMIZATION?=-O3 #-march=native
WARN?=-Wall
#Ultrasparc64 users experiencing SIGBUS should try the following gcc options

2
tools/Makefile.in

@ -1,6 +1,6 @@
CC?=gcc
DEBUG?=-g3
OPTIMIZATION?=-O2 -march=native
OPTIMIZATION?=-O2 #-march=native
WARN?=-Wall
INSTALL=install

4
transform_speck.c

@ -54,7 +54,9 @@ static int transop_deinit_speck(n2n_trans_op_t *arg) {
static void set_speck_iv(transop_speck_t *priv, n2n_speck_ivec_t ivec) {
// keep in mind the following condition: N2N_SPECK_IVEC_SIZE % sizeof(rand_value) == 0 !
uint32_t rand_value;
for (uint8_t i = 0; i < N2N_SPECK_IVEC_SIZE; i += sizeof(rand_value)) {
uint8_t i;
for (i = 0; i < N2N_SPECK_IVEC_SIZE; i += sizeof(rand_value)) {
rand_value = rand(); // CONCERN: rand() is not considered cryptographicly secure, REPLACE later
memcpy(ivec + i, &rand_value, sizeof(rand_value));
}

Loading…
Cancel
Save