Cryptography
List of projects and assignments for Applied Crytography
Install / Use
/learn @rakeshsukla53/CryptographyREADME
WEBSITE - http://www.asecuritysite.com/encryption
Cryptography
Randomness and pseudo randomness
substitution/permutation networks
Modes of Operation ECB, CBC, CFB, OFB
Choosen Cipher Attack
Choosen Plaintext Attack
Hybrid Encryption
Hybrid encryption is a mode of encryption that merges two or more encryption systems. It incorporates a combination of asymmetric and symmetric encryption to benefit from the strengths of each form of encryption. These strengths are respectively defined as speed and security.
Hybrid encryption is considered a highly secure type of encryption as long as the public and private keys are fully secure.
Secure Online Purchashing
You enter your credit card numbers online, click “OK” and wait with bated breath for your CD to arrive the next day … but what about that lingering question of how secure you really are?
Cryptography, the process of encoding information, has been around since Julius Caesar’s day. In fact, the technology is so solid, a method that was revolutionary 30 years ago is still used today. It’s called public key cryptography, and despite being decades old, it makes secure Internet commerce easier.
Public key cryptography allows anyone to scramble a message (like credit card information) to an intended party, but it lets only that party unscramble it. It also plays a role in authentication (Is that really Amazon I’m ordering from?).
Lamport Scheme
In cryptography, a Lamport signature or Lamport one-time signature scheme is a method for constructing a digital signature. Lamport signatures can be built from any cryptographically secure one-way function; usually a cryptographic hash function is used.
Although the potential development of quantum computers threatens the security of many common forms of cryptography such as RSA, it is believed that Lamport signatures with large hash functions would still be secure in that event. Unfortunately, each Lamport key can only be used to sign a single message. However, combined with hash trees, a single key could be used for many messages, making this a fairly efficient digital signature scheme.
Identity Based Encryption
Quantum Cryptography
In Quantum Cryptography, keys are exchanged through quantum signals if you see the below image!

If eve tries to extract the signals then Quantum Bubbles will be destroyed. Quantum signals will be destroyed like bubbles.

Eves dropping is almost impossible with Quantum Cryptography.
New keys are generated in less than a minute here.

Quantum cryptography is the science of exploiting quantum mechanical properties to perform cryptographic tasks. The best known example of quantum cryptography is quantum key distribution which offers an information-theoretically secure solution to the key exchange problem. Currently used popular public-key encryption and signature schemes (e.g., RSA and ElGamal) can be broken by quantum adversaries. The advantage of quantum cryptography lies in the fact that it allows the completion of various cryptographic tasks that are proven or conjectured to be impossible using only classical (i.e. non-quantum) communication (see below for examples). For example, It is impossible to copy data encoded in a quantum state and the very act of reading data encoded in a quantum state changes the state.
HMAC
HMAC stands for Keyed-Hash Message Authentication Code
Why we need HMAC? Because we want to know the integrity of the information transferred. HMAC ensures that the integrity of the message is not broken.
Generating HMAC is super easy!
From the SENDER SIDE

From the RECEIVER SIDE

Why we use HMACnot MAC?

Advantage of HMAC over MAC

HMAC SPECIFICATION

Whole Algorithm

Public-Key-Infrastructures
PKI is a two key Asymmetric Cryptosystem. Its the same asymmetric algorithm but here confidentiality integrity and authenticity are extremely important.

In PKI, it is important to know whether the party sending us the public key is a genuine or not? Because anyone can send his/her public key, but how do you verify the party is real!
For verifying your identity you have digital signatures, that can be initially shared to ensure the person is real not some intruder.
Public Key is associated with each digital signature

You need to first share the digital signature and then send messages.

Collision Resistant Hashing
Hash algorithms are often used for computing digital signatures. The signer of a message runs the original message through a hash algorithm to produce a digest value, then encrypts the digest to produce a signature. Someone verifying the signature will run the message through the same hash algorithm, and will decrypt the attached signature value to ensure the digest it contains matches the one they computed.
If collisions are easy to find, they allow an attacker to take an authentic digitally signed message, find a different message that produces the same digest (the collision), then substitute the fake message for the real one while keeping the same signature value. Someone trying to validate the signature won't be able to tell the difference. This destroys the value of digital signatures.
Testing is difficult. You can apply chi-squared tests and look for uneven digest bit distributions over a wide number of single- and multi- bit changes, but that's not proof. Most of the strength relies on the algorithm's resulting digest size being large enough to mask any undiscovered weaknesses.
there is no such thing as collision-free hash function
Discrete Logarthimic Problem
Easy to calculate one way but extremely difficult to do the reverse

Here my modulus operator is a small prime number(17). If the number is extremely large then it is almost impossible to calculate the reverse!
3^17 mpd 33979348237924720430274729462704702794729705824927408232324342323232
Now the reverse calculation is now impossible!

Merkle Hellman
Again this is very similar to Diffie Hellman
Watch this 2 min video Merkle Hellman
Elgamal-Encryption
Similar to Diffie Hellman method,
The below image describes everything:

Check out this link for more Link
Homomorphic Encryption
Homomorphic encryption is a form of encryption that allows computations to be carried out on ciphertext, thus generating an encrypted result which, when decrypted, matches the result of operations performed on the plaintext.
This is sometimes a desirable feature in modern communication system architectures. Homomorphic encryption would allow the chaining together of different services without exposing the data to each of those services. For example, a chain of different services from different companies could calculate 1) the tax 2) the currency exchange rate 3) shipping, on a transaction without exposing the unencrypted data to each of those services.[1] Homomorphic encryption schemes are malleable by design. This enables their use in cloud computing environment for
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR
