06-Implementing Public Key Infrastructure: Senior Technical Instructor Ahmedsultan - Me/about
06-Implementing Public Key Infrastructure: Senior Technical Instructor Ahmedsultan - Me/about
06-Implementing Public Key Infrastructure: Senior Technical Instructor Ahmedsultan - Me/about
Ahmed Sultan
Senior Technical Instructor
ahmedsultan.me/about
1
Outlines
Labs
Lab 6: Managing the Lifecycle of a Certificate
Lab 7: Managing Certificates with OpenSSL
• Public key cryptography solves the problem of distributing encryption keys when
you want to communicate securely with others or authenticate a message that
you send to others.
✓ When you want others to send you confidential messages, you give them your public key to
use to encrypt the message, The message can then only be decrypted by your private key,
which you keep known only to yourself.
✓ When you want to authenticate yourself to others, you create a signature and sign it by
encrypting the signature with your private key, You give others your public key to use to
decrypt the signature, As only you know the private key, everyone can be assured that only
you could have created the signature.
• The basic problem with public key cryptography is that you may not really know
with whom you are communicating.
• The system is vulnerable to man-in-the-middle attacks.
• This problem is particularly evident with e-commerce.
• How can you be sure that a shopping site or banking service is really maintained
by whom it claims?
• The fact that the site is distributing public keys to secure communications is no
guarantee of actual identity.
• How do you know that you are corresponding directly with the site using its
certificate? How can you be sure there isn't a man-in-the-middle intercepting and
modifying what you think the legitimate server is sending you? various models.
• Public key infrastructure (PKI) aims to prove that the owners of public keys are
who they say they are.
• Under PKI, anyone issuing public keys should obtain a digital certificate.
• The validity of the certificate is guaranteed by a certificate authority (CA).
• The Certificate Authority (CA) is the entity responsible for issuing and
guaranteeing certificates.
• Private CAs can be set up within an organization for internal communications.
• Most network operating systems, including Windows Server, have certificate
services.
• For public or business-to-business communications, however, the CA must be
trusted by each party.
• Third-party CA services include IdenTrust, Digicert, Sectigo/Comodo, GoDaddy,
and GlobalSign.
• The trust model is a critical PKI concept, and shows how users and different CAs
are able to trust one another.
▪ Single CA
✓ In this simple model, a single CA issues certificates to users; users trust certificates issued by
that CA and no other.
✓ The problem with this approach is that the single CA server is very exposed.
✓ If it is compromised, the whole PKI collapses.
• Registration is the process by which end users create an account with the CA and
become authorized to request certificates.
• The exact processes by which users are authorized and their identity proven are
determined by the CA implementation.
• For Example: in a Windows Active Directory network, users and devices can often
auto-enroll with the CA just by authenticating to Active Directory.
• Commercial CAs might perform a range of tests to ensure that a subject is who he
or she claims to be.
• It is in the CA's interest to ensure that it only issues certificates to legitimate
users, or its reputation will suffer.
• The X.509 standard defines the fields or attributes that must be present in the
certificate.
Field Usage
A number uniquely identifying the certificate within the domain of its
Serial number
CA.
Signature algorithm The algorithm used by the CA to sign the certificate.
Issuer The name of the CA.
Valid from/to Date and time during which the certificate is valid.
Public key Public key and algorithm used by the certificate holder.
• Certificates are issued with a limited duration, as set by the CA policy for the
certificate type.
• Root certificates might have long expiration dates (10+ years), whereas web
server and user certificates might be issued for 1 year only.
• Typically, a certificate is renewed before it expires.
• Where a user is in possession of a valid certificate, less administration is required
(in terms of checking identity) than with a request for a new certificate.
• When you are renewing a certificate, it is possible to use the existing key
(referred to specifically as key renewal) or generate a new key (the certificate is
rekeyed).
• For Linux, CA services are typically implemented using the OpenSSL suite
(openssl.org).