-
Notifications
You must be signed in to change notification settings - Fork 15
File Specification
Sérgio Santos edited this page Aug 7, 2019
·
7 revisions
-
Path:
/index
- Encrypted: yes (with user private key)
{
"files": [
{
"id": "DOC_SHORT_HASH",
"name": "image.jpg",
"url": "UUID",
"size": 1234567890,
"content_type: "png",
"created_at": "2008-03-01T13:00:00",
"uploaded": true,
"deleted": false,
"num_parts": 2,
"passcode": "encryption passcode that goes in the share link",
"part_ivs": ["part0_IV_base64", "part1_IV_base64"],
"username": "johnsmith.id.blockstack",
"encryption": {
"type": "PBKDF2/AES",
"params": {
"key_iterations": 10000,
"salt": "abcdef12348",
"iv": "1234n1234n123n12n1234=="
}
},
"version": 2
...
]
}
Notes
-
content_type
is optional -
DOC_SHORT_HASH
is 6 characters long and contains only [A-Za-z0-9] -
passcode
is 16 characters long and contains only [A-Za-z0-9] - All IVs are base64 encoded
-
Path:
/DOC_SHORT_HASH
- Encrypted: no
{
"encryption": {
"type": "PBKDF2/AES",
"params": {
"key_iterations": 10000,
"salt": "f98cnhd132",
"iv": "5432n7542n754n78n7985=="
}
},
"payload": "encrypted payload in base64"
}
Notes
- The encrypted payload contains a Doc object, following the same JSON format as an individual doc inside the index file
-
Path:
- If file size smaller than the part size:
UUID
- If file size bigger than the part size, each part:
UUID.partN
- If file size smaller than the part size:
-
Encrypted: yes (with the
encryption
,passcode
andpart_ivs
specified in the doc file) -
Content-Type
should always beapplication/octet-stream
- Key generation algorithm: PBKDF2withHmacSHA256
- Key size: 256 bits
- Encryption algorithm: AES/CTR/NoPadding