511 karma · joined Jun 20, 2015 (11y ago) · 248 submissions
https://neilmadden.blog/about
[ my public key: https://keybase.io/neilmadden; my proof: https://keybase.io/neilmadden/sigs/QfrQtB7H1Ni4rhaFpENFBtqqCd-VYDYXqYHKRfojHnk ]
comment 6y ago · link · parent
On the other hand, it’s now recommended to use PSS padding with RSA, which requires a random value for each signature.
comment 6y ago · link · parent
[1]: https://www.cryptologie.net/article/461/the-9-lives-of-bleic...
comment 6y ago · link · parent
There wasn’t a lot of support.
comment 6y ago · link · parent
So there is a tradeoff between strict validation and allowing future expansion and upgrades. By all means strictly validate the parameters you need, but maybe don't reject parameters you don't recognise.
[1]: https://oauth.net/2/pkce/ [2]: https://tools.ietf.org/html/draft-ietf-oauth-security-topics... [3]: https://tools.ietf.org/html/rfc6749#page-19
comment 6y ago · link · parent
As usual, there’s even an xkcd on it: https://xkcd.com/1286/
comment 6y ago · link · parent
Yes, adding to PSL is not at all scalable and will likely cause you a world of pain down the road. It was not intended as a serious suggestion. Use proper CSRF defences.
comment 6y ago · link · parent
If you want to protect against these attacks with basic cookie attributes you can use SameSite and register your site (and any intermediate sub-domains) on the public suffix list to effectively shun your subdomains as being completely separate sites.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
https://www.chromium.org/updates/same-site/incompatible-clie...
comment 6y ago · link · parent
You also need to be careful about what you think this tells you. For example, suppose you ran a competition where the winner is the first person to upload an encrypted+signed correct answer to a shared folder. An attacker can wait for somebody to upload the winning answer and then simply strip the real winner’s signature off and sign the encrypted blob (which they can’t decrypt) with their own private key - hurray, the attacker has now won the prize!
If you reverse the order of signing and encryption you can run into bugs like [1].
You can securely combine public key encryption and signatures by including extra metadata fields inside each layer. Or you can use a function that provides public key authenticated encryption like NaCl’s crypto_box or the mode I’ve proposed for JOSE [2].
[1]: https://groups.google.com/forum/m/#!msg/sci.crypt/73yb5a9pz2... [2]: https://tools.ietf.org/html/draft-madden-jose-ecdh-1pu-02
Edit: clarify ambiguous use of “their”
comment 6y ago · link · parent
comment 6y ago · link · parent
decrypt file | tar xz
Elsewhere in these comments somebody also mentioned the case of decrypt file | sh
Presumably the whole point of implementing the STREAM online AEAD mode is to support these kinds of cases; only releasing chunks of plaintext after verification.But these use-cases are only secure in age when using the scrypt decryption option or if you have first verified a signature over the entire age-encrypted archive (killing the streaming use-case). The reason is that the X25519 age variant provides no sender authentication at all, and so an attacker doesn’t need to tamper with the archive: they can just generate their own ephemeral key pair and replace the entire thing with data of their choosing. Age has no way of detecting such an attack.
You absolutely need origin/sender authentication built directly into the tool to handle these cases securely.
[1]: https://www.imperialviolet.org/2014/06/27/streamingencryptio...
comment 6y ago · link · parent
For example, it seems that if you use scrypt then you get fully authenticated encryption: the message must have come from somebody who knows the password (either a trusted user or you chose a weak password). But if you use X25519 then the scheme used is ECIES, so no sender authentication, only IND-CCA security.
The format document says that if you want “signing“ then use minisign/signify, but I suspect most people want origin authentication. We know that it is actually quite hard to obtain public key authenticated encryption [1] from generic composition of signatures and encryption, with many subtle details. It would be better if age supported this directly for X25519 as it does for scrypt. Unfortunately, you can’t simply use a static key pair to achieve this (as in nacl’s box) as age uses a zero nonce to encrypt the file key with chacha20-poly1305 so reusing a static key will result in nonce reuse. (This seems a bit fragile).