In the context of SSL/TLS certificates, what is the difference between key encipherment and data encipherment? What are some examples that highlights the difference?


2 Answers 2


Key encipherment means that the key in the certificate is used to encrypt another cryptographic key (which is not part of the application data). This is used within TLS in the RSA key exchange, where the pre-master secret (from which the symmetric encryption key is derived) is generated by the client, then encrypted with the servers public key and send to the server and decrypted there with the servers private key.

Data encipherment means that the key in the certificate is used to encrypt application data. This is not used in TLS. But certificates are not only used for TLS (for example also in S/MIME, VPN, signing of documents ...) so there might be use cases where this is needed.

  • Based on what you said. are my statements below true. 1) If i want to host a website with https on a server, buy a cert with Key Encipherment. 2) if i want to do message signing (i.e. payload signing such that it is not tampered with - but the payload itself is visible as clear text), buy a cert with Data Encipherment 3) If i want to use the same cert to do both 1) and 2), buy a cert with both Key Encipherment and Data Encipherment. 4) If i omit both usages when purchasing the cert, is it still usable to do 1) and 2) above ?
    – joedotnot
    Commented May 7, 2018 at 7:55
  • @joedotnot: 1) yes 2) signing is not encryption, i.e. you need key usage DigitalSignature. Apart from that you usually not buy a certificate with a specific key usage but a certificate for a specific purpose and the key usage is set by the issuer accordingly. Commented May 7, 2018 at 8:23
  • 1
    1) for HTTPS and any other SSL/TLS, up to 1.2 it is best, and for 1.3 it is required, to use 'forward secret' key-exchanges (DHE=Diffie-Hellman or ECDHE=Elliptic Curve DH ephemeral) which use the certificated key for signing and not either kind of encryption and thus requires digSign in KU. (And as Steffen says, you don't normally choose KU -- or EKU; the CA does based on its 'product line'.) Commented Feb 26, 2019 at 5:14
  • Reference ldapwiki.com/wiki/KeyEncipherment
    – MDMoore313
    Commented Nov 10, 2020 at 18:24

Key encipherment is Use when a certificate will be used with a protocol that encrypts keys. An example is S/MIME enveloping, where a fast (symmetric) key is encrypted with the public key from the certificate. SSL protocol also performs key encipherment.

Data Encipherment is used when when the public key is used for encrypting user data, other than cryptographic keys.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .