-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to EDHOC -12 #30
Draft
chrysn
wants to merge
46
commits into
openwsn-berkeley:master
Choose a base branch
from
chrysn-pull-requests:edhoc-12
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds the C_1 in all cases. (The specification makes it optional, but this library supports only the case in which it is present -- further changes are expected in -07 on this anyway).
by generalizing over the P256 code
... because now the CoAP part can strip off the first element and hand on the rest easily.
This makes it easier to apply later format changes.
(The indices supported the corr-dependent format of earlier drafts).
This makes processing easier under the new BytesIO based processing
Previous cleanup steps didn't update this consistently
(Picking some C_x is not as easy any more, but it probably never was).
cred to cred_local and conn_id to c_local
Implementation stays BytesIO based as that is easier to process. This now allows Message1 to override decoding to store the byte string (as it is needed later).
This replaces the LRU cache previously used with more precise caching (in that there never needs to be a question of cache eviction: all caches have precisely size 1, and expire when the EDHOC object is dropped).
This allows replacing several @Property implementations with regular attributes, and allows fine-grained removal if information later.
Nowhere in the code was there need to get the "local" or "remote" identifier.
They are not valid credentials any more in -12, and were replaced with CCSs.
This allows handing on encoded data transparently, without any worry of normalization differences.
Some notes for going forward:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is more of a staging area than a full PR -- it contanis all I needed to run aiocoap's being-updated edhoc branch interoperably with other EDHOC -12 implementations.
Some of this is rewriting code that has been around and then dumping the old code at a later dead-code-removal stage; this is largely because oftentimes I couldn't find the code when looking for the terms used in the EDHOC draft. Some terms were not used consistently before, and EDHOC's terms changed quite a bit; I found I need them to be aligned to be productive in the code base.
Some "unrelated" changes (in quotes because they are intermingled with the actual changes) are around where things are cached. I'm trying to replace the LRU caches (which make it unclear what is recalculated when) with state clearly held in the EDHOC objects that are getting populated as they are calculated (or received) -- that is not fully complete yet, at the cost of several calculations being done multiple times (which should not happen in a secure production-ready version of this). Also I switched some things about how messages are entered (to facilitate the first-item stripping), I'll have to roll that back as it led to the necessity of message reencoding (which conflicts with the TBD upcoming nop-padding).
Steps forward are for me to clean up, finishing the "we name things as they are named in EDHOC" transition and the "we store things the first time they are used" transition. Then, this'll probably need a look at restoring the test suite (the tests that drove my development were integrated tests with aiocoap), and see whether the API change fall-out (some due to EDHOC's changes) are breaking anything too badly. (Do we have a list of users? At the present stage that might still be feasible.)