iota.py
iota.py copied to clipboard
Masked Authenticated Messaging (MAM) Support
Implement support for Masked Authenticated Messages (refer to https://github.com/iotaledger/mam.client.js/ for a reference implementation).
Moving back to "scheduled"; we're not ready to work on this just yet. For now, we will implement a PoC that uses the JS lib to do the crypto stuff, but that's not part of this GitHub issue.
We should tackle this soon, wrapping the MAM Rust library (https://github.com/iotaledger/MAM)!
There are two options:
- https://github.com/PyO3/pyo3
- https://github.com/dgrunwald/rust-cpython
The two libraries are discussed here https://github.com/PyO3/pyo3/issues/55 PyO3's approach seems to be more native and flexible, further it is said to be 15% faster
@todofixthis Apparenltly there has been done some work on the foundation https://github.com/iotaledger/iota-bindings with PyO3... how do the bindings come into play?
Awesome news @miili !
I think for PyOTA we should focus on a pure-Python implementation (with optional C extension if performance is an issue).
A solution that relies on Rust bindings sounds interesting (and I'd love to see it!), but I think it would be better for the long-term direction of PyOTA if that was implemented in a separate project.
Should MAM for Python come in a separate package or be included in PyOTA?
My preference is to follow any precedent set by the Javascript library. If MAM gets included directly in iota.lib.js, then I think PyOTA should follow suit. If not, well, I don't think PyOTA needs to be monolithic anyway (:
If we end up with MAM in a separate project, though, I would still be happy to include it as an extra in PyOTA's setup.py
(e.g., so that developers can install it via pip install pyota[mam]
).
Looks like the Javascript library will be wrapped around the Rust MAM library, through WebAssembler. See https://github.com/iotaledger/MAM and https://github.com/iotaledger/iota-bindings for Python prep work.
If we implement the Rust realisation as well, we can rely on a solid and well tested library. There will be one point of responsibility for many implementations. I hope to have spare time in February and would like to takle this @HerrMuellerluedenscheid ;)