-
Notifications
You must be signed in to change notification settings - Fork 23
Private Data Addresses
One of the premises of Storj is that data is secure and private. In the previous two examples we demonstrated a template that could be used in a public manner. If I wanted to, for example, share a picture of a cat with my friend Alice, the previous examples would work just fine. This does not, however, transfer over well if I wanted to backup financial information or unfinished novel. While the file itself will be convergently encrypted, an observer who knows our public address could obtain some information about our files.
By adding PGP keys to our system we can also encrypt the meta information we store in the blockchain. So we start out with a template that looks like this:
{
"name": "metadisk-private-address-a",
"key": """
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.4
Comment: Hostname: pgp.mit.edu
mQENBFLd1DoBCADN7L3zPpvQYNyqZKS7m2TrrY3jjgtCxS2RKgj97NYkJg8X2twkvVbaEFHw
j6SEM859yKjFmYXQL3ur2sp3kKg/uRe49JLuXXNv1BQY7p1C8qGcdNw7qwd4UQvc1jX/S+Q/
iCkr4miAeUl1vm9GqelleNRGJV9kMkTq2bSx+J8md1h4AWeKVSabVmP6WrVZpAViSV9AtDq+
agd6xDWfxjsy2U6Ajg7W6uNzAT0vcZLiQbnlJH0YKmrJ/YkYa4TFOcho2/DqL6EUda6NQAxi
Vn+cJZUZy9NltRkOugVueBPq1JDVQ69vQ3xKHwAogEyFljCnaE/yPl8Qcq3W0R9Kfi97ABEB
AAG0H1NoYXduIFdpbGtpbnNvbiA8bWVAc3VwZXIzLm9yZz6JARwEEAEIABAFAlLd1DwJELBo
Q6ekHm/OAADHbQgAr+wpV4wt3ljd2wB8OUPTuSi8NovMu1X+/rcPlleu9wGqmW+hMBVQYCvA
0U4at2Q8lNu5PZrtJDRZIPQSyOaBT3o4kwkfhGMru2zc4esCWgUPe6MnMDmyRUSkM28AWxtL
G1wPSoo/cW+MNJApMlAg6HtGg0Cc+IRkwPaae1cJ+j0kZGA0TsdJZdr/zxrbEKTW9AwYcJZx
jql5E5JjbR5M73BxjDX7y+ftzLGeWe4eF4hqVjHDYKu94sN2DjfzUhKtp9Mj0Oc5vzE93197
ha8sT8V1GITaBqOgT+DNGfxeRmF3TzSX/p1/xGWfnSij/Kro/lPree2kg9HgJSGj6glr/g==
=fjip
-----END PGP PUBLIC KEY BLOCK-----
""",
"filehash": <string>,
"filename": <string>,
"filesize": <int>,
"uploads": [
{
"host_name": <string>,
"url": <string>
},
{
"host_name": <string>,
"url": <string>
},
{
"host_name": <string>,
"url": <string>
}
]
}
So now if we wanted to store some meta data that looked like this:
{
"name": "metadisk-template-a",
"template": "c42bc134e94387caf9f685a01560aa020890233a80e6d2208a1cab2f72e190bb",
"filehash": "b17fee6427ee665eb54159762fe03847792af1d94bf6769b82f95b95e82975d2",
"filename": "b17fee6_WhatisStorj.pdf",
"filesize": 337748,
"uploads": [
{
"host_name": "ge_tt",
"url": "http://ge.tt/162T7Ef1/v/0"
},
{
"host_name": "gfile_ru",
"url": "http://gfile.ru/a4WfC"
},
{
"host_name": "rghost",
"url": "http://rghost.net/54761561"
}
]
}
Under the public format that would of course give us a ton of information about the file. But by looking at the PGP key on the template, we can encrypt the metadata before even sending it to the blockchain. So it ends up looking something like this:
-----BEGIN PGP MESSAGE-----
Version: KryptoKit v0.24
Comment: http://kryptokit.com
wcBMA7BoQ6ekHm/OAQf9FZPtqAt5YGR11bqdhv7XrLqKUkmdWb3pIE5QZLnu
5tqKR2Z1yAEesyzDY/76mRhrzkwn9WOABiae/jJxKBA5w5JwB/+ka6FvXcUF
Xs5MNOgsLNEp2ayP5jC1nyqEMDxKT1sIFXzio4g8v7cu8z8jW6FtA3rSsctu
m8mqLqI8NCUjxRlX8xtlizLLm5ui19LeUqxXvgfzqPlbdex1MmbIQtZgmRcx
800YbFmdOR9v7W4Gl7Ux5XfrrjNO/MvsiGkseFfgazpfj8QJA5HjoAlYovL/
0ji/VxpIlzIuUz/jsR5ISW2IdufU2+VoHkk/ulH+K1ShBQ5LeIbYI4Gqzv5c
hNLB5wFp+Toa38QIAADPGCfkIdVlk1tIcKoHwfyVVC4+n7z8cIsMyLoNNVyY
WB2iHB8jgDMujeacdBlwGlwRv8+R/RM4LXqrBzmeK0MU0FDci5WXHkk1An+i
y+YOl7nZ0xDcwF0b+L8MOmj83iWk+mWdhuPajXTBxRn0EyfsKekjhR2e5+MO
hfsf+3oINY7QTo3e24oi52iz/Vbl3CGDw1e7fL5Db8+jHpdEa2YMa2E1H5tH
yvPMcO1t2Mk+BPX/lVSWajrbEGYgoGQ8x8a6qr/qO5Ym0/QI8SIllPcJ4/jc
YiMPzDhuj6ZYl2N+G2T02YfnY/Mshb1dHS0+9djFXCx5tkPINasDTp42cPFk
FMawRJ1eq8G7su7YUBkkWmpNOt69a7aSsujNflq5YR81q/q++UTbWgqvtCAe
rpGwrQJbEbtjTI86Ult/wGOTEuRmTPhQSbrrbFu2vST2AC/CA6rMo4kFxSzE
4sQGUtejShG3HFA0KaCIeUw3hsCjHetPH2nw2w1dxtozryAo5gm2yixvEnG8
uOJ5PEiLWIwbysAdlNK4wfke111sbUEQ9d2bOCnL7HsC1dI2yDmLGIsvrJ7/
aIJm9R2jI32I3aZPKjgwQX2tYAFnr9UGb9rWzJN5/rfSFSQWBAmoTbhIT2t5
1ZM6vSua6ZtaqA+KcjBp5QBOGmlJbuCuX8/2YazjbRO7BpSdkZky0efQAs0h
/NZR4wxAWdls0pRS37fUpiDcLzz8qlHmjm6E4DinTu1GvxwMX7UZ0VDgCQAH
ZYb3bqyVtrG5iOO472jI7aEMVlh0nmjQtYgaXRexPqrMKhWB7zNPkzawtCxC
SOMXVRKjxAI/y/+XDNxuN65V2aekd5aWntuK+/SM6OsGccotaZFGJJbiPcJk
WfU+9uKvcCo=
=ndo1
-----END PGP MESSAGE-----
Yeah good luck trying to get any useful file information from that.
We don't only have to send valid meta data about our files to our private data address. We can send encrypted transactions that only contain garbage data. In this way if anyone who wants to browse your public address will see hundreds of encrypted transactions, but only a dozen might actually be valid. In this way we can hide our data in plain sight with many layers of encryption to protect us.
To break into our files, an attacker would have to first find our data address, break the PGP key, and then also break the convergently encrypted file(this is only possible if you already have the file).
Powered by Storj.