As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [openssl]

OpenSSL is an open-source implementation of basic cryptographic primitives, X.509 certificate utilities, and SSL and TLS protocols.

Filter by
Sorted by
Tagged with
56 votes
2 answers
79k views

Decrypting TLS in Wireshark when using DHE_RSA ciphersuites

How can I decrypt TLS messages when an ephemeral Diffie-Hellman ciphersuite is used? I am able to expose the premaster secret and master secret from the SSL Client. Using that, how to decrypt the ...
Kalai's user avatar
  • 811
248 votes
4 answers
112k views

SSL3 "POODLE" Vulnerability

Canonical question regarding the recently disclosed padding oracle vulnerability in SSL v3. Other identical or significantly similar questions should be closed as a duplicate of this one. What is the ...
tylerl's user avatar
  • 82.9k
58 votes
2 answers
8k views

What should end-users do about Heartbleed?

What should a website operator do about the Heartbleed OpenSSL exploit? mainly talks about what people running websites should do about Heartbleed. What should end-users of websites be doing? Do ...
Andrew Grimm's user avatar
  • 2,100
48 votes
5 answers
68k views

openssl: recover key and IV by passphrase

A large amount of files were encrypted by openssl enc -aes-256-cbc -pass pass:MYPASSWORD Openssl should derive key+IV from passphrase. I'd like to know key+IV equivalent of that MYPASSWORD. Is ...
Sergey Romanovsky's user avatar
30 votes
5 answers
62k views

Missing X509 extensions with an openssl-generated certificate

My goal is to create a certificate with opensslsimilar to this one generated with cfssl Certificate: Data: Version: 3 (0x2) Serial Number: 60:44:dc:0d:80:f4:54:55:e8:...
user avatar
281 votes
18 answers
473k views

Provide subjectAltName to openssl directly on the command line

Is it possible to provide a subjectAltName-Extension to the openssl req module directly on the command line? I know it's possible via a openssl.cnf file, but that's not really elegant for batch-...
Michael Seiwald's user avatar
227 votes
1 answer
91k views

How exactly does the OpenSSL TLS heartbeat (Heartbleed) exploit work?

I've been hearing more about the OpenSSL Heartbleed attack, which exploits some flaw in the heartbeat step of TLS. If you haven't heard of it, it allows people to: Steal OpenSSL private keys Steal ...
user avatar
115 votes
5 answers
57k views

What should a website operator do about the Heartbleed OpenSSL exploit?

CVE-2014-0160 http://heartbleed.com This is supposed to be a canonical question on dealing with the Heartbeat exploit. I run an Apache web server with OpenSSL, as well as a few other utilities ...
Deer Hunter's user avatar
  • 5,337
260 votes
11 answers
38k views

How to explain Heartbleed without technical terms?

Most of my friends who are not experienced in computers want to know what Heartbleed is and how it works. How would one explain Heartbleed to someone without a technical background?
user36976's user avatar
  • 3,233
29 votes
2 answers
44k views

SSL certificates and cipher suites correspondence

I have been learning about the SSL/TLS protocol (from https://www.rfc-editor.org/rfc/rfc5246) and have a few conceptual questions about the protocol. The client and server exchange "hello" ...
iart's user avatar
  • 391
61 votes
2 answers
23k views

Does the heartbleed vulnerability affect clients as severely?

If I have a web crawler (using a non-patched version of OpenSSL) that can be coaxed to connect to an evil https-site, can they get everything from my process memory? To attack a server you can keep ...
Gurgeh's user avatar
  • 721
58 votes
4 answers
28k views

Does Heartbleed mean new certificates for every SSL server?

If you haven't heard of the Heartbleed Bug, it's something to take a look at immediately. It essentially means that an attacker can exploit a vulnerability in many versions of OpenSSL to be able to ...
Naftuli Kay's user avatar
  • 6,765
31 votes
2 answers
30k views

Extract pre-master keys from an OpenSSL application

Consider an application using OpenSSL which has a bug. A packet capture of the full SSL session is available, as well as a core dump and debugging symbols for the application and libraries. A RSA ...
Lekensteyn's user avatar
  • 6,028
15 votes
1 answer
9k views

Is openssl aes-256-cbc encryption safe for offsite backup

I have around 20000 files (around 9GB) each of which is encrypted using openssl enc -aes-256-cbc -in infile -out outfile -k mypassword command. Each file uses same password. My openssl version is 1.1....
yasar's user avatar
  • 261
5 votes
1 answer
2k views

Can OpenSSL decrypt the encrypted signature in an Amazon Alexa request to a web service?

We're using OpenSSL to parse and verify the certificate and signature that Amazon's Alexa sends to external web services, following their list of requirements in the instructions here. We're ...
Christopher Ryan's user avatar
12 votes
3 answers
33k views

Use openssl to individually verify components of a certificate chain

This is related to another question, How to verify a signature of one entity by another using OpenSSL CLI? I used openssl s_client -showcerts -connect www.google.com:443 to collect three certificates ...
Fixee's user avatar
  • 1,565
37 votes
4 answers
30k views

Can someone explain what exactly is accomplished by generation of DH parameters?

I'm setting up a node.js server: https.createServer({ ... ciphers: 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH', honorCipherOrder: true }, app).listen(443); ...
Steven Lu's user avatar
  • 977
