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

{UPDATE} Platypus Simulator 3D Hack Free Resources Generator

General Data Protection Regulation: What Does It Mean to Your Business And How to Comply?

Digital Signature

TryHackMe | h4cked | Walkthrough

Passwordless Authentication: The New Shift in Cybersecurity Bound to Revolutionize Fintech

DNS propagation does not exist

Evaluating Popular Web Browsers in Terms of Security and Privacy

Application Risks in SaaS

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

Automating Cisco IOS updates with Unimus — Part 2

SW Development Process At MANTA

Create a project and an app in Openshift