From 9816750420eb6ab2527cd8abd31c2b1a13f74437 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 7 Oct 2014 00:01:30 +0200 Subject: Initialise all values of aes key --- ot_udp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ot_udp.c') diff --git a/ot_udp.c b/ot_udp.c index bd84ebb..1d495eb 100644 --- a/ot_udp.c +++ b/ot_udp.c @@ -26,9 +26,12 @@ static uint32_t g_key_of_the_hour[2] = {0}; static ot_time g_hour_of_the_key; static void udp_generate_rijndael_round_key() { - uint8_t key[16]; - key[0] = random(); key[1] = random(); key[2] = random(); key[3] = random(); - rijndaelKeySetupEnc128( g_rijndael_round_key, key ); + uint32_t key[16]; + key[0] = random(); + key[1] = random(); + key[2] = random(); + key[3] = random(); + rijndaelKeySetupEnc128( g_rijndael_round_key, (uint8_t*)key ); g_key_of_the_hour[0] = random(); g_hour_of_the_key = g_now_minutes; -- cgit v1.2.3