Skip to content

Instantly share code, notes, and snippets.

@itmustbejj
Last active February 17, 2019 05:48
Show Gist options
  • Save itmustbejj/4e665620955b395fcd908be2c43869c9 to your computer and use it in GitHub Desktop.
Save itmustbejj/4e665620955b395fcd908be2c43869c9 to your computer and use it in GitHub Desktop.
--------
POST http://localhost:8151/derive_policy_pubkey/ethdenver2019
post body: {}
return 200: {"result": {"policy_encrypting_key": "02c18c026169690658dcf93e5a0c7d19cff79cb6e7d02106ef3b62984a2157405e"}, "version": "0.1.0-alpha.14"}
--------
POST http://localhost:5151/encrypt_message
post body:
{
"message":"dGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c="
}
return 200:
{
"result": {
"message_kit": "A3Er/xyebUNwmOJur2zJMziruCEAfcoxqJxhYDZbHQ70ArSf1NS1bmiZ5XNCnj6EaKSHENeZ8smM7hi/XOiDOz7L/A1FWHUFIQD9DCoPVVmMnMD3nE8huuWNQ8oAciRnMUsDOj7lhkFsWoasbLHjG8l9W2Q+huIHneS+8JSPHzyseUpcWwkRM8Nc56aFWaOc3Y49EA8c+Q7kVkLrqj4yPN8j1wBEcv5gwa3vjfnZNu/snjUMn/bNizGhjGJ9PDGop8/0+do3DLzTBuTJ1zGriJ3S9QhXF6uoKui/MxT8fHX3US4UaL44PhD6CmkQaZOwUcUOAj8tH74OHjYesckA/Jom7dcJRzneTmjOEOWbUvRGL7UO/oq1a2JYcRQKuX6yYhdn",
"signature": "y9EqrhDNEZSIYW3dEaJwbUgF4615raysC/olXPtdCm1Gsyf/Jq9mrk32IbiXrLfzBqm7aVBvFViRXiHnlfqbNA=="
},
"version": "0.1.0-alpha.14"
}
----------
PUT http://localhost:8151/grant
post body:
{
"bob_signing_key": "03cbfd6076b2d124dfa4745386f51c6ea5cd8e0bd3a73ea2d0cc888c5badf9eeaa",
"bob_encrypting_key": "021306feb3d89a34d9ca54e7518aaf405f5573bb3786d2a494f8b4de3b495297a5",
"m": 1,
"n": 1,
"label": "ethdenver2019",
"expiration_time": "2019-02-19T12:56:26.976816"
}
return 200:
{
"result": {
"treasure_map": "fiNKJspEW6nQj2O5ANW/RDiRPyukpkjc7b0+onkWEmkJyqyYrAsg81hPWcTKyDHIWHSx/CCDq13kvHfjwR7uZxdlw12nKsCK2ShjZqKYcWJ1846CsBmxZ7lnr5a1jC6UAAABHAO9TYU7gOyNHMKfOaEKBlT4kR/0ZIRU/u4D4MJRrFVGIgMNI2hgYAkWdBvSvHeynmOVduuUsMF/6q2B5wlSZ4i8klmTPWqARx8IJekkaXEqrHfHviDlJdv4QAXx95k8fHoeAsGc7J0Ih4YmpTlSgel5J3SmsJEHSchp/99sAhVY36edo2Ru1M2DkbCxXuY5fIdqSvu9oU+AzT6RUXLgTiVzmlN1GDPQ6mZSA1JXqX1H5ZoKgXi0Rt1QN5ZQjKHOYVi/QPJ+j0vCEXgwx9CQSE52SDx1P6Ix/1T1pYx2d+10IJ+zGjKaLyHaRiucFLzPAXuW1ck4RmKL5Yn1nuju4DxFN1XVi9nLemYXusHYaP8oZZWk1PnrbvtM5oq/",
"policy_encrypting_key": "02c18c026169690658dcf93e5a0c7d19cff79cb6e7d02106ef3b62984a2157405e",
"alice_signing_key": "02c19cec9d08878626a5395281e9792774a6b0910749c869ffdf6c021558dfa79d",
"label": "ethdenver2019"
},
"version": "0.1.0-alpha.14"
}
FROM LOGS:
nucypher-bob | Bob Verifying Key 03cbfd6076b2d124dfa4745386f51c6ea5cd8e0bd3a73ea2d0cc888c5badf9eeaa
nucypher-bob | Bob Encrypting Key 021306feb3d89a34d9ca54e7518aaf405f5573bb3786d2a494f8b4de3b495297a5
nucypher-alice | Alice Verifying Key 02c19cec9d08878626a5395281e9792774a6b0910749c869ffdf6c021558dfa79d
--------
POST http://localhost:11151/retrieve
post body: {
"label": "ethdenver2019",
"policy_encrypting_pubkey": "02c18c026169690658dcf93e5a0c7d19cff79cb6e7d02106ef3b62984a2157405e",
"alice_signing_key": "02c19cec9d08878626a5395281e9792774a6b0910749c869ffdf6c021558dfa79d",
"datasource_signing_pubkey": "y9EqrhDNEZSIYW3dEaJwbUgF4615raysC/olXPtdCm1Gsyf/Jq9mrk32IbiXrLfzBqm7aVBvFViRXiHnlfqbNA==",
"message_kit": "A3Er/xyebUNwmOJur2zJMziruCEAfcoxqJxhYDZbHQ70ArSf1NS1bmiZ5XNCnj6EaKSHENeZ8smM7hi/XOiDOz7L/A1FWHUFIQD9DCoPVVmMnMD3nE8huuWNQ8oAciRnMUsDOj7lhkFsWoasbLHjG8l9W2Q+huIHneS+8JSPHzyseUpcWwkRM8Nc56aFWaOc3Y49EA8c+Q7kVkLrqj4yPN8j1wBEcv5gwa3vjfnZNu/snjUMn/bNizGhjGJ9PDGop8/0+do3DLzTBuTJ1zGriJ3S9QhXF6uoKui/MxT8fHX3US4UaL44PhD6CmkQaZOwUcUOAj8tH74OHjYesckA/Jom7dcJRzneTmjOEOWbUvRGL7UO/oq1a2JYcRQKuX6yYhdn"
}
return 500: No response body
LOGS:
nucypher-bob | WSGI application error
nucypher-bob | Traceback (most recent call last):
nucypher-bob | File "/usr/local/lib/python3.7/site-packages/twisted/python/context.py", line 122, in callWithContext
nucypher-bob | return self.currentContext().callWithContext(ctx, func, *args, **kw)
nucypher-bob | File "/usr/local/lib/python3.7/site-packages/twisted/python/context.py", line 87, in callWithContext
nucypher-bob | self.contexts.pop()
nucypher-bob | File "/usr/local/lib/python3.7/site-packages/hendrix/facilities/response.py", line 27, in run
nucypher-bob | return ran
nucypher-bob | File "/usr/local/lib/python3.7/site-packages/twisted/web/wsgi.py", line 533, in run
nucypher-bob | self.started = True
nucypher-bob | --- <exception caught here> ---
nucypher-bob | File "/usr/local/lib/python3.7/site-packages/twisted/web/wsgi.py", line 506, in run
nucypher-bob | for elem in appIterator:
nucypher-bob | File "/usr/local/lib/python3.7/site-packages/werkzeug/wsgi.py", line 870, in __next__
nucypher-bob | return self._next()
nucypher-bob | File "/usr/local/lib/python3.7/site-packages/werkzeug/wrappers.py", line 82, in _iter_encoded
nucypher-bob | for item in iterable:
nucypher-bob | builtins.TypeError: 'KeyError' object is not iterable
nucypher-bob |
nucypher-bob | WSGI application error
nucypher-bob | "172.19.0.1" - - [17/Feb/2019:05:36:42 +0000] "POST /retrieve HTTP/1.1" 500 - "-" "PostmanRuntime/7.6.0"
nucypher-bob | Timing out client: IPv4Address(type='TCP', host='172.19.0.1', port=44006)
nucypher-bob | Cycled teachers; New teacher is (Ursula)⇀Gray Comet Olive Queen↽ (0x374ccFdABd781aF7a4FDfA208D3190C30Ddff8b2)
nucypher-alice | Cycled teachers; New teacher is (Ursula)⇀Gray Comet Olive Queen↽ (0x374ccFdABd781aF7a4FDfA208D3190C30Ddff8b2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment