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

Introduce Credential and IdCredential as successors to CredentialRpk #274

Open chrysn opened 1 month ago

chrysn commented 1 month ago

Closes: #272, #273

This is a first sketch of how I'd go about #272; the design includes some choices influenced by my assessment of #273. The two new types should eventually replace CredentialRpk completely (and also remove the need for BytesIdCred).

If I'm wrong about #273, Credential may still have a .value_type, but it wouldn't be needed for .by_value() any more, only for .by_thumbprint() (which we don't have yet).

@geonnave, is this a good direction?

chrysn commented 1 month ago

This needed updates after understanding the need for #281.

geonnave commented 1 month ago

Yes I think this is in the right direction. Not really sure how ByValueStyle will be used, but I think it will become clearer as it progresses. Thanks for the contributions so far.