Updated to use verifying_key also added EOF as requested

pull/782/head
Travis Haley 2019-03-10 11:38:59 -06:00
parent ee4e4a5f57
commit 82a38156c5
2 changed files with 86 additions and 106 deletions

View File

@ -4,33 +4,28 @@
"name": "NuCypher",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"item": [{
"name": "Alice/derive_policy_pubkey",
"event": [
{
"listen": "test",
"script": {
"id": "04cdbe20-68cd-479b-81a2-b146d614d426",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"policy_encrypting_key\", jsonData.result.policy_encrypting_key);"
],
"type": "text/javascript"
}
"event": [{
"listen": "test",
"script": {
"id": "04cdbe20-68cd-479b-81a2-b146d614d426",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"policy_encrypting_key\", jsonData.result.policy_encrypting_key);"
],
"type": "text/javascript"
}
],
}],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"header": [{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}],
"body": {
"mode": "raw",
"raw": ""
@ -51,31 +46,27 @@
},
{
"name": "Enrico/encrypt_message",
"event": [
{
"listen": "test",
"script": {
"id": "2771b0c4-3755-47cc-ac35-58105453bf46",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"enrico_message_kit\", jsonData.result.message_kit);",
"postman.setEnvironmentVariable(\"enrico_signature\", jsonData.result.signature)"
],
"type": "text/javascript"
}
"event": [{
"listen": "test",
"script": {
"id": "2771b0c4-3755-47cc-ac35-58105453bf46",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"enrico_message_kit\", jsonData.result.message_kit);",
"postman.setEnvironmentVariable(\"enrico_signature\", jsonData.result.signature)"
],
"type": "text/javascript"
}
],
}],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"header": [{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}],
"body": {
"mode": "raw",
"raw": "{\n\t\"message\":\"NuVault Rocks\"\n}"
@ -95,34 +86,30 @@
},
{
"name": "Bob/public_keys",
"event": [
{
"listen": "test",
"script": {
"id": "435cfc59-27a4-4391-8f1b-ae0ba63c36bc",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"bob_encrypting_key\", jsonData.result.bob_encrypting_key);",
"postman.setEnvironmentVariable(\"bob_signing_key\", jsonData.result.bob_signing_key);"
],
"type": "text/javascript"
}
"event": [{
"listen": "test",
"script": {
"id": "435cfc59-27a4-4391-8f1b-ae0ba63c36bc",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"bob_encrypting_key\", jsonData.result.bob_encrypting_key);",
"postman.setEnvironmentVariable(\"bob_verifying_key\", jsonData.result.bob_verifying_key);"
],
"type": "text/javascript"
}
],
}],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"header": [{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}],
"body": {
"mode": "raw",
"raw": "\n"
@ -142,35 +129,31 @@
},
{
"name": "Alice/grant",
"event": [
{
"listen": "test",
"script": {
"id": "d5a7dcd3-7eba-4b50-acba-fb106af01426",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"alice_treasure_map\", jsonData.result.treasure_map);",
"postman.setEnvironmentVariable(\"alice_policy_encrypting_key\", jsonData.result.policy_encrypting_key)",
"postman.setEnvironmentVariable(\"alice_signing_key\", jsonData.result.alice_signing_key)"
],
"type": "text/javascript"
}
"event": [{
"listen": "test",
"script": {
"id": "d5a7dcd3-7eba-4b50-acba-fb106af01426",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData.result);",
"postman.setEnvironmentVariable(\"alice_treasure_map\", jsonData.result.treasure_map);",
"postman.setEnvironmentVariable(\"alice_policy_encrypting_key\", jsonData.result.policy_encrypting_key)",
"postman.setEnvironmentVariable(\"alice_verifying_key\", jsonData.result.alice_verifying_key)"
],
"type": "text/javascript"
}
],
}],
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"header": [{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}],
"body": {
"mode": "raw",
"raw": "{\n\t\"bob_signing_key\": \"{{bob_signing_key}}\",\n \"bob_encrypting_key\": \"{{bob_encrypting_key}}\",\n \"m\": 1,\n \"n\": 1,\n \"label\": \"{{label}}\",\n \"expiration_time\": \"2019-02-19T12:56:26.976816\"\n}"
"raw": "{\n\t\"bob_verifying_key\": \"{{bob_verifying_key}}\",\n \"bob_encrypting_key\": \"{{bob_encrypting_key}}\",\n \"m\": 1,\n \"n\": 1,\n \"label\": \"{{label}}\",\n \"expiration_time\": \"2019-02-19T12:56:26.976816\"\n}"
},
"url": {
"raw": "{{base_uri}}:{{alice_port}}/grant",
@ -189,17 +172,15 @@
"name": "Bob/retrieve",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"header": [{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}],
"body": {
"mode": "raw",
"raw": "{\n\t\"label\": \"{{label}}\",\n\t\"policy_encrypting_key\": \"{{alice_policy_encrypting_key}}\",\n\t\"alice_signing_key\": \"{{alice_signing_key}}\",\n\t\"datasource_signing_pubkey\": \"{{enrico_signature}}\",\n\t\"message_kit\": \"{{enrico_message_kit}}\"\n}"
"raw": "{\n\t\"label\": \"{{label}}\",\n\t\"policy_encrypting_key\": \"{{alice_policy_encrypting_key}}\",\n\t\"alice_verifying_key\": \"{{alice_verifying_key}}\",\n\t\"datasource_signing_pubkey\": \"{{enrico_signature}}\",\n\t\"message_kit\": \"{{enrico_message_kit}}\"\n}"
},
"url": {
"raw": "{{base_uri}}:{{bob_port}}/retrieve",
@ -215,4 +196,4 @@
"response": []
}
]
}
}

View File

@ -1,8 +1,7 @@
{
"id": "578a3d66-560a-4eb8-ba59-db439946f3f4",
"name": "dev",
"values": [
{
"values": [{
"key": "label",
"value": "ETHDENVER",
"description": {
@ -89,7 +88,7 @@
"enabled": true
},
{
"key": "bob_signing_key",
"key": "bob_verifying_key",
"value": "",
"enabled": true
},
@ -99,7 +98,7 @@
"enabled": true
},
{
"key": "alice_signing_key",
"key": "alice_verifying_key",
"value": "",
"enabled": true
},
@ -112,4 +111,4 @@
"_postman_variable_scope": "environment",
"_postman_exported_at": "2019-02-18T16:37:46.501Z",
"_postman_exported_using": "Postman/6.5.2"
}
}