From b13d1bc526925e20af93ef7b6ca07143f913f903 Mon Sep 17 00:00:00 2001 From: kkrentz Date: Tue, 24 Apr 2018 07:34:43 -0700 Subject: [PATCH 1/3] AES-128: Removed unused function --- os/lib/aes-128.c | 10 ---------- os/lib/aes-128.h | 5 ----- 2 files changed, 15 deletions(-) diff --git a/os/lib/aes-128.c b/os/lib/aes-128.c index 98e115c3f..3b0082e7c 100644 --- a/os/lib/aes-128.c +++ b/os/lib/aes-128.c @@ -166,16 +166,6 @@ encrypt(uint8_t *state) } } /*---------------------------------------------------------------------------*/ -void -aes_128_set_padded_key(uint8_t *key, uint8_t key_len) -{ - uint8_t block[AES_128_BLOCK_SIZE]; - - memset(block, 0, AES_128_BLOCK_SIZE); - memcpy(block, key, key_len); - AES_128.set_key(block); -} -/*---------------------------------------------------------------------------*/ const struct aes_128_driver aes_128_driver = { set_key, encrypt diff --git a/os/lib/aes-128.h b/os/lib/aes-128.h index 458b93915..e003c2b25 100644 --- a/os/lib/aes-128.h +++ b/os/lib/aes-128.h @@ -67,11 +67,6 @@ struct aes_128_driver { void (* encrypt)(uint8_t *plaintext_and_result); }; -/** - * \brief Pads the key with zeroes before calling AES_128.set_key - */ -void aes_128_set_padded_key(uint8_t *key, uint8_t key_len); - extern const struct aes_128_driver AES_128; #endif /* AES_128_H_ */ From 1c54e8d7d762c6fa67ff7ebcc1a9f51464dc8dbc Mon Sep 17 00:00:00 2001 From: kkrentz Date: Tue, 24 Apr 2018 09:02:08 -0700 Subject: [PATCH 2/3] packetbuf: Removed attribute KEY_SOURCE_BYTES_0_1 --- os/net/mac/framer/framer-802154.c | 2 -- os/net/packetbuf.h | 1 - 2 files changed, 3 deletions(-) diff --git a/os/net/mac/framer/framer-802154.c b/os/net/mac/framer/framer-802154.c index 7122c5ccd..b4c24da19 100644 --- a/os/net/mac/framer/framer-802154.c +++ b/os/net/mac/framer/framer-802154.c @@ -171,7 +171,6 @@ framer_802154_setup_params(packetbuf_attr_t (*get_attr)(uint8_t type), #if LLSEC802154_USES_EXPLICIT_KEYS params->aux_hdr.security_control.key_id_mode = get_attr(PACKETBUF_ATTR_KEY_ID_MODE); params->aux_hdr.key_index = get_attr(PACKETBUF_ATTR_KEY_INDEX); - params->aux_hdr.key_source.u16[0] = get_attr(PACKETBUF_ATTR_KEY_SOURCE_BYTES_0_1); #endif /* LLSEC802154_USES_EXPLICIT_KEYS */ #else params->fcf.security_enabled = 0; @@ -273,7 +272,6 @@ parse(void) #if LLSEC802154_USES_EXPLICIT_KEYS packetbuf_set_attr(PACKETBUF_ATTR_KEY_ID_MODE, frame.aux_hdr.security_control.key_id_mode); packetbuf_set_attr(PACKETBUF_ATTR_KEY_INDEX, frame.aux_hdr.key_index); - packetbuf_set_attr(PACKETBUF_ATTR_KEY_SOURCE_BYTES_0_1, frame.aux_hdr.key_source.u16[0]); #endif /* LLSEC802154_USES_EXPLICIT_KEYS */ } #endif /* LLSEC802154_USES_AUX_HEADER */ diff --git a/os/net/packetbuf.h b/os/net/packetbuf.h index 39ce4a467..20e071474 100644 --- a/os/net/packetbuf.h +++ b/os/net/packetbuf.h @@ -236,7 +236,6 @@ enum { #if LLSEC802154_USES_EXPLICIT_KEYS PACKETBUF_ATTR_KEY_ID_MODE, PACKETBUF_ATTR_KEY_INDEX, - PACKETBUF_ATTR_KEY_SOURCE_BYTES_0_1, #endif /* LLSEC802154_USES_EXPLICIT_KEYS */ /* Scope 2 attributes: used between end-to-end nodes. */ From 83b028af289ccddbd7d60078887559639aa058fb Mon Sep 17 00:00:00 2001 From: kkrentz Date: Sat, 12 May 2018 03:59:20 -0700 Subject: [PATCH 3/3] linkaddr: Removed linkaddr_extended_t --- os/net/linkaddr.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/os/net/linkaddr.h b/os/net/linkaddr.h index 6f7380218..7926550b1 100644 --- a/os/net/linkaddr.h +++ b/os/net/linkaddr.h @@ -70,11 +70,6 @@ typedef union { #endif /* LINKADDR_SIZE == 2 */ } linkaddr_t; -typedef union { - uint8_t u8[8]; - uint16_t u16[4]; -} linkaddr_extended_t; - /** * \brief Copy a link-layer address * \param dest The destination