21 votes
5 answers
116k views

How can I verify that SSLv3 protocol is disabled?

I'm trying to disable SSLv3 in ejabberd 2.1.10 on Ubuntu 12.04. There is no way to disable it in config file, so I have to patch the source and rebuild the package: https://github.com/processone/...
quanta's user avatar
  • 433
1 vote
1 answer
291 views

What could cause classic "ERR_CERT_DATE_INVALID" when I can confirm no error from numerous other clients?

The ERR_CERT_DATE_INVALID error, I'm sure we're all familiar with, is below Visiting the same site from numerous other locations, web clients, etc shows a valid certificate. It's issued by let's ...
TCooper's user avatar
  • 356
100 votes
2 answers
135k views

How do I get the RSA bit length with the pubkey and openssl?

I have a public key generated with ssh-keygen and I'm just wondering how I get information on the keylength with openssl?
Evan Carroll's user avatar
  • 2,599
73 votes
6 answers
234k views

Converting keys between openssl and openssh

If I use the following openssl req -x509 -days 365 -newkey rsa:2048 -keyout private.pem -out public.pem -nodes I get private.pem and public.pem If I use ssh-keygen -t rsa -f rsa I get rsa and ...
anshul's user avatar
  • 833
66 votes
3 answers
9k views

Heartbleed: Why does the client supply the length of the message at all?

"The fix for this bug is simple: check that the length of the message actually matches the length of the incoming request." Why do we even have the client report the length at all? If we can know ...
Elliot's user avatar
  • 743
32 votes
2 answers
19k views

stronger encryption for SSH keys

