Feistel Networks Visualized
Feistel Networks are a symmetric encryption structure where data is split into left (L) and right (R) halves, then transformed through multiple rounds of mixing and substitution using key-dependent functions. The same structure works in reverse for decryption!
Ajtai Hash Function: A Visual Introduction
The Ajtai hash function uses the power of matrix multiplication to convert data into secure hash values. The function takes a binary input string (in this case '1010') and processes it through a randomly generated matrix M to produce a unique hash value.
The process works in three key steps:
1. A random matrix M (size n × m) is multiplied by the binary input vector s
2. The resulting vector is taken modulo q (in this example, mod 61)
3. This produces the final hash value shown on the right
What makes this hash function special is its security is based on the mathematical hardness of certain lattice problems, making it resistant to attacks even from quantum computers.
---------------------------------
If you would like to see a certain topic covered, let me know by leaving a comment below!
Imagine a hash function made by hashing each 1/16th of the input and concatenating all 16 outputs together. This is preimage resistant since the interior hash is preimage resistant. It also has uniform distribution since its 16 uniform distributions concatenated together. But each input bit would only affect 1/16th of the overall output, which would not be a strong avalanche effect. So, I think both uniform distribution and preimage resistance does not always imply strong avalanche.
Love at First Decrypt: Matchmaking Encryption
Matchmaking Encryption allows messages to stay secret unless both sender and receiver are compatible! Just like a dating app, this cryptographic system only reveals messages when both parties match each other's criteria - keeping everyone's preferences private. Even if decryption fails, nothing is revealed except the fact that they weren't a match. No match = no message!
Happy Valentines! ❤️
----------------
What other cryptography concepts should we explore next? Let me know below!
@thefrozenfire I would think of "Uniform distribution" and "avalance effect" as separate concepts, but yes the Ajtai hash function does have a strong Avalanche effect! 🙂
Secure Two-Party Computation: How Garbled Circuits Work
Garbled circuits are cryptographic protocols that allow two parties to compute a function (described as a boolean circuit) together while keeping their individual inputs private.
One party (the garbler) encrypts a boolean circuit and their input, sends it to the second party (the evaluator) who securely obtains their encrypted input through oblivious transfer, evaluates the garbled circuit, and both parties then decrypt the final result together.
----------------
If you would like to see a certain topic covered, let me know by leaving a comment below!
Great questions!
Oblivious Transfer is how Bob gets his input encrypted by Alice without either party learning the other's secrets. I simplified the diagram by just showing it as a step because it is actually its own separate protocol. I'll make a post on this in the future!
This example only has one logic gate so one truth table is enough. In general, Garbled Circuits could have many logics gates which fit together in a circuit.
* Note: This example is just for illustration purposes. For real scenarios, the parameters should properly follow these security requirements: n log q < m < q /2n^4 and q = O(n^c )