Open mykhal opened 3 years ago
In Python, I'd do at least set()
on provided recipient list. Should not be serious memory issue even though number of recipient is theoretically unlimited now.
While undocumented, for key types other than SSH-RSA repeating recipients does allow obscuring the total number of recipients in a way that is traceable by the recipients (as opposed to adding randomly generated keys and throwing away the private keys). Note that this is only the case iff age generates a new ephemeral secret for every stanza (as this go implementation does) and would not work if age used the same ephemeral secret across stanzas (as the spec allows).
I'm not sure that age should have that as a feature, but some people might find it useful and since it comes for free...
would not work if age used the same ephemeral secret across stanzas (as the spec allows)
The design document didn't specify it, but the v1 spec spells out that
A new ephemeral secret MUST be generated for each stanza and each file.
Environment
What were you trying to do
Checking what happens if the same recipient pubkey is given multiple times (which can happen by mistake, when encrypting to multiple recipients).
What happened
No failure or warning. Resulting encrypted file is larger, containing unnecessary multiple master file key items for the same recipient in the header. (Also note that
age
happily encrypts empty file.)