I configured my server to encrypt user passwords using 500,000 rounds of SHA-512. The question is, how does the standard AES-128-CBC encrypted SSH private key stack up to that, provided the same (or ...
Steven Lu's user avatar
  • 977
29 votes
5 answers
18k views

Creating my own CA for an intranet

I need to create my own CA for an intranet and unfortunately it seems there's no good answer about this on Security.SE. There are many resources online about this, but all of them are different and ...
user avatar
26 votes
2 answers
26k views

What is the difference between Diffie Hellman generator 2 and 5?

Generating Diffie Hellman parameters in OpenSSL can be done as follows: $ openssl dhparam -out dh2048.pem 2048 Generating DH parameters, 2048 bit long safe prime, generator 2 This is going to take a ...
gertvdijk's user avatar
  • 363
21 votes
3 answers
52k views

OpenSSL generate different types of self signed certificate

Does anyone know how to use OpenSSL to generate certificates for the following public key types: DSA - For DHE_DSS key exchange. Diffie-Hellman - For DH_DSS and DH_RSA key exchange. ECDH - For ...
Ryu's user avatar
  • 479
21 votes
2 answers
7k views

Can Heartbleed be used to obtain memory from other processes?

According to http://heartbleed.com/, memory contents can be leaked from the server to the client and vice versa. Say that I have been banking in a separate browser profile (but under the same user). ...
Lekensteyn's user avatar
  • 6,028
7 votes
2 answers
25k views

Subject Alternative Name in Certificate Signing Request apparently does not survive signing

So I have been able to create a Certificate Signing Request with a Subject Alternative Name of the form subjectAltName=IP:1.2.3.4 by following the recipe in a previous (splendid) answer. When I ...
Drux's user avatar
  • 371
162 votes
2 answers
23k views

What is DROWN and how does it work?

There is a new recent attack "on TLS" named "DROWN". I understand that it appears to use bad SSLv2 requests to recover static (certificate) keys. My question is: How? How can you recover static ...
SEJPM's user avatar
  • 9,580
49 votes
3 answers
96k views

Generate CSR from existing certificate

Can we generate the CSR (certificate signing request) used for certificate signing from the signed certificate? It should work with the original private key when signed again with different authority.
NPC's user avatar
  • 621
47 votes
4 answers
25k views

Determine if private key belongs to certificate?

Given a certificate¹ and a private key file², how can I determine if the public key on the certificate matches the private key? My initial thought was to simply encrypt some text with the public key ...
Thanatos's user avatar
  • 1,056
40 votes
1 answer
10k views

How does OpenSSL generate a big prime number so fast?

In order to generate a 2048 bit RSA key pair, you need to generate two big prime numbers with 1024 bits length. As far as I know, OpenSSL chooses a random 1024 bit number and starts looking for a ...
user167246's user avatar
28 votes
6 answers
18k views

Heartbleed and Routers/ASAs/other

OK, so I first heard about heartbleed a few hours ago through the stack exchange questions feed, and after a moments panic, realised that the only web servers I have secured via OpenSSL are on the ...
Chris O'Kelly's user avatar
23 votes
2 answers
35k views

Where is the salt on the OpenSSL AES encryption?

I'm interested in knowing how and where OpenSSL inserts the generated salt on an AES encrypted data. Why? Im encrypting data in Java classes and need to guarantee that I can use OpenSSL to decrypt ...
bcap's user avatar
  • 348
16 votes
2 answers
36k views

How can you check if a private key and certificate match in OpenSSL with ECDSA?

I know how to do this with RSA keys (see this article: Determine if private key belongs to certificate?) however I do not know how to do this for ECDSA certificate / key pairs. With RSA keys, the ...
Jeff's user avatar
  • 161
16 votes
4 answers
77k views

Using the openssl command, how can I tell if it's using TLS 1.0?

Due to a security scan, I was told to not use TLS1.0. I found a link that gave me commands to use to check if a specific protocol is used/enabled. The command I ran (with output is) (Output from TLS1....
Classified's user avatar
8 votes
1 answer
7k views

Do I put my subordinate (intermediate) or root CA certificate in my truststore?

I have a server using a certificate signed by my subordinate (intermediate) CA. My java based client needs to put either the intermediate or root CA cert in it's truststore so when it communicates ...
Sean Bollin's user avatar
8 votes
3 answers
8k views

File security when encrypting files directly with the openssl command / and what about SHA1 hashing password first?

I've been using this command to encrypt files for a while now: openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc Then I type in a password. Can someone tell me, roughly speaking, ...
user21203's user avatar
  • 273
7 votes
2 answers
4k views

WPA2 Enterprise EAP-TLS Key Exchange

I'm in the process of implementing 802.1x WPA2 Enterprise Authentication using FreeRadius and EAP-TLS (Mutual TLS Cert Based Auth). I am keen to understand how to actual protocols work together and ...
user140024's user avatar
7 votes
1 answer
10k views

How to add AltName from csr file to crt file using "openssl x509 -req"?

I'm a webdeveloper and want to test my websites locally with a self signed SSL certificate. Everything was working great until a few days ago, when chrome started complaining about a missing AltName ...
Florian Lemaitre's user avatar
7 votes
2 answers
8k views

openssl enc uses md5 to hash the password and the salt

Wikipedia states that md5's collision resistance is 2^18 (https://en.wikipedia.org/wiki/MD5). I just found out that openssl enc uses md5 to hash the password and the salt. Let's assume that I want ...
randor's user avatar
  • 155
6 votes
3 answers
4k views

Is it possible to modify a CA without having to reissue all of the derived certificates?

Background: I have my own authoritative certificate that I generated myself for signing certificates for services my friends and I use, including web server, ircd, etc. It's convenient because I don'...
Wug's user avatar
  • 303
6 votes
2 answers
3k views

Can a SSL Certificate dictate protocol?

I know you can set the protocol/cipher via your web server: Nginx: ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; Apache: SSLProtocol all -SSLv2 SSLCipherSuite ...
Arian Faurtosh's user avatar
4 votes
4 answers
4k views

Trust a non-root CA in OpenSSL

Is it possible to have OpenSSL trust a non-root CA such that a certificate signed by that non-root CA can be properly verified? I've noticed that the default behavior for OpenSSL is to only verify ...
Justin Gerace's user avatar
4 votes
2 answers
6k views

Can't request ocsp status with chain of certificates

I have deployed basic ocsp server from OpenSSl Cookbook by Ivan Ristic page 44 with following command $ openssl ocsp -port 9080 -index db/index -rsigner root-ocsp.crt -rkey private/root-ocsp.key -CA ...
srghma's user avatar
  • 203
2 votes
1 answer
6k views

Why is this version of OpenSSL (1.0.1e) not vulnerable to Heartbleed?

I recently ran into a requirement that needed a web server set up with SSL, to show that its possible to extract the private key from a server with a vulnerable version of OpenSSL (Heartbleed). Hence, ...
user1720897's user avatar
1 vote
1 answer
2k views

decrypt a soap message using openssl

I've tried to do the same as found in How to you manually decrypt a SOAP message using openssl? Unfortunatly without success... Here is my situation : I'm trying to do the same stuff only my data ...
Dom's user avatar
  • 13
0 votes
1 answer
737 views

Generate X509 ERR_CERT_COMMON_NAME_INVALID

I am trying to set up https server on python3, but I could not generate a certificate and a key properly. That is the server code: import http.server, ssl server_address = ('localhost', 4443) httpd =...
Andrey Smirnov's user avatar
0 votes
2 answers
299 views

Different certificates for the same website?

When I load https://objective-see.com in Safari, it shows me a certificate with CN=objective-see.com. However, when I retrieve the certificate using echo -e | openssl s_client -connect "objective-see....
Chris's user avatar
  • 1
0 votes
1 answer
156 views

Can you use Https to prove document was sent from domain?

I'm aware that you can use tools like GPG to both encrypt and sign information. However HTTPS seems to only be used for encryption. The browser shows me the connection is secure, but there is no way ...
Jeremy French's user avatar