Symmetric encryption
Protocols / OSI model
1) Physical - Cables etc (Base10T, Base100T, Full Duplex)
2) Data Link - (IEEE such as ethernet and wifi, PPP, ARP, MAC, TAP)
3) Network - IP, IPSec, ICMP, TUN, Wireguard
4) Transport - TCP, UDP, TLS/SSL
5) Session - sockets, connections
6) Presentation -
7) Application
Block ciphers vs stream ciphers
Asymmetric encryption
HMAC
Symmetric encryption modes
https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation
Initialization Vector / Cryptographic nonce
RSA
DH
AEAD
Perfect Forward Secrecy
On which port goes ping?
It’s ICMP! none of them, but in some rare cases it may go to UDP 7 or TCP 7
Encoding, Encryption and Hashing?
Encoding may be reversed with the same algorithm used to encode it. It is used to represent the data in suitable way.
Encryption used to protect data’s confidentiality and in some cases (GCM) it’s authenticity and integrity
Hashing is not reversible in theory(hello rainbow tables) and is used to map data of arbitrary size to fixed-size values.
Hash use cases:
- data authenticity and integrity in ciphers
- checksum
- hash tables in programming
- check digits (like in credit card)
CIA triangle
Confidentiality
Integrity
Availability
PKI
Public Key Ifrastructure
A public key infrastructure (PKI) is a system for the creation, storage, and distribution of digital certificates which are used to verify that a particular public key belongs to a certain entity. The PKI creates digital certificates which map public keys to entities, securely stores these certificates in a central repository and revokes them if needed.[6][7][8]
A PKI consists of:[7][9][10]
A certificate authority (CA) that stores, issues and signs the digital certificates;
A registration authority (RA) which verifies the identity of entities requesting their digital certificates to be stored at the CA;
A central directory—i.e., a secure location in which keys are stored and indexed;
A certificate management system managing things like the access to stored certificates or the delivery of the certificates to be issued;
A certificate policy stating the PKI’s requirements concerning its procedures. Its purpose is to allow outsiders to analyze the PKI’s trustworthiness.
cpb
Cycles per byte. Number of clock cycles a microprocessor will perform per byte of data processed
Wireguard
Security level (cryptography)
Measure of the strength that a cryptographic primitive achieves : n-bit security means that the attacker would have to perform 2n operations to break it. For symmetric ciphers equals to key size. (AES-128bit key is 128 bit security) For asymmetric: depends on best known alogrithm. For 128 bit sec needs: RSA 3072, or ECDHA around 256 bits (Curve25519 for example)
Hash functions
Hash use cases:
Most used: SHA-1, 2, 3 , Blake2, MD5
(H)KDF
Key derivation function - is a cryptographic hash function that derives one or more secret keys from a secret value such as a main key
Hash Key derivation function - a simple KDF based on HMAC
SLA
5 nines - 99,999% - 5 minutes
4 nines - 99,99% - 50 minutes
3,5 nines - 99,95% - 250 minutes
3 nines - 99,9% - 9 hours
PGP
Pretty Good Privacy
is an encryption program that provides cryptographic privacy and authentication for data communication.
Public key asymetric encryption used to share teh symmetric key.
PGP is used for signing, encrypting, and decrypting texts, e-mails, files, directories, and whole disk partitions and to increase the security of e-mail communications. Phil Zimmermann developed PGP in 1991.
PGP fingerprint - can derive public key from short text
PGP encryption uses a serial combination of hashing, data compression, symmetric-key cryptography, and finally public-key cryptography; each step uses one of several supported algorithms. Each public key is bound to a username or an e-mail address. The first version of this system was generally known as a web of trust to contrast with the X.509 system, which uses a hierarchical approach based on certificate authority and which was added to PGP implementations later. Current versions of PGP encryption include both options through an automated key management server.
Digital Signature
non-repudiation
a situation where a statement’s author cannot successfully dispute its authorship or the validity of an associated contract.