Skip to main content

Secret Storage

The functionning of the secret storage mechanism is described here

List Content of One's Own Secret Storage#

GET https://api.misakey.com/crypto/secret-storage

Success response#

Code#
HTTP 200 OK
Response Body#
{
"asym_keys": {
"DZMDBU_KRCa9dtkL024IwQ": {
"encrypted_secret_key": "ZGBuLodWwTbw0xb9BdxSsIQKy6dhYKX-xL2_SGFE5F4"
},
"Q4BXKNMzMQVEC-WY7cSTOg": {
"encrypted_secret_key": "_vFmE78frfrkYCCbvP0TJQ"
}
},
"box_key_shares": {
"8c40fc22-b5e3-4024-a28e-27d8d8fde260": {
"id": "d2068e00-e346-49cf-9687-70f982df6000",
"invitation_share_hash": "NnUcr3K5OVR7ayjzURxjYQ",
"encrypted_invitation_share": "fUwkyj8aNpXHUAfH-Br92LRqN9zrL-lRY-NkctDS8oU",
"created_at": "2021-04-06T14:10:10.657666Z",
"updated_at": "2021-04-06T14:10:10.657666Z"
}
}
}

Store a New Asymmetric key#

POST https://api.misakey.com/crypto/secret-storage/asym-keys
{
"public_key": "vj1ZsPs3PKidHuPVpHhz6w",
"encrypted_secret_key": "523TppQSmq7298cYGLxuBw",
"account_root_key_hash": "bnSx9pd3M47o5hnTxCwQvg"
}
  • public_key (Unpadded URL-safe base64)
  • encrypted_secret_key (Unpadded URL-safe base64) the secret key encrypted with the account root key
  • account_root_key_hash (Unpadded URL-safe base64) the hash of the current accout root key

Success response#

Code#
HTTP 201 CREATED
Response Body#
{
"id": "67ead3b8-28b7-42df-8781-d7bbde81b986",
"public_key": "vj1ZsPs3PKidHuPVpHhz6w",
"encrypted_secret_key": "523TppQSmq7298cYGLxuBw",
"account_root_key_hash": "bnSx9pd3M47o5hnTxCwQvg",
"created_at": "2021-04-06T15:27:44.358534285Z"
}

Store a New Box Key share#

PUT https://api.misakey.com.local/crypto/secret-storage/box-key-shares/:box-id
{
"invitation_share_hash": "3RUC8m6SqBiGChc7GX0USQ",
"encrypted_invitation_share": "Rq5R-9nQj0xFLjbaaclTRxh9iT5GA-J3CbMFsS1pew0",
"account_root_key_hash": "bnSx9pd3M47o5hnTxCwQvg"
}
  • invitation_share_hash (Unpadded URL-safe base64) the hash of the invitation share
  • encrypted_invitation_share (Unpadded URL-safe base64) the invitation share, encrypted with the account root key
  • account_root_key_hash (Unpadded URL-safe base64) the hash of the account root key

Success response#

Code#
HTTP 200 OK
Response Body#
{
"id": "b733bf3f-47d8-40b5-97dc-5d8c2b13fae3",
"invitation_share_hash": "3RUC8m6SqBiGChc7GX0USQ",
"encrypted_invitation_share": "Rq5R-9nQj0xFLjbaaclTRxh9iT5GA-J3CbMFsS1pew0",
"box_id": "088c095b-eb4f-4b7e-9bf4-82129b18f85f",
"account_root_key_hash": "bnSx9pd3M47o5hnTxCwQvg",
"created_at": "2021-04-06T15:27:44.37609874Z",
"updated_at": "2021-04-06T15:27:44.37609874Z"
}