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édenteProchaine révisionLes deux révisions suivantes | ||
informatique:openssl [18/11/2010 15:40] – cyrille | informatique:openssl [24/03/2021 21:48] – [Chiffrer des fichiers en asymétrique (clé privée/publique)] cyrille | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== OpenSSL ====== | ====== OpenSSL ====== | ||
- | Voir aussi : [[/ | + | Voir aussi : |
+ | * [[/ | ||
+ | * [[/ | ||
+ | On line tools: | ||
+ | * http:// | ||
===== Code Signing with OpenSSL ===== | ===== Code Signing with OpenSSL ===== | ||
Ligne 8: | Ligne 12: | ||
* http:// | * http:// | ||
- | ===== Time Stamping | + | ===== Vérification de certificat avec OpenSSL |
- | ==== OpenTSA ==== | + | * http://isc.sans.edu/ |
- | + | < | |
- | http://www.opentsa.org | + | |
+ | </ | ||
- | The aim of the OpenTSA project is to develop an RFC 3161 compliant, stable, secure, open source and free time stamping authority client and server application. The following deliverables have already been produced: | + | on line tools: |
+ | * Thawte SSL Toolbox [[https:// | ||
- | * Time Stamp patch for OpenSSL: The time stamp request creation, response generation and response verification functionality is implemented as an extension to the latest stable version of OpenSSL. This patch adds a new ts command to OpenSSL with which the time stamping operations can be carried out. This patch and the time stamp client have been merged into the official version of OpenSSL and will be available from openssl-0.9.9 onwards. | + | ===== Certificate Chaining ===== |
- | * Time Stamp client: A simple command-line driven TSA client that can be used for creating and sending time stamp requests over HTTP or HTTPS to a TSA and for receiving and verifying the responses. The utility is distributed with the OpenSSL Time Stamp patch. | + | |
- | * Time Stamp module for Apache: This package is an extension module for the latest stable version of the Apache HTTP server. Using the functionality of the OpenSSL Time Stamp patch this module functions as an RFC 3161 compliant time stamp server over HTTP and HTTPS transport protocols, issued time stamp tokens can be stored in a MySQL or a FireBird database. | + | |
- | * | + | |
- | ===== PKI GUI ===== | + | On this page you'll find how to create only one file which contains |
+ | your certificate and others chain certificates (Concatenate them in | ||
+ | one), like, I think, you could have only one configuration directive | ||
+ | to use : the CertificateFile, | ||
+ | anymore : | ||
- | ==== XCA ==== | + | [[http:// |
- | http:// | ||
- | [[http:// | + | ===== Key generation ===== |
+ | [[http:// | ||
+ | |||
+ | <code bash> | ||
+ | # Génération des clés | ||
+ | openssl genrsa -out maCle.pem 1024 | ||
+ | # Exportation de la partie publique | ||
+ | openssl rsa -in maCle.pem -pubout -out maClePublique.pem | ||
+ | </ | ||
+ | |||
+ | ===== CSR generation ===== | ||
+ | |||
+ | La [[/ | ||
+ | |||
+ | <code bash> | ||
+ | openssl req -nodes -newkey rsa:2048 -keyout monserveur.key -out serveur.csr | ||
+ | </ | ||
+ | ===== Decode ===== | ||
+ | |||
+ | Afficher les données d'un [[/ | ||
+ | <code bash> | ||
+ | openssl req -in theCertificateSigningResquest.csr -noout -text | ||
+ | </ | ||
+ | |||
+ | Afficher les données d'un certificat encodé [[/ | ||
+ | <code bash> | ||
+ | openssl x509 -in theCertificate.crt -noout -text | ||
+ | </ | ||
+ | |||
+ | =====Heartbleed===== | ||
+ | |||
+ | [[wp> | ||
+ | |||
+ | The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packets, which allows remote attackers to obtain sensitive information from process memory via crafted packets that trigger a buffer over-read, as demonstrated by reading private keys, related to d1_both.c and t1_lib.c, aka the Heartbleed bug. | ||
+ | |||
+ | * Thawte SSL Toolbox [[https:// | ||
+ | * [[http:// | ||
+ | |||
+ | L' | ||
+ | |||
+ | ===== Chiffrer des fichiers en asymétrique (clé privée/ | ||
+ | |||
+ | On ne peut pas crypter un fichier avec une clé publique, la taille ne correspondra pas à l’algorithme. On créé donc un secret aléatoire que l'on chiffre avec la clé publique (asymétrique) et avec lequel on chiffre le fichier (symétrique). Pour déchiffrer la fichier on retrouve le secret en le déchiffrant avec la clé privée. | ||
+ | |||
+ | <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: | ||
+ | # - secret size must be compatible with RSA | ||
+ | # - use hex because base64 add newline | ||
+ | # which will shorter the secret in next commands | ||
+ | # because only first line will be used. | ||
+ | SECRET=`openssl rand -hex 64` | ||
+ | |||
+ | # encrypt the secret: | ||
+ | echo $SECRET \ | ||
+ | | openssl rsautl -encrypt -inkey / | ||
+ | # encrypt file with the secret: | ||
+ | echo $SECRET \ | ||
+ | | openssl enc $ALGO -pbkdf2 -salt -pass stdin -in $THE_FILE -out ${THE_FILE}.ssl | ||
+ | |||
+ | # decrypt the secret: | ||
+ | SECRET=`openssl rsautl -decrypt -inkey ~/ | ||
+ | # decrypt the file: | ||
+ | echo $SECRET \ | ||
+ | | openssl enc -d $ALGO -pbkdf2 -salt -pass stdin -in ${THE_FILE}.ssl -out ${THE_FILE}.clear | ||
+ | |||
+ | </ | ||
+ | |||
+ | Sources: | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
informatique/openssl.txt · Dernière modification : 17/08/2021 15:43 de cyrille