Exploitationcryptographyssltlscertificatesencryptionkeysfips

OpenSSL

OpenSSL is a robust toolkit for implementing SSL and TLS protocols, providing cryptographic utilities for secure communication over the Internet. It includes command-line tools for key generation, certificate management, encryption, and testing SSL/TLS clients and servers.

Description

OpenSSL implements the SSL and TLS cryptographic protocols, enabling secure communication over the Internet. The main 'openssl' package provides a general-purpose command line binary useful for various cryptographic operations such as creating RSA, DH, and DSA key parameters; generating X.509 certificates, CSRs, and CRLs; calculating message digests; encrypting and decrypting with ciphers; testing SSL/TLS clients and servers; and handling S/MIME signed or encrypted mail.

Related packages include libssl3t64 for shared libraries, libssl-dev for development files with headers and manpages, and libssl-doc for documentation and demos. Specialized providers like openssl-provider-fips offer FIPS 140-2 compliant algorithms, while openssl-provider-legacy supplies implementations of deprecated or insecure algorithms.

The c_rehash utility creates symbolic links to files based on their hash values, aiding in certificate directory management. OpenSSL is essential for cybersecurity tasks involving cryptographic operations and secure protocol testing.

How It Works

OpenSSL provides shared libraries (libssl and libcrypto) implementing SSL/TLS protocols and cryptographic algorithms. The command-line tool /usr/bin/openssl executes subcommands like dgst for message digests, enc for symmetric encryption/decryption using ciphers (e.g., AES, DES), req for certificate requests, and s_client/s_server for SSL/TLS testing. Providers such as FIPS and legacy extend algorithm support, with FIPS conforming to Federal Information Processing Standards via validated modules. Hash-based linking via c_rehash organizes certificates by digest values for lookup.

Installation

bash
sudo apt install openssl

Flags

-olduse old-style digest (c_rehash)
-hprint this help text (c_rehash and openssl)
-helpprint this help text (c_rehash)
-vprint files removed and linked (c_rehash)

Examples

Display usage and help for c_rehash
c_rehash -h
Display help for OpenSSL standard commands, message digests, and ciphers
openssl -h
Perform message digest operations (e.g., SHA256, MD5)
openssl dgst
Encrypt or decrypt using ciphers like aes-256-cbc or des3
openssl enc
Generate certificate signing requests (CSRs) and X.509 certificates
openssl req
Test SSL/TLS client connections
openssl s_client
Test SSL/TLS server functionality
openssl s_server
Updated 2026-04-16kali.org ↗