Start with nucypher: A proxy re-encryption network

git clone https://github.com/nucypher/nucypher.git
cd nucypher
pip3 install .
nucypher ursula run --dev --federated-only
Run ursula
nucypher alice run --dev --federated-only --teacher 127.0.0.1:10151
Alice run

Create a label (derive_policy_encrypting_key):

  • URL: /derive_policy_encrypting_key/<\label\>
  • HTTP Method: POST
  • Returns: a hex-encoded policy_encrypting_key
Create a label
nucypher bob run --dev --federated-only --teacher 127.0.0.1:10151 --controller-port 4000
Bob run
  • URL: /grant
  • HTTP Method: PUT
  • bob_encrypting_key — encoded as hex
  • label — a unicode string
  • m — an integer
  • n — an integer
  • expiration — an ISO-8601 formatted datetime string
  • treasure_map — encoded as base64
  • policy_encrypting_pubkey — encoded as hex
  • alice_signing_pubkey — encoded as hex
Grant
nucypher enrico run --policy-encrypting-key <key> --http-port 5000
nucypher enrico run — policy-encrypting-key 03e87e0d49cf157a777d02ba809c42616c1c03e9161fae8a5dc6d5c9e2bfeb35ff — http-port 5000
Enrico

Encrypt the message:

  • URL: /encrypt_message
  • HTTP Method: POST
  • message — encoded as base64
  • message_kit and signature encoded as base64
Encrypt the message

Message Retrieve:

  • URL: /retrieve
  • HTTP Method: POST
  • policy_encrypting_pubkey — encoded as hex
  • alice_signing_pubkey — encoded as hex
  • datasource_signing_pubkey — encoded as hex
  • label — a Unicode string
  • message_kit — encoded as base64
  • A JSON-array of base64-encoded decrypted plaintexts as plaintext
Message retrieve
  • 200 OK – The request has succeeded.
  • 400 BAD REQUEST – The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
  • 500 INTERNAL SERVER ERROR – The server encountered an unexpected condition that prevented it from fulfilling the request.

--

--

--

I’m a software developer from India, currently working with blockchain.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Naoris Protocol Special Report: The Invisible War

Weekly update from PointPay (July 19 — July 23, 2021)

{UPDATE} Mahjong Genius Club Hack Free Resources Generator

Zoom — How Bad Is It for Your Privacy?

Promodio Uniswap Listing and Airdrop

Black pound day: Founders’ guide to effectively protecting and optimising your business

Advanced Exploitation Techniques — Part 1

How to Turn your Raspberry Pi into a Crypto Trading Bot

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tech Geek

Tech Geek

I’m a software developer from India, currently working with blockchain.

More from Medium

Get your secrets from Vault with its API

Remote connect AWS windows EC2 without exposing public IP with Omniedge

Using “Let’s Encrypt” Certificate Authority

How OPSY Lets Developers Start Containerized Projects Fast