Coach Beard Jr. Boring Notes
  • CONTRIBUTING
  • Multi Threading
  • Processes
  • README
  • Security Policy
  • Stack vs Heap Memory Allocation
  • What is it?
  • Mind Map
  • Azure
    • Table of contents
  • Azure
    • Resources
  • BATCH-Scripting
    • Gettng-Started
  • Cloudflare
    • Digital Certificates - What are Those
  • Cloudflare
    • Introduction to HTTPS and TLS
  • Cloudflare
    • Resources
  • DENO LAND
    • DENO - CLI
  • DENO LAND
    • Deno_index.docx
  • DENO LAND
    • Examples
  • DENO LAND
    • Starting Examples
  • DENO LAND
    • Working with Deno
  • DENO LAND
    • http_server.ts
  • Docker Notes
    • Commands
  • Docker Notes
    • Communication
  • Docker Notes
    • Containers
  • Docker Notes
    • Data in Docker
  • Docker Notes
    • Docker Compose
  • Docker Notes
    • Dockerfile
  • Docker Notes
    • Images and containers
  • Docker Notes
    • Practice Images
  • What and Why
  • Docker Notes
    • Table of contents
  • Docker Notes
    • Virtual Machines
  • Docker Notes
    • Volumes
  • Docker Notes
    • dockerignore
  • Garbage Collection
    • Introduction
  • Git and Github
    • GIT
  • Git and Github
    • Github
  • HackingHub.io
    • Mindmap
  • HackingHub.io
    • Start Here
  • JENKINS
    • JENKINS (Getting Started)
  • Java - A Headache
    • A Headache
  • Java - A Headache
    • Checked Exceptions
  • Java - A Headache
    • Concurrency In Java
  • Java - A Headache
    • ENUM
  • Java - A Headache
    • ThreadExceptions
  • Java - A Headache
    • Exception Handling
  • Java - A Headache
    • Java Memory Management
  • Java - A Headache
    • Lambda Expressions
  • Java - A Headache
    • LifeCycle and States of a Thread in Java
  • Java - A Headache
    • Memory Allocation by JVM
  • Java - A Headache
    • Multi-Threading in JAVA
  • Java - A Headache
    • Transient
  • JavaScript
    • Arrays
  • JavaScript
    • Behind the Scenes of JavaScript
  • JavaScript
    • Falsy-Truthy Values
  • JavaScript
    • Garbage Collection
  • JavaScript
    • Getters_Setters
  • JavaScript
    • Hoisting
  • JavaScript
    • How Code is Parsed and Compiled
  • JavaScript
    • Index.docs
  • JavaScript
    • Inside JS Engine
  • JavaScript
    • MindMap
  • JavaScript
    • Objects
  • JavaScript
    • this in javascript
  • Kubernetes
    • Kubernetes Architecture Overview
  • Linux & Unix
    • GRUB - Grand Unified Bootloader
  • Linux & Unix
    • Resources
  • Miscellaneous
    • CDN Architecture
  • Miscellaneous
    • JavaScript exec returns Undefined
  • NodeJS
    • Index.docs
  • Obsidian - Help
    • Resources
  • Pentester Notes
    • IP Address
  • Pentester Notes
    • LAN - Local Area Network
  • Pentester Notes
    • MAC Address
  • Pentester Notes
    • MindMap
  • Pentester Notes
    • Networking
  • Pentester Notes
    • Offensive Security
  • Pentester Notes
    • Ping
  • Pentester Notes
    • Subnetting
  • Spring-Security
    • Servlets & Filters
  • Spring-Security
    • default-configuration
  • TypeScript
    • Index.docs
  • TypeScript
    • TypeScript
  • Webpack
    • Concepts
  • .github
    • ISSUE_TEMPLATE
      • feature_request
  • Automation
    • Cucumber-Framework
      • Getting Started
  • Automation
    • Playwright
      • Introduction
  • Azure
    • AZ-104
      • Control Azure services with the CLI
  • Azure
    • AZ-104
      • Deploy Azure infrastructure by using JSON ARM templates
  • Azure
    • AZ-204
  • Azure
    • AZ-204
      • mindMap
  • Azure
    • Azure Policy
      • Azure-policies
  • Azure
    • Azure Policy
  • Azure
    • Azure-Fundamentals
  • Azure
    • Azure-Fundamentals
      • mindmap
  • Cloudflare
    • Docs
      • Cloudflare IPs
  • Cloudflare
    • Docs
      • Getting Started
  • Cloudflare
    • Docs
      • MindMap
  • DENO LAND
    • Basics
      • Basics
  • DENO LAND
    • Basics
      • Connecting to Database
  • DENO LAND
    • Basics
      • Environment Variables
  • DENO LAND
    • Basics
      • Imports
  • DENO LAND
    • Basics
      • Modules
  • DENO LAND
    • Basics
      • Permissions
  • DENO LAND
    • Basics
      • Standard Library
  • DENO LAND
    • Basics
      • Testing
  • Eager
    • Primes
      • Finding prime number - formula
  • Git and Github
    • Github-Actions
      • Auto Publish(Release) - GitHub Actions
  • Git and Github
    • Github-Actions
      • Continuous Integration (CI) - GitHub Actions
  • Git and Github
    • Github-Actions
      • Github-Actions Introduction
  • Java - A Headache
    • Garbage Collection
      • Garbage Collection
  • Java - A Headache
    • Garbage Collection
      • Types of Garbage Collection
  • Java - A Headache
    • Spring - Framework
      • annotation
  • Java - A Headache
    • Threads
      • Threads in JAVA
  • JavaScript
    • Basics
      • DataTypes_Variables
  • JavaScript
    • Basics
      • Null-Undefined-NaN
  • JavaScript
    • DOM
      • Fundamental data types
  • JavaScript
    • DOM
      • Learn to search Methods and attributes
  • JavaScript
    • DOM
      • What is DOM
  • JavaScript
    • DOM
      • Working With DOM
  • JavaScript
    • Functions
      • Functions in JavaScript
  • JavaScript
    • OOP
      • OOP in JS
  • Pentester Notes
    • DNS
      • DNS Records
  • Pentester Notes
    • DNS
      • Securing DNS
  • Pentester Notes
    • DNS
      • What is 1.1.1.1
  • Pentester Notes
    • DNS
      • What is DNS
  • Pentester Notes
    • OSI Model
      • Intro
  • Pentester Notes
    • Protocols
      • ARP Protocol
  • Pentester Notes
    • Protocols
      • DHCP Protocol
  • Azure
    • AZ-104
      • Azure-Administrators
        • automate-azure-tasks-using-scripts
  • Azure
    • AZ-104
      • Azure-Administrators
        • azure-resource-manager
  • Azure
    • AZ-104
      • Azure-Administrators
        • configure-azure-resources
  • Azure
    • AZ-104
      • Azure-Administrators
        • configure-resources-with-arm
  • Azure
    • AZ-104
      • Azure-Administrators
        • control-azure-services-cli
  • Azure
    • AZ-104
      • Azure-Administrators
        • deploy-azure-infra-using-arm-templates
  • Azure
    • AZ-104
      • Azure-Administrators
  • Azure
    • AZ-104
      • Configure and Manage VNet for Azure
        • Configure Azure DNS
  • Azure
    • AZ-104
      • Configure and Manage VNet for Azure
        • Configure Azure Virtual Network Peering
  • Azure
    • AZ-104
      • Configure and Manage VNet for Azure
        • Configure Network Security Groups
  • Azure
    • AZ-104
      • Configure and Manage VNet for Azure
        • Configure Network routing and endpoints
  • Azure
    • AZ-104
      • Configure and Manage VNet for Azure
        • Configure Virtual Networks
  • Azure
    • AZ-104
      • Deploy and Manage Azure compute resources
        • Configure Azure Container Instances
  • Azure
    • AZ-104
      • Deploy and Manage Azure compute resources
        • Configure Virtual Machines
  • Azure
    • AZ-104
      • Deploy and Manage Azure compute resources
        • Manage VM with Azure CLI
  • Azure
    • AZ-104
      • Deploy and Manage Azure compute resources
        • configure-azure-app-service-plans
  • Azure
    • AZ-104
      • Deploy and Manage Azure compute resources
        • configure-azure-app-service
  • Azure
    • AZ-104
      • Deploy and Manage Azure compute resources
        • configure-vm-availability
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Configure Azure Blob Storage
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Configure Azure Files and Azure File Sync
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Configure Azure Storage Security
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Configure Azure Storage with tools
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Configure Storage Accounts
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Control Access to Azure Storage with SAS
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Create Azure Storage Account
  • Azure
    • AZ-104
      • Implement and Manage Storage in Azure
        • Upload, download, manage data with Azure Storage Explorer
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Allow users to reset their password with Entra SSPR
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Configure Azure Policy
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Configure Microsoft Entra ID
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Configure RBAC
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Configure Subscriptions
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Configure user and group accounts
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Create Azure Users and Groups in Entra ID
  • Azure
    • AZ-104
      • Manage identities and governance in Azure
        • Secure Azure resources with Azure RBAC
  • Azure
    • AZ-104
      • Monitor and back up Azure resources
        • Configure Azure Alerts
  • Azure
    • AZ-104
      • Monitor and back up Azure resources
        • Configure Azure Monitor
  • Azure
    • AZ-104
      • Monitor and back up Azure resources
        • Configure Log Analytics
  • Azure
    • AZ-104
      • Monitor and back up Azure resources
        • Configure Network Watcher
  • Azure
    • AZ-104
      • Monitor and back up Azure resources
        • Configure Virtual Machine Backups
  • Azure
    • AZ-104
      • Monitor and back up Azure resources
        • Configure file and folder backups
  • Azure
    • AZ-104
      • Monitor and back up Azure resources
        • Improve incident response with alerting on Azure
  • Azure
    • AZ-204
      • Azure-AppService-WebApps
        • AppService-DeploymentSlots
  • Azure
    • AZ-204
      • Azure-AppService-WebApps
        • Azure-App-Services
  • Azure
    • AZ-204
      • Azure-AppService-WebApps
        • Configure-web-app-settings
  • Azure
    • AZ-204
      • Azure-AppService-WebApps
        • Scale-apps-Azure-AppService
  • Azure
    • AZ-204
      • Azure-AppService-WebApps
  • Azure
    • AZ-204
      • Azure-Cosmos-DB
        • cosmosDB-part1
  • Azure
    • AZ-204
      • Azure-Cosmos-DB
        • cosmosDB-part2
  • Azure
    • AZ-204
      • Azure-Cosmos-DB
  • Azure
    • AZ-204
      • Azure-Functions
        • Azure-Functions-2
  • Azure
    • AZ-204
      • Azure-Functions
        • Azure-Functions
  • Azure
    • AZ-204
      • Azure-Functions
  • Azure
    • AZ-204
      • Containerized-Solutions
        • implement-azure-container-apps
  • Azure
    • AZ-204
      • Containerized-Solutions
        • manage-container-images-in-container-registry
  • Azure
    • AZ-204
      • Containerized-Solutions
  • Azure
    • AZ-204
      • Containerized-Solutions
        • run-container-images-container-instances
  • Azure
    • AZ-204
      • Sols-using-blob-Storage
        • Azure-Blob-Storage-demo
  • Azure
    • AZ-204
      • Sols-using-blob-Storage
        • Azure-Blob-Storage-intro
  • Azure
    • AZ-204
      • Sols-using-blob-Storage
        • Azure-Blob-Storage-lifecycle
  • Azure
    • AZ-204
      • Sols-using-blob-Storage
        • mindmap
  • Azure
    • AZ-204
      • course-notes-udemy
        • Azure App Service
  • Azure
    • AZ-204
      • course-notes-udemy
        • Containers Service
  • Azure
    • AZ-204
      • course-notes-udemy
        • Create VM via Powershell
  • Azure
    • AZ-204
      • Course Notes - Udemy
  • Azure
    • Azure-Fundamentals
      • Architecture-Services
        • Azure Infrastructure
  • Azure
    • Azure-Fundamentals
      • Architecture-Services
        • Azure-identity-access-security
  • Azure
    • Azure-Fundamentals
      • Architecture-Services
        • Azure-storage-services
  • Azure
    • Azure-Fundamentals
      • Architecture-Services
  • Azure
    • Azure-Fundamentals
      • Architecture-Services
        • compute-and-network-services
  • Azure
    • Azure-Fundamentals
      • Architecture-Services
        • mindMap
  • Azure
    • Azure-Fundamentals
      • Cloud-Concepts
  • Azure
    • Azure-Fundamentals
      • Cloud-Concepts
        • cloud-concepts
  • Azure
    • Azure-Fundamentals
      • Management-Governance
        • Cost-management-Azure
  • Azure
    • Azure-Fundamentals
      • Management-Governance
        • Monitor-tools-in-auzre
  • Azure
    • Azure-Fundamentals
      • Management-Governance
  • Azure
    • Azure-Fundamentals
      • Management-Governance
        • azure-for-governance-and-compliance
  • Azure
    • Azure-Fundamentals
      • Management-Governance
        • features-tools-for-managing-and-deploying-resources
  • Azure
    • Azure-Fundamentals
      • Management-Governance
        • mindmap
