summaryrefslogtreecommitdiff
path: root/ot_udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_udp.c')
-rw-r--r--ot_udp.c9
1 files changed, 6 insertions, 3 deletions
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};
26static ot_time g_hour_of_the_key; 26static ot_time g_hour_of_the_key;
27 27
28static void udp_generate_rijndael_round_key() { 28static void udp_generate_rijndael_round_key() {
29 uint8_t key[16]; 29 uint32_t key[16];
30 key[0] = random(); key[1] = random(); key[2] = random(); key[3] = random(); 30 key[0] = random();
31 rijndaelKeySetupEnc128( g_rijndael_round_key, key ); 31 key[1] = random();
32 key[2] = random();
33 key[3] = random();
34 rijndaelKeySetupEnc128( g_rijndael_round_key, (uint8_t*)key );
32 35
33 g_key_of_the_hour[0] = random(); 36 g_key_of_the_hour[0] = random();
34 g_hour_of_the_key = g_now_minutes; 37 g_hour_of_the_key = g_now_minutes;