crossbario / autobahn-python

WebSocket and WAMP in Python for Twisted and asyncio
https://crossbar.io/autobahn
MIT License
2.47k stars 763 forks source link

Key modules #1544

Closed oberstet closed 2 years ago

oberstet commented 2 years ago

so this PR is supposed to add/expand interfaces in AB for i) consolidate key types and signing/verification, and b) allow both SW and HW based implementations ...

oberstet commented 2 years ago

yeah, it should be flexible enough to allow different integrations, incl. eg NXP SE050 talking the APDUs over I2C this chips implements in the Java IoT applet it runs on its JCOP on-chip Java.

it would also allow to integrate smart HW, like eg a signing HW with display allowing to present the signed data to the user (this is what EIP712 is for).

eg the HSM could talk WAMP-RawSocket-CBOR over Serial-USB and expose IEthereumKey.sign_typed_data to display and sign typed application data.

anyways, I'll add a few more doc comments and then merge, thanks for reviewing!

oberstet commented 2 years ago

also, CB we should then obviously adjust CB to only use IEd25519Key and IEthereumKey. and AB cryptosign and xbr stuff.

once we have that, using a HSM should just be a plug away (well, we need the HSM impl as well;)

oberstet commented 2 years ago

two Ifc questions we might still do:

I'm pretty sure the former is good, not sure about the latter .. what do you think?