Cryptography Flashcards
What are the contents of a digital certificate?
Information about the subject a.k.a. Subject Name - “subject” refers to the site represented by the cert.
Information about the certificate issuer/certificate authority (CA) - The CA is the body that issued and signed the certificate. More about this shortly
Serial number - this is the serial number assigned by the issuer to this certificate. Each issuer must make sure each certificate it issues has a unique serial number.
Version - the X.509 version used by a given certificate. These days, you’ll usually find version 3.
Validity period - certs aren’t meant to last forever. The validity period defines the period over which the cert can still be deemed trustworthy.
Signature - This is the digital signature of the entire digital certificate, generated using the certificate issuer’s private key
Signature algorithm - The cryptographic signature algorithm used to generate the digital signature (e.g. SHA-1 with RSA Encryption)
Public key information - Information about the subject’s public key. This includes:
the algorithm (e.g. Elliptic Curve Public Key),
the key size (e.g. 256 bits),
the key usage (e.g. can encrypt, verify, derive), and
the public key itself
A digital certificate primarily acts like an identification card; something like a driver’s license, a passport, a company ID, or a school ID. It basically tells other people who you are. So that, for example, when a user arrives at your site looking for yourdomain.com, your site’s digital certificate (a.k.a. cert) will help that user confirm whether he actually landed at yourdomain.com.
In addition, a cert also holds a copy of your site’s public key, which is used in encrypting data transmitted between your site and the user’s web client (in most cases, a web browser).
Examples of Symmetric algorithms:
- DES - Data Encryption Standard
- Blowfish
- AES (128,192,256). These versions are supported by the Salesforce Crypto class.
Examples of Hashing algorithms?
- MD5 - Message Digest Algo
- Whirpool
- SHA - Secure Hash Algo. Versions supported by Salesforce SHA-1,SHA-256,SHA-512
Examples of MAC(Message Authentication Code) algorithms?
- hmacMD5
- hmacSHA1, hmacSHA256, hmacSHA512
Examples of popular asymmetric algorithms?
- RSA
- ElGamal
- Diffie-Hellman key exchange.