Devo usare un IV quando uso GPG con AES 256? O GPG lo gestisce per me?
Ho notato che ottengo risultati diversi ogni volta che eseguo la crittografia, cioè
gpg --symmetric --cipher-algo AES256 --armor test
Ma è abbastanza sicuro senza una flebo?
Ti rimanderò alla risposta di Thomas Pornin a Will che crittografa lo stesso file con GPG e la stessa chiave produce lo stesso testo cifrato ? , che è (come al solito) davvero eccellente.
Si riduce a: Sì, c'è una IV casuale e un sale casuale aggiuntivo durante la password per la trasformazione della chiave.
Il paragrafo pertinente è:
The third point also applies when doing password-based encryption (encryption is done with a password, not with a recipient's public key). Password-based encryption also adds a fourth randomization, which is the salt in the password-to-key transform, 3.7.1.3.
Numero di sezione aggiunto da me dalla sua quotazione, link aggiornato.
Il terzo punto è:
- When doing the symmetric encryption itself, a random IV is used, and will be different (with overwhelming probability) for each invocation. See section 5.7 for details.
Link aggiornato di nuovo.