Powered by GitBook
On this page
Edit on GitHub
  1. Cloudflare

Digital Certificates - What are Those


Contents Covered

  • Public Key Infrastructure ( #PKI )

  • Encryption, Hashing, Digital Signatures

  • Installing and configuring PKI solutions

  • Secure Sockets Layer ( #SSL )

  • Transport Layer Security ( #TLS )


Prerequisite Knowledge

  • TCP/IP - how it works and what is it.

  • Web server/browser configuration - have a general sense of how you might go about configuring a web browser/server


SSL - Secure Socket Layer TLS - Transport Layer Security

Public Key Infrastructure

Understanding Cryptography

SSL/TLS are security protocols that are used to secure network communications

Cryptography is a method of securing data such that it is trusted and is viewable only by authorized parties

For this to work, cryptographic keys need to be stored somewhere in order to partake in securing things like network communications

Cryptographic Key Storage ways -> PKI certificate -> Smart Card/Common Access Card(CAC) -> File -> Trusted Platform Module(TPM) -> Token Device

General Encryption Process

  1. Plaintext is fed into an encryption algorithm

  2. A key is also used with the encryption algorithm

  3. The encryption algorithm results in encrypted data (ciphertext)

  4. Only those parties with a decryption key can decrypt the ciphertext

Symmetric Cryptography

  1. Uses a single secret key

  2. The secret key encrypts and decrypts the data

  3. All parties that either trying to encrypt or decrypt needs this key

  4. This key must be kept secure

Symmetric Encryption Algorithms

Algorithm
Max. Key size(bits)

AES

256

RC4

2048

3DES

168

Blowfish

448

Asymmetric Cryptography

  1. Uses two mathematically related keys

  2. Public key and private key are used in implementation of these type of algorithms

Asymmetric Encryption Algorithms

Algorithm
Max. Key size (Bits)
Description

RSA

4096

-

Diffie-Hellman

n/a

This is more of a key exchange mechanism implemented algorithm

ElGamal

2048

-

ECC

256

-

Asymmetric Email Encryption Process

  1. Sender encrypts the plaintext with receivers public key

  2. Receiver decrypts the encrypted text received using his private key.


SSL/TLS Network Security process

  1. Client sends the list of supported ciphers to web server

  2. Server sends cipher that will be used along with the PKI certificate, which includes the servers public key and the servers hostname

  3. Client generates and sends a unique session key(symmetric key)

Now to secure that symmetric key which is session key, it is encrypted with web servers public key. The web server then decrypts it with its private key


PKI hierarchy

PKI is a collection or hierarchy of digital security certificates.

These certificates always contain public keys of the registered entities These certificates can also contain private keys which is are defined by the entities in some specific cases for authentication or authorization

One of such components of PKI hierarchy is

-> Certificate Authority (CA) This component is used to issue new certificates to entities It can also renew, revoke certificates This CA also maintains the Certification Revocation List(CRL) which is essentially a list of serial number of revoked certificates

-> Registration Authority (RA) Also called subordinate CA. Also used to manage certificates

-> Certificate Revocation List (CRL) or Online Certificate Status Protocol (OCSP) verification of certificate validity using a serial number

-> Certificate Template Blueprint used when issuing certificates This can be customized depending on your needs and how the resultant issued PKI certificates are to be used

-> Certificate contains subject name, signature of CA, expiry information, public/private key

Revoked certificates cannot partake in part of secure communications

In case of multi-tier PKI hierarchy, from a security perspective, it makes sense to keep the certificate authority at the top of the hierarchy offline until its needed, since we have registration authority doing the work on behalf of the top certificate authority


Certificate Authorities

Certificate/registration authorities have a longer validity period than the issued certificates

Can also publish certification revocation list over a variety of protocols including things like HTTP and this certificate revocation list can then be retrieved by clients before they partake in communication that would PKI certificates

Chain of Trust The digital signatures of the certificate authority will exist in all of the certificates that it issues -> We trust CA that implies we trust all the certificates that it issue

SSL/TLS are directly related to PKI certificates

PKI certificates are also called X.509 certificates as it follows X.509 standard


What type of data is stored in PKI certificates?

  1. Version number

    1. defines the X.509 or PKI version number

  2. Serial number

    1. used to track certificates such as through certification revocation list,

  3. CA digital signature and Algorithm used

  4. validity period

  5. Certificate usage details

  6. Subject name such as URL or email address or domain name etc..

  7. Public or Private keys

We can use wildcard certificates for multiple DNS second level domain names via the subject This means that the certificate is issued to top-level DNS domain and all the subdomains are automatically trusted using single PKI certificate

OCSP Stapling certificate owner checks the CA for its status periodically, such as a web server with an SSL/TLS certificate Clients connecting to the secured website receive OCSP status for that website In this case, clients do not have to query the OCSP responder for website certificate status separately

PKP - Public Key Pinning This is information that is sent between the client web browser and web server so that trusting devices can download a trusted copy of a server certificate which includes public key In this we store a copy of that server certificate public key locally on the client device Upon future connections to the server, clients require that the server provide a fingerprint that has been previously pinned By this we are mitigating certificates issued to known hosts from unauthorized CAs such as <mail.google.com> being issued a certificate from an attackers self-signed CA These also have a certified lifetime


Certificate Lifecycle

It starts with certificate request, this can be manual or it can be automated If everything is okay, then the certificate is issued, then it can be used according to its purpose If the certificate is expired then new certificate must be created and digitally signed and to be send to receiver

  1. Certificate request

    1. depending on the algorithm being used and software is used, public and private key of the entity is created and then public keys are made available to trusted third parties

    2. Certificate Signing Request(CSR) is generated next, which includes a unique public key commonly in PKCS #10 format

    3. This CSR is sent to certificate authority for signing

  2. Certificate issuance

    1. require admin approval before certificate is issued

    2. certificate is stored in the device trusted certificate store or other media such as a smart card

  3. Certificate usage

    1. apps can first verify the validity of a certificate before using them (via CRL or OCSP)

  4. Certificate revocation

  5. Certificate renewal

  6. Certificate expiry


SSL vs TSL

Both uses PKI certificates and related keys to secure network communication

Both in conjunction with PKI certificates, allow for data encryption and confidentiality Also allows for digital signatures and hashing for authentication, integrity and non-repudiation

Both protocols are application specific, it must be configured separately for HTTP and SMTP and similar protocols

Security protocol downgrade attacks are common and are problems with the current standard of SSL protocols and hence it is recommended to use TLS instead of SSL unless its necessary

For security reasons, disable SSL and use TLS >v1.1


Hashing and Digital Signatures

Hashing doesn't provide data confidentiality

Used to verify the integrity of network messages, files and machine boot-up settings

Used in both SSL and TLS Uses a one-way algorithm that results in a unique value from which we cant generate input value except using the brute-force method

Digital Signatures provides data authentication, integrity and non-repudiation This is done by using the private key of the user, so if a message is sent by a user that user sings the message using his private key so that once we decrypt it with the users public key we can actually verify the user authentication for the message sent.

PreviousCloudflareNextCloudflare

Last updated 1 year ago