|
|
|
Cloud
| PiHole VPN |
Public-key infrastructure (PKI) is an umbrella term for everything that has to do with certificate and key management. This is a quick overview of the important stuff. Public-key cryptography involves a key pair: a public key and a private key. Each entity has their own. The public key can be shared around, the private key is secret. They allow doing two things: Some common algorithms are RSA (used for both) and ECDSA (only for signatures). In practice, public-key cryptography can be slow. That’s why nearly all protocols (such as TLS or SSH) only use it for authentication. Much faster symmetric-key algorithms (such as AES) are then used for encryption. This requires a shared secret, which is usually agreed upon using some flavor of Diffie-Hellman. Hashing algorithms (such as SHA) are one-way functions that take any input and compute a fixed-size output. The output is called a hash (or sometimes digest). Signatures authenticate messages. In short: Signing the whole message is pretty inefficient, so usually its hash is signed instead. A certificate is a name and public key bound by a signature. It identifies the owner of a public key. The signee is called a certificate authority (CA). The CA is often some big company, like VeriSign. With internal PKI, it might also be any entity that nodes have been configured to trust. A CA’s certificate can be signed by another CA, and so on. The last certificate in the chain is called a root certificate. Root certificates are trusted and stored locally. They’re usually shipped along the OS. Most often when people talk about certificates, they refer to X.509. It’s a flexible format for representing certificates. X.509 is used by TLS, which is used by a lot of things, like HTTPS and Kubernetes. X.509 certificates are written in the ASN.1 notation. The ASN.1 is usually serialized into DER. Since binary data can be a pain to transmit, it’s often further encoded into PEM. PEM is essentially just Base64-encoded DER. Certificate verification consists of making sure the certificate chain is valid and leads to a trusted root certificate. It of course assumes we trust the CAs, safe in the knowledge that they conform to sane security practices and only issue certificates to verified entities. Since verification requires the complete chain, certificates are often distributed as a bundle. In the case of TLS, the chain is sent during the handshake. Usually PEM files are just con Certificates can also be bundled using PKCS #12 (also known as PFX) or PKCS #7. The main difference is PKCS #12 can store private keys. When applying for a certificate: In the simplest case, the CA just performs Domain Validation (DV). It’s usually fast and automated, like checking for some specific DNS record. For more thorough vetting, there’s also Organization Validation (OV) and Extended Validation (EV). OV implies DV and verifying the legal entity exists. EV is the slowest and most rigorous of all, based on CA/Browser Forum guidelines. EV certificates are usually displayed prominently (for example, on Safari the URL will be green). For internal PKI, you can do whatever works best. With Kubernetes, you might send certificates to the nodes manually, or automate client CSRs and signing. There’s basically two ways to revoke certificates: certificate revocation lists (CRLs) and OCSP. A CRL is just a big list of certificates revoked by the CA. OCSP is a protocol that allows inquiring about a specific certificate. Both have their flaws. They add overhead. A lot of software don’t care. It might be easier to just use short-lived certificates and make issuance super smooth and simple. February 11, 2019
BA.net/adblockvpn
+54911 2546 1403
adblock@ba.net
PKI Summary
Public-key cryptography
Hashing
Signatures
Certificates
Formats
Verification
Bundling
cat
enated into one.Issuance
Revocation
Summary
OpenVPN Download Links
free adblock web filter dns filter vpn speed content filter tracking profiling openvpn blinkt tunnelblick pptp malware protection business security library campus school cybercafe cipa affordable easy alternative for barracuda fortinet sonicwall sophos untangle ba.net/adblock-dns-filter-server adblock-speed-vpn-iphone adblock@ba.net