[riot-notifications] [RIOT-OS/RIOT] Initial implementation of IEEE 802.15.4 security (#15150)

fabian18 notifications at github.com
Tue Nov 3 19:16:27 CET 2020


@fabian18 commented on this pull request.



> +        _init_cbc_B0(&ccm, frame_counter, security_level, c_len, mac_size, src_address);
+        memset(tmp2, 0, sizeof(tmp2));
+        _cbc_next(ctx, tmp2, tmp1, (uint8_t *)&ccm, sizeof(ccm));
+        byteorder_htobebufs(tmp1, a_len);
+        off = _min(sizeof(tmp1) - sizeof(uint16_t), a_len);
+        memcpy(tmp1 + sizeof(uint16_t), a, off);
+        _cbc_next(ctx, tmp2, tmp1, tmp1, sizeof(uint16_t) + off);
+        for (;off < a_len;) {
+            off += _cbc_next(ctx, tmp2, tmp1, &a[off], a_len - off);
+        }
+        for (off = 0; off < c_len;) {
+            off += _cbc_next(ctx, tmp2, tmp1, &c[off], c_len - off);
+        }

Yes I could probably make it another function `_comp_mic()` or something like that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15150#discussion_r516865950
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201103/351b4c86/attachment.htm>


More information about the notifications mailing list