Lecture 1 - Securing Data
Hashing
Hashing is the process of taking a password as input and converting it to hash or hash
values.
A rainbow table is a precomputed database used to reverse cryptographic hash
functions, primarily for cracking password hashes. Instead of calculating hashes in
real-time, attackers use these tables to instantly look up a hash and find its
corresponding plaintext password. This method is highly efficient against unsalted,
hashed passwords, allowing for faster cracking compared to brute-force attacks.
Salting: is a security technique used to protect hashed passwords by adding a
unique, random string of characters (the "salt") to a password before it is processed
by a hashing algorithm. This ensures that identical passwords produce distinct hash
values, mitigating rainbow table attacks and protecting against precomputed table
attacks, as every hash becomes unique in the database.
Salting erases these two problems:
Rainbow attack
Same password problem
Generally recommended hash functions nowadays.
There are some algorithms to check the authenticity and integrity of messages as well.
Fixed length hash will make ambiguity for hackers to reverse the function. It won’t get
the exact previous result as it is.
Cryptography
To convert plaintext to codetext there need to have a reference book for the code
transforming. If the codebook somehow be found then the messages can be understood
by the adversary. So keeping the book safe is mandatory. Though the intercepting
message process is cumbersome yet one can not deny the risk.
Ciphers: a cipher is an algorithm or set of well-defined steps used to perform
encryption or decryption, converting readable data (plaintext) into an unreadable,
scrambled format (ciphertext) and vice versa. It acts as a foundational tool for data
confidentiality, ensuring that only authorized parties with the correct key can access the
original information.
Ciphers use specific mathematical algorithms to rearrange or substitute data characters
to make them unintelligible, with the strength often relying on a secret key.
To encrypt or decrypt, there need to be use keys to be done the job.
Cryptography:
Secret-key cryptography
Public-key cryptography
1. Secret-key cryptography (Symmetric-key cryptography):
Here key of 26’s ciphertext output is exactly same as original message.
To intercept the massages, one must know the algorithm and key.
Decryption:
AES and Triple DES are most common algorithm.
2. Public-key cryptography (asymmetric key cryptography):
Here RSA is most common public key cryptography.
p = a big prime number
q = another big prime number
In Diffie-Hellman, same key will be used by exchanging.
Digital Signature (asymmetric key encryption)
Commonly used algorithm to use digital signature.
It’s an opposite process of public key cryptography.
Passkeys/ WebAuth (web authentication)
Signature is generated by me through a private key and challenge.
Company or website will verify or decrypt my signature with my public key to reach the
same challenge through following the algorithm that I encrypted with my private key
previously.
Encryption in Transit
Encryption in transit: here machine in the middle can see what you are sharing with
others. Like Eve can read both Alice and Bob messages. But with proper encryption, in
end-to-end encryption process middle man/machine can’t see or has access what you
are sharing with others.
Deletion
Our normal deleting process: Delete Delete from recycle bin. In this process file
actually doesn’t get deleted. Device just forget the file where it is. Yes, the
unremembered part, it is usable. Through using the unremembered part again it may
erase previous memory part.
Secure deletion: This is the process you must follow to permanently and securely
delete your file.
Full-Disk Encryption: Also known as encryption at rest. Encryption in transit is for
going data back and forth.
By following encryption at rest, your actual file organization 1 and 0’s will become
random 1 and 0. After login, it will come again actual 0 and 1’s pattern. In this process,
your file has already been deleted mood if your will being stolen. If you want to delete
file, you must change the 0 and 1 or make them all to 0 or 1. If you delete your 0 and 1,
then your disk will get shorten.
Ransomware (Monetizing attacks)
An adversary run this ransomware to monitor system and eventually they ask for
ransome for the data the got access and make encrypted.
Quantum Computing
Quantum computing is a multidisciplinary field that uses the principles of quantum
mechanics to solve problems too complex for classical computers.
While classical computers use bits (0 or 1), quantum computers use qubits in such
way that it is represent both a 0 and a 1 at the exact same time, so it can be two
states at once for one condition /one qubit, 2 qubits 4 states, 3 qubits 8 states, which
allow for exponentially higher processing power for specific tasks through three core
principles:
Core Principles
Superposition: The ability of a qubit to represent a 0, a 1, or both
simultaneously. This allows the computer to look at a vast number of possibilities
at once.
Entanglement: A phenomenon where two qubits become linked; the state of one
instantly influences the state of the other, even over long distances.
Interference: A technique used to "bias" the quantum system toward the correct
answer by amplifying the probability of right results and canceling out the wrong
ones.
Why It Matters
Quantum computers aren't just "faster" versions of our current laptops; they operate on
a fundamentally different logic. They excel at:
Cryptography: Breaking current encryption standards and creating new,
"quantum-secure" codes.
Drug Discovery: Simulating molecular structures at an atomic level to find new
medicines.
Optimization: Solving massive logistics or financial modeling problems that
involve millions of variables.
Quantum computers have the theoretical potential to crack most of the encryption we
use today.
So if an adversary has access to quantum computing before us then it would
much easier for the adversary to crack our system.