|
|
@ -93,9 +93,6 @@ static int transop_encode_speck(n2n_trans_op_t * arg, |
|
|
|
/* Generate and encode the IV. */ |
|
|
|
set_speck_iv(priv, enc_ivec); |
|
|
|
encode_buf(outbuf, &idx, &enc_ivec, N2N_SPECK_IVEC_SIZE); |
|
|
|
traceEvent(TRACE_DEBUG, "encode_speck iv=%016llx:%016llx", |
|
|
|
htobe64(*(uint64_t*)&enc_ivec[0]), |
|
|
|
htobe64(*(uint64_t*)&enc_ivec[8]) ); |
|
|
|
|
|
|
|
/* Encrypt the payload and write the ciphertext after the iv. */ |
|
|
|
/* len is set to the length of the cipher plain text to be encrpyted
|
|
|
@ -149,9 +146,6 @@ static int transop_decode_speck(n2n_trans_op_t * arg, |
|
|
|
|
|
|
|
/* Get the IV */ |
|
|
|
decode_buf((uint8_t *)&dec_ivec, N2N_SPECK_IVEC_SIZE, inbuf, &rem, &idx); |
|
|
|
traceEvent(TRACE_DEBUG, "decode_speck iv=%016llx:%016llx", |
|
|
|
htobe64(*(uint64_t*)&dec_ivec[0]), |
|
|
|
htobe64(*(uint64_t*)&dec_ivec[8]) ); |
|
|
|
|
|
|
|
speck_ctr (outbuf, inbuf + TRANSOP_SPECK_PREAMBLE_SIZE, len, dec_ivec, |
|
|
|
#if defined (SPECK_CTX_BYVAL) |
|
|
|