Closed marcusklaas closed 9 years ago
Let's use RSA-PSS (http://www.w3.org/TR/WebCryptoAPI/#rsa-pss) to sign the whole thing. We can store the public key on the server side. Verify before accepting update. Client can probably derive public and private key from a hash (SHA1?) of password.
We can use the version for our iv, too!
Not implemented exactly as outlined above (we use HMAC instead of assymetric crypto), but we have authentication non the less. Using version based iv as well.
Keep an unencrypted version number. Do encrypt-then-mac. Maybe our package should look something like this before mac:
The server update rules then become very simple:
update iff macChecksOut() && version = previousVersion + 1
.