openwsn-berkeley / lakers

EDHOC implemented in Rust, optimized for microcontrollers, with bindings for C and Python.
https://crates.io/crates/lakers
BSD 3-Clause "New" or "Revised" License
12 stars 10 forks source link

Core functions for the lake-authz draft #110

Closed geonnave closed 8 months ago

geonnave commented 9 months ago

This PR will implement the core functions for EAD message preparation and processing with focus on U and V:

Draft link: https://www.ietf.org/archive/id/draft-selander-lake-authz-03.html

Architecture:

U                           V                                       W
|                           |                                       |
|      EDHOC message_1      |                                       |
+-------------------------->|                                       |
|  (EAD_1 = LOC_W, ENC_ID)  |                                       |
|                           |                                       |
|                           |        Voucher Request (VREQ)         |
|                           +-------------------------------------->|
|                           |       (message_1, ?opaque_state)      |
|                           |                                       |
|                           |        Voucher Response (VRES)        |
|                           |<--------------------------------------+
|                           |  (message_1, Voucher, ?opaque_state)  |
|                           |                                       |
|      EDHOC message_2      |                                       |
|<--------------------------+                                       |
|     (EAD_2 = Voucher)     |                                       |
|                           |                                       |
|                           |                                       |
|      EDHOC message_3      |                                       |
+-------------------------->|                                       |
|                           |                                       |
geonnave commented 9 months ago

@malishav it still needs polishing but all core functions of the draft work, so it could receive a first pass of review. Please focus on the edhoc-ead-zeroconf crate, since the integration with the rest of edhoc-rs is currently broken due to some API changes. (that is why the CI totally fails; on the other hand, cargo test for the edhoc-ead-zeroconf crate passes).

geonnave commented 9 months ago

Also, for reference, I used this notebook to create the traces / test vectors.

geonnave commented 9 months ago

It looks better now, but I think it will not be fully working with all features and possible configurations by the end of the day.

Since I will leave for PTO until 24 Oct, I would like to merge this today (if the review goes well), even if I have to adapt the CI with feature/exclude flags.

geonnave commented 9 months ago

Wohoo, CI passing!

geonnave commented 8 months ago

From my side, this is ready to merge.