NuCypher Home Projects nucypher_webassembly

nucypher_webassembly

1
12 ▲
run nucypher in browser with webassembly
Tools
Nowhere near launch
Makers
dmytro Selin
Tags

https://github.com/demosglok/pyodide https://github.com/demosglok/nucypher_webassembly

When developing browser extension or other browser-side stuff for interacting with nucypher networks, you’ll need private keys for accounts, which for now can only be generated in python. So you’ll need host process, running on the client computer. While it is possible to convince users to install additional software for that, it’ll make additional complexities and friction.  I wanted to investigate possibility to run python and all nucypher stuff solely in browser. Especially having cpython being compiled to webassembly. So i used most advanced toolset for now which have implemented python in webassembly. This is iodide project and its part “pyodide” which aims to run scientific tools for AI in webassembly.  I took pyumbral as basic block to run it in browser first, and build it together with all dependencies into webassembly. With help of luck and some black C++ magic i managed to load all python code into my browser (try firefox , it has better support for webassembly). However it appeared that my kung-fu and my blackmagic isn’t strong enough, as one dependency is still missing and can’t be built into webassembly because uses asm code besides c++ code. So for now project is more like a demo and proof of concept, you can run it and see python working, but key generation is not asking some symbols from libffi. I envision its possible to rewrite this asm part in c/c++ or skip totally and use some alternative c/c++ only approach. but this will require some patching of umbral code or underlying libraries code (cffi, cryptography, openssl) and i didn’t manage to do this before deadline

Comments (1)
Please log in or register to post a comment.
dmytro Selin
Maker
· posted about 5 years ago

sorry for naming, i was in terrible rush sending project in last minutes

NuCypher Hackathon

Building the Applications and Tools for Unconditional Privacy
$5,000 first prize for each category
Mar 11 – Apr 7
Links
  • Join the NuCypher Discord to look for teammates, ask questions, and post project updates
  • Join the hackathon calendar so you never miss workshops, office hours, and deadlines