Insights For Success

Strategy, Innovation, Leadership and Security

Encryption

Understanding Perfect Forward Secrecy: The Importance of PFS in Protecting Your Data Online

GeneralEdward Kiledjian

Summary

Discover the benefits of Perfect Forward Secrecy (PFS) for protecting your online data. Learn how PFS keeps your information secure. Learn about the key exchange mechanism and ephemeral key that makes PFS possible and how it is used in protocols like TLS, SSH, and IPsec.

Article

With the increasing use of the Internet for transmitting sensitive information, security has become a critical concern for both businesses and individuals. Perfect Forward Secrecy (PFS) is one of the most vital security features that help protect our data. We will examine the importance of PFS, how it works, and what it is in this post.

Let us begin by defining PFS. PFS is a security feature that ensures an attacker cannot decrypt past data sent over a connection, even if the encryption key used was obtained.

A team of researchers at the Massachusetts Institute of Technology (MIT) first proposed PFS in the late 1990s. Among the team members were Paul Kocher, Daniel Bleichenbacher, and Bruce Schneier, who were concerned about the security of SSL (Secure Sockets Layer), which did not support PFS at the time. They recognized that, without PFS, an attacker who obtained the encryption key for a connection could decrypt the current data and any data sent over the connection in the past.

To address this issue, the team proposed an ephemeral key exchange mechanism. Each session generates a unique, temporary key, which is used only for that session and is discarded afterwards. Thus, each session will have its unique key, so if one key is compromised, it will not affect the security of previous or future sessions.

PFS is now widely used in many protocols, including TLS (Transport Layer Security), which encrypts data sent over the Internet. Besides SSH, IPsec (Internet Protocol Security) and SSH (Secure Shell) also use it.

Keywords: Perfect Forward Secrecy, PFS, encryption key, data security, key exchange mechanism, ephemeral key, SSL, TLS, SSH, IPsec, online security, data protection, MIT, encryption protocols, cyber security

SCrypt vs PBKDF2: A Comparative Analysis for Security Professionals

GeneralEdward Kiledjian

Key derivation functions such as SCrypt and PBKDF2 are used to turn a user's password into a cryptographic key that can be used to encrypt and decrypt data. The two algorithms are designed to be computationally expensive, making brute-force attacks on large lists of passwords difficult.

SCrypt and PBKDF2 differ significantly in the manner in which they generate keys. To generate keys, PBKDF2 applies a cryptographic function (such as SHA-1 or SHA-2) repeatedly to the password and a salt value. If the number of iterations is increased, the process will become more computationally expensive, but it will also take longer to generate a key.

SCrypt, on the other hand, generates keys using a method called "memory-hardness." A large amount of memory is used to perform calculations, making it more challenging for attackers to use specialized hardware (such as GPUs) to perform brute-force attacks. In addition, SCrypt allows users to specify a larger salt value, which increases the number of possible keys that can be generated and makes precomputation attacks more difficult.

Memory-hardness is a property of specific cryptographic algorithms that makes them computationally expensive to run, specifically in terms of memory use. Using memory-hardness, the algorithm becomes more resistant to attacks utilizing specialized hardware, such as graphics processing units (GPUs) or application-specific integrated circuits (ASICs), capable of performing many calculations simultaneously and optimized for specific purposes. By increasing the memory requirements of the algorithm, it becomes more difficult for attackers to perform brute-force attacks on these types of hardware.

Another difference between SCrypt and PBKDF2 is the number of iterations recommended. While PBKDF2 recommends a minimum of 600,000 iterations for adequate security, SCrypt does not make such a recommendation. Instead, it is determined by the cost parameter, which can be adjusted to increase or decrease the computational cost.


Keywords: SCrypt, PBKDF2, key derivation function, security, password, encryption, decryption, cryptographic key, brute-force attack, memory-hardness, iteration, salt value, precomputation attack, cost parameter, specialized hardware, threat model, security professionals, use case.

What is PBKDF2?

GeneralEdward Kiledjian

You have probably read about PBKDF2 if you have read any article discussing the LastPass hack or reviewing the security of a password manager. For non-technical readers, I wanted to write a quick explanation.

PBKDF2 (Password-Based Key Derivation Function 2) is a widely used method of protecting passwords.

