Av Mathias
E - encryption key (public) D - decryption key (private) V - verification key (public) S - signing key (private)
c - Client s - Server a - 3rd party authority
Va - "fick på papper i det mörka gränden", hårdkodas / konfigureras i klienten Sa(Es) sparas hos servern
-
client sends
(Ec + Vc)
T.ex:
{"e":{"n":"1234324","e":"3"},"v":{"n":"54894264","e":"65533"}}}
-
server sends
Ec(Es + Vs + Sa(Es))
T.ex: Ec(
{"e":{"n":"5456232","e":"3"},"v":{"n":"69871564","e":"65533"},"s":"54ue56489uu5156i4i56464i1"}
) -
client verifies
Es with Sa(Es)
-
client sends
Es(Sc(8 rand bytes = R1))
-
server sends
Ec(Ss(8 rand bytes = R2))
-
(R1+R2)
is used for ChaCha20-Poly1305 for all data send from here and onwards
TODO
Input:
{
"type": "list"
}
Output:
{
"ids": ["<base64data>"],
}
Input:
{
"type": "read",
"id": "<base64data>",
}
Output:
{
"data": "<base64data>",
"signature": "<base64data>",
"hashes": ["<base64data>"],
}
hashes
är baklänges. Alltså att hasharna längst upp kommer först.
Input:
{
"type": "write",
"id": "<base64data>",
"data": "<base64data>",
"signature": "<base64data>",
}
Output:
{
"hashes": ["<base64data>"],
}
hashes
är baklänges här också.
TODO
TODO
TODO?