informatique:openssl
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
informatique:openssl [24/03/2021 21:37] – [Chiffrer des fichiers en asymétrique (clé privée/publique)] cyrille | informatique:openssl [17/08/2021 15:43] (Version actuelle) – [CSR generation] cyrille | ||
---|---|---|---|
Ligne 51: | Ligne 51: | ||
openssl req -nodes -newkey rsa:2048 -keyout monserveur.key -out serveur.csr | openssl req -nodes -newkey rsa:2048 -keyout monserveur.key -out serveur.csr | ||
</ | </ | ||
+ | |||
+ | ===== Create Certificate Authority ===== | ||
+ | |||
+ | https:// | ||
+ | |||
===== Decode ===== | ===== Decode ===== | ||
Ligne 79: | Ligne 84: | ||
<code bash> | <code bash> | ||
+ | # blowfish may be faster in code implementation, | ||
+ | # but recent cpu embed hard coded aes which should be faster ;-) | ||
+ | # | ||
+ | ALGO=-aes256 | ||
+ | |||
# Create a random secret: | # Create a random secret: | ||
# - secret size must be compatible with RSA | # - secret size must be compatible with RSA | ||
Ligne 91: | Ligne 101: | ||
# encrypt file with the secret: | # encrypt file with the secret: | ||
echo $SECRET \ | echo $SECRET \ | ||
- | | openssl enc -blowfish | + | | openssl enc $ALGO -pbkdf2 -salt -pass stdin -in $THE_FILE -out ${THE_FILE}.ssl |
# decrypt the secret: | # decrypt the secret: | ||
Ligne 97: | Ligne 107: | ||
# decrypt the file: | # decrypt the file: | ||
echo $SECRET \ | echo $SECRET \ | ||
- | | openssl enc -d -blowfish | + | | openssl enc -d $ALGO -pbkdf2 -salt -pass stdin -in ${THE_FILE}.ssl -out ${THE_FILE}.clear |
</ | </ | ||
Sources: | Sources: | ||
+ | * https:// | ||
+ | * https:// | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
informatique/openssl.1616618241.txt.gz · Dernière modification : 24/03/2021 21:37 de cyrille