A key derivation function such as PBKDF2 is designed to make it more difficult for an attacker to crack a password, even if they possess the hashed password value. This is accomplished by adding a "work factor," or iteration count, to the password hashing process. Iteration count refers to the number of times the hashing function is applied to the password, making cracking the password much more computationally costly.

PBKDF2 is widely used in a variety of applications, including online services, financial systems, and mobile devices.

With PBKDF2, the user's password is concatenated with a salt and the iteration count, and the result is then hashed using a cryptographic hash function such as SHA-256. The salt, the number of iterations, and the resulting hash value are then stored in a database. Upon logging in, the system uses the same salt, iteration count, and hash function to compare the entered password with the stored hash. The user is granted access if the values match.

It is important to use a strong and unique password and keep the salt and hashed values secure. Even though PBKDF2 is considered a strong method, more advanced key derivation functions such as bcrypt and scrypt are now available and recommended where more stringent security is required.

Keywords: PBKDF2 (Password-Based Key Derivation Function 2), Password protection, Key derivation function, Hashed password, Iteration count, Cryptographic hash function, SHA-256, Password storage, NIST guidelines, Security, Encryption, bcrypt, script, Work factor, Data privacy, Information security

What is salting and hashing a password?

GeneralEdward Kiledjian

The LastPass hacking saga has led to non-technical users reading articles using terms such as salting and hashing, which may seem alien to them. A few people contacted me asking what they do, and I wanted to write a short post describing them.

Salting is the process of adding random data, referred to as "a salt," to a password before it is hashed. This technique helps protect against dictionary attacks, in which an attacker attempts to crack a hashed password using a pre-computed list of common passwords. A unique salt is added to each password so that the hashed value will be different even if the same password is used multiple times.

The process of hashing involves taking an input (or message) and converting it into a fixed-length string of characters called a 'hash value'. The same input will always produce the same hash value; however, a minor change to the input will result in a vastly different hash value. As a result, it is extremely difficult for an attacker to reverse engineer the original input from the hash value.

The combination of salting and hashing provides a high level of protection for passwords and other sensitive information. During the creation of a password, the salt is added to the password, and the resulting value is hashed. The hashed value, as well as the salt, is then stored in a database. When the user enters their password to log in, the system adds the same salt to the entered password, hashes it, and compares the resulting value to the stored hash. Access is granted to the user if the values match.

Although salting and hashing provide a high level of security, they are not foolproof. Therefore, you should still use a strong and unique password.

Keywords: Salting, Hashing, Encryption, Password security, Dictionary attacks, Data privacy, Hash functions, Cryptography, Information security, Data integrity, One-way functions, Secure password management, Hash algorithm, Password hashing, Password protection.

Unlocking the Secrets of ECB and CBC: A Guide to Encryption Methods

GeneralEdward Kiledjian

Cryptography methods such as Electronic Code Book (ECB) and Cipher Block Chaining (CBC) are widely used.

ECB is a simple method of encrypting plaintext by dividing it into fixed-size blocks and encrypting each block independently using the same secret key. In other words, if the same plaintext block appears more than once in the message, it will be encrypted into the same ciphertext block (aka will look the same). The ECB encryption method is relatively easy to implement; however, it can be vulnerable to certain types of attacks, such as pattern recognition.

By contrast, CBC is a more secure encryption method that addresses the weaknesses of ECB. CBC encrypts plaintext blocks using the same key and combines them with the previous ciphertext blocks through an operation called an XOR. Thus, even if the same plaintext block appears multiple times in the message, it will be encrypted to a different ciphertext block each time.

The major difference between ECB and CBC is that ECB encrypts each block independently, whereas CBC encrypts each block with the previous block. CBC is therefore considered more secure and resistant to pattern recognition attacks than ECB.

Implementation of CBC mode requires an initialization vector (IV), which is a random value added to the first plaintext block before encryption. An IV is sent along with an encrypted message, so the receiver can use it to decrypt it.

ECB and CBC are symmetric-key encryption methods, meaning that the same key is used for encryption and decryption. As computing power increases, it becomes increasingly important to use more secure encryption methods, such as AES-GCM or RSA-OAEP.

Keywords: Encryption, ECB (Electronic Code Book), CBC (Cipher Block Chaining), Symmetric-key encryption, AES-GCM, RSA-OAEP, Data security, Pattern recognition attack, Initialization vector (IV), Encryption methods, Data privacy, Information security