An IPv6 header is 40 bytes; a sensor reading may be 2 bytes, so the header drains battery on a low-power radio. 6LoWPAN is an adaptation layer between radio and IP that: compresses the header (removes predictable fields, shortens addresses with shared context), fragments/reassembles so IPv6 fits small frames, and shrinks 40 bytes to a few bytes. Result: tiny microcontrollers get routable IPv6 addresses.
OSPF floods link information and builds a full map, assuming stable links; noisy wireless links flap, so OSPF floods/recomputes endlessly (overhead, battery drain). RPL builds a DODAG - a tree rooted at a gateway where each node knows only its parent(s) and rank. Benefits: local repair (re-attach to another branch, no global recompute), low overhead (small local state), built for lossy links.
Framework: an MQTT client publishes to a local broker with fixed payload/rate/QoS; vary only the cipher (AES-256 vs ChaCha20-Poly1305); measure CPU cycles per byte/message, memory (RAM + code), latency (encrypt/decrypt and end-to-end), and energy (battery/Joules); repeat and report averages and variation. Comparison: AES is a block cipher (table lookups) and very fast with AES hardware, but slower and memory-hungry in pure software with timing risk; ChaCha20 is a stream cipher (add/rotate/xor) that is constant-time by design and fast/small in software. Likely result: AES wins where AES hardware exists; ChaCha20 wins on plain microcontrollers - always measure.