Ncipfs
๐ฅ3rd place winner in the NuCypher + Coinlist Hackathon March 2019. ๐A developer friendly python library to easily store, encrypt, share and decrypt data on IPFS with NuCypher's proxy re encryption. https://coinlist.co/build/nucypher/votes, https://ipfs.io/ and https://www.nucypher.com/
Install / Use
/learn @drbh/NcipfsREADME
Note: THIS REPO IS NOT MAINTAINED - the NuCypher dep has had breaking changes and this repo should only be used for refernce purposes
NCIPFS
Welcome to NCIPFS
This project makes it easy to secure data on IPFS with NuCyphers awesome proxy re encryption. This libaray is under development and are finializing the API.
Example Scenario:
David wants to upload a 1 TB file and allow Kathy and Joe access.
Traditionally he would ask Kathy and Joe for their respecive public keys and then he would encrypt the data twice; once for each key. Then store the encrypted value somewhere they could retrived it. He'll use IPFS as this datastore.
However NuCyphers proxy re-encryption allows us to encrypt the data once, then re-encrypt new keys that will allow the two parties access. In this system we only encrypt the 1 TB once, and only store 1 TB on IPFS, this saves us storage space, encryption time, and ecryption computations.
Resources
https://medium.com/@david.richard.holtz/hako-3825c3a033d7
https://www.youtube.com/watch?v=_0Jl836ETLo
https://github.com/drbh/hako
Benefits
โ
You Only Encrypt Once (Y.O.E.O kinda like Y.O.L.O)
โ
Verified (immutable data store)
โ
Only re-encrypt keys for viewers
โ
Distributed - no single point of failure
โ
Can run federated (centralized) or distributed (ECR20 token incentivized)
Use cases
๐ก Distributing large datasets
๐ก Distributing data to many people
๐ก IOT datastored (check out the original hearbeat example)
Implementations
๐ฅ Python 3 (stable IPFS and NuCypher codebases)
๐ฅ Node JS (waiting on stable NyCypher codebase)
๐ฅ Golang (waiting on stable NyCypher codebase)
Installation
Library
pip install ncipfs
Development
git clone https://github.com/drbh/ncipfs.git
cd ncipfs.git
We use pipenv to manage any of the deps
# install deps and access virtual env
pipenv install
pipenv shell
Implementation
On the top level there is a class named NCIPFS. This class handles the connection to an IPFS Gateway a NuCypher Network and access to Local File Store that handles all of the users keys.
Top level diagram --
API
NCIPFS Methods
connect(self, nucypher_network, ipfs_api_gateway)
create_new_user(self, name, password)
act_as_alice(self, name, password)
act_as_bob(self, name)
add_contents(self, alicia, my_label, contents):
add_data_and_grant_self_access(self, username, password, label, contents)
grant_others_access(self, username, password, cid, label, recp_enc_b58_key, recp_sig_b58_key)
fetch_and_decrypt_nucid(self, username, nucid)
decrypt(self, bob, item_cid, pol, sig, lab)
Top Level Functions
creat_nucid(alice, cid, enc_pubkey, sig_pubkey, label)
get_users_public_keys(name, serialized=False)
ncipfs_to_policy(store_url)
Related Skills
node-connect
348.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.2kQQBot ๅฏๅชไฝๆถๅ่ฝๅใไฝฟ็จ <qqmedia> ๆ ็ญพ๏ผ็ณป็ปๆ นๆฎๆไปถๆฉๅฑๅ่ชๅจ่ฏๅซ็ฑปๅ๏ผๅพ็/่ฏญ้ณ/่ง้ข/ๆไปถ๏ผใ
