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
13 stars 10 forks source link

Python regression around crypto-method-agility #303

Open chrysn opened 1 month ago

chrysn commented 1 month ago

The lakers-python package suffered some regressions (or unnoticed API changes) between 8e926b0fe331575f86087219eabac180460bc62b (good) and aa6eca5ababcc7ac64d67874c08f905e63953b29 (bad). Commits inbetween could not be tested. The changes were part of #284 AFAICT.

To reproduce, check out aiocoap (eg. 0.4.11), and run:

$ tox -e py312-allextras exec --skip-pkg-install -- pip uninstall -y lakers-python
    # (just in case you had it installed before)
$ tox -e py312-allextras exec --skip-pkg-install -- pip install 'git+https://github.com/openwsn-berkeley/lakers/@4e4aac33c00538d5904b11716e94a417cd514ed5#egg=lakers-python&subdirectory=lakers-python'
$ tox -e py312-allextras -- -k 'TestServerEdhocKidKid and test_whoami_is_client'

The name of the failing test indicated that things go bad when both parties present their keys by Key ID.

I'll continue from there to dig further into what is going wrong.

geonnave commented 4 weeks ago

That's weird, I just tested the kid<->kid version and the unit tests pass (see #304).