## Encryption[Home] This page outlines a wide range of methods used in encryption. ## Principles## A few basic principles**Brute Force (with increasing keys)**. Brute Force. This is an outline for brute force calculations.**Brute Force (with parallel processing)**. Brute Force. This is an outline for brute force calculations with multiple processors.**Brute Force (with increasing computing power)**. Brute Force (over the years). This is an outline for brute force calculations for increasing computing power.**Large numbers**. Large. With encryption we normally deal with large numbers. This example shows how we can display these.**GCD**. GCD. GCD is the greatest common divisor.**Binary multiplication (modulo 2) - GF(2)**. Bin. This outlines the calculation of binary multiplication (modulo 2).**Password strength**. Test. This outlines the strength of various passwords types.**Birthday attack**. Calc. This provides a simple example of the birthday attack.**Birthday attack (with Big Integers)**. Calc. This provides a simple example of the birthday attack.**Combinations and Permutations**. Calc. This provides an outline of combinations and permutations**Caesar codes**. Caesar. This outlines of the possible Caesar code shifts**Fermat's Little Theorem**. Fermat. This outlines Fermat's Little Theorem**Euler's Theorem (one value)**. Euler. This outlines Euler's Theorem**Euler's Theorem (two primes)**. Euler. This outlines Euler's Theorem**Inverse of n mod m**. Inv. This outlines the inverse of n mod m (used in RSA and Knapsack).**Inverse of n mod m (Euclidean method - Python)**. Inv. This outlines the inverse of n mod m (Euclidean method)**Inverse of n mod m (Euclidean method)**. Inv. This outlines the inverse of n mod m (Euclidean method)**Multiplicative group for \(Z_n\) [ \(Z^*_n \)]**. Z_n. This outlines Multiplicative group for \(Z_n\) [ \(Z^*_n \)]**Finite fields for modulo of prime numbers - GF\((p\)) - Galois field of \(p\) or with \(\mathbb{F}_p\)**. Finite. This page outlines finite fields for modulo of prime numbers - GF\((p\)) - Galois field of \(p\) or with \(\mathbb{F}_p\)**Chinese Remainder Theory**. CRT. This outlines Chinese Remainder Theory.**Chinese Remainder Theory (Alt code)**. CRT. This outlines Chinese Remainder Theory (Alt).**Exponentiation cipher**. Exp. This outlines Exponentiation cipher which provides the basis of several encryption methods, such as RSA and Pohlig-Hellman.**Convert keys to plain English**. English. Convert to plain English.**Convert ciphertext to plain English**. English. Convert ciphertext to plain English.**Fun Crypto Magic Tricks**. Magic. Outlines some fun magic tricks for crypto.**Session keys from HTTPs**. Go.**DNA storage**. DNA. DNA storage**Reed Solomon**. Reed. This outlines Reed Solomon coding.**Merkle Tree**. Merkle. This outlines a Merkle Tree.**Secure Remote Password protocol**. SRP. This outlines the Secure Remote Password protocol.**Formal proof (Power of 2)**. Proof. This outlines a formal proof using Z3.**Solver for Suduko**. Suduko. This is a solver for Suduko using Z3.**Rings and finite field**. Rings. This outlines some basic rules of rings and finite fields.**GZip**. GZip. Implementation of gzip.
## Solving discrete logs**Baby-step, Giant-Step Solving of Discrete Logs**. BSGS. This solves for x when we have \(h=g^x \pmod p\).**Pollard's rho algorithm for logarithms**. RHO. This solves for x when we have \(h=g^x \pmod p\).**Pohlig-Hellman's algorithm for logarithms**. Pohlig. This solves for x when we have \(h=g^x \pmod p\).**Order of a prime and factorization into small primes**. order. This calculates the order of a prime and factorizes into small primes.
## Factorizing**Difference of squares**. Diffsq. This factorizes using the difference of squares method.**Factors of integers**. Factors. Determine factors of an integer.**Pollard's ρ method (Factoring integers)**. Pollard. The Pollard ρ method factorises integers.**Elliptic Curve method (Factoring integers)**. Elliptic. The Elliptic Curve method factorises integers.**Simplify \(a^p \pmod N\)**. Go. Simplify the \(a^p \pmod N\) operation.**Smooth numbers**. Go. Outline of smooth numbers.**Quadradic residue (mod p)**. Go. Outline of quadradic residue (mod p).
## Proof-of-work**Time-locked encryption (hashing)**. Time-locked encryption. This creates a key with a given amount of work related to consecutive hashing.**Time-locked encryption (squaring)**. Time-locked encryption. This creates a key with a given amount of work related to squaring.**Time-locked encryption (cracking)**. Time-locked encryption. This creates a time-based challenge, without knowing the number of iterations of a hashed key.
## Random Number generators**Random number**. Random. This provides a 192-bit random number.**Random number (512-bit)**. Random. This provides a 512-bit random number which is used in 1024-bit encryption.**Gimli**. Gimli. This provides a 384-bit permutation that provides high levels of security and performance levels.**Linear Congruential Random Number Generator**. Calc. This provides a random number generator.**Lagged Fibonacci Generator**. Calc. This provides a Lagged Fibonacci Generator.**Mersenne Twister**. Calc. This provides a Mersenne Twister.**Xoroshiro128+**. Calc. This provides a random number generator using Xoroshiro128+.**Monte Carlo Test for randomness**. Monte. This outlines the Monte Carlo Test for randomness.**Key Entropy**. Entropy. Determines key entropy.**File Entropy**. Entropy. This outlines the calculation of Shannon's entropy.
## Prime numbersThe following are the tips related to prime numbers, which are a key principle in public-key encryption: **Find primes**. Find Prime Numbers. Many public key algorithms depend on primary number, which are difficullt to factorize when multiplied together. This program creates the ones from 1 to 1,000,000.**Prime numbers**. Prime. Prime numbers are used extensively in encryption, such as in the Diffie-Hellman method.**Test if prime?**testprime. This s for whether a number is prime.**Miller-Rabin Test for prime**. M-R. This outlines Miller-Rabin Test**Random Prime Number generator**. Primes. Generates two prime numbers of various bit sizes, and creates the product of these.**Prime Number sieve**. Sieve. Implementation of the fast method to generate a range of prime numbers.**Prime Number estimation**. Primes. Estimation of the number of prime numbers.**Prime Number estimation for bit size**. Primes. Estimation of the number of prime numbers for a given prime number bit size.
## Symmetric Key## Secret-key encryption methodsThe following are the tips related to encryption: **Block size**. Block. A block cipher uses a block size of a given number of bits. DES has a 64-bit block size, and AES has a 128-bit block size.**DES**. DES. DES encryption algorithm is block cipher and uses a 64-bit block and a 64-bit encryption key.**3DES**. 3DES. DES encryption algorithm is block cipher and uses a 64-bit block and a 64-bit encryption key (of which only 56 bits are actively used in the encryption process). Unfortunately, DES has been around for a long time, and the 56-bit version is now easily crackable (in less than a day, on fairly modest equipment). An enhancement, and one which is still fairly compatible with DES, is the 3-DES algorithm. It has three phases and splits the key into two. Overall the key size is typically 112 bits (2x54 bits - with a combination of the three keys - of which two of the keys are typically the same). The algorithm is EncryptK3( DecryptK2( EncryptK1(message), where K1 and K3 are typically the same (to keep compatibility).**3DES (with clear text keys)**. 3DES. This example generates the 3DES key clear text keys.**RC2**. RC2. RC2 ("Rivest Cipher") is a block cipher and is seen as a replacement for DES. It was created by Ron Rivest in 1987, and is a 64-bit block code and can have a key size from 40 bits to 128-bits (in increments of 8 bits). The 40-bit key version is seen as weak, as the encryption key is so small, but is favoured by governments for export purposes, as it can be easily cracked. In this case, the key is created from a Key and an IV (Initialisation Vector). The key has 12 characters (96 bits), and the IV has 8 characters (64 bits), which go to make the overall key.**AES**. AES. AES (or Rijndael) is a new block cipher, and is the new replacement for DES, and uses 128-bit blocks with 128, 192 and 256-bit encryption keys. It was selected by NIST in 2001 (after a five-year standardisation process). The name Rijndael comes from its Belgium creators: Joan Daemen and Vincent Rijmen.**AES (Python)**. AES. This implements AES using Python for a number of AES modes.**Blowfish**. Blowfish. Bruce Schneier created Blowfish with a general-purpose private key block cipher encryption algorithm.**Blowfish (with CBC)**. Blowfishcbc. With CBC we split the message into blocks and encrypt each block. The input from the first stage is the IV (Initialisation Vector), and the input to the following stages is the output from the previous stage. In this example we will use Blowfish to encrypt, using CBC.**Twofish**. Twofish. Bruce Schneier created Twofish with a general-purpose private key block cipher encryption algorithm.**Skipjack**. Skip jack. Skipjack is a block cipher, using private-key encryption algorithm, and designed by NSA.**Camellia**. Camellia. Camillia is a block cipher created by Mitsubishi and NTT.**RC5**. RC5. RC5 is a block cipher with variable key size, block size and rounds.**RC6**. RC6. RC6 is a block cipher with variable key size, block size and rounds.**Pohlig-Hellman**. Pohlig. This uses the Pohlig-Hellman algorithm.**All-or-nothing**. AONT. The All-or-nothing created messages, of which all the messages are required to rebuild the original message.**Range of methods**. OpenSSL. This includes the encryption of a wide range of methods.**SSL**. SSL. This outlines the debug information returned from an SSL/TLS connection.**Heartbleed (Theory)**. Heartbleed. This outlines the Heartbleed vulnerability.**Heartbleed (Demo)**. Heartbleed. This provides a demo of the Heartbleed vulnerability.**Heartbleed (Network)**. Heartbleed. This provides a capture of network traffic and IDS detection for Heartbleed.**Heartbleed (View Session)**. Heartbleed. This provides a capture of session information.**Red Pike**. Red Pike. This provides an implementation of Red Pike.**Feistel Ciphers**. Feistel Ciphers. This provides an implementation of a Feistel Cipher.
## Token-based encryption (Fernet)**Fernet**. Fernet. This outlines Fernet encryption**Fernet with PBKDF2 key generation**. Fernet (PBKDF2). This outlines Fernet encryption with PBKDF2 key generation**Fernet with key rotation**. Fernet (Key rotation). This outlines Fernet encryption with key rotation.**Fernet (Auto key)**. Fernet. This outlines Fernet encryption**Fernet (Decoding token)**. Fernet Decode. This outlines Fernet decoding of the token
## Google Tink**Google Tink (Symmetric key)**. Google Tink (Symmetric). Google Tink is a new cryptography library for secure coding and outlines the usage of symmetric key encryption.**Google Tink (MAC)**. Google Tink (MAC). this outlines the integration of MACs into Google Tink**Google Tink (Digital Signature)**. Google Tink (Digital Signature). This outlines the integration of digital signatures into Google Tink**Google Tink (Hybrid Encryption)**. Google Tink (Hybrid Encryption). This outlines the integration of hybrid encryption into Google Tink
## Format Preserving Encryption**Format Preserving Encryption**. FPE. This outlines Format Preserving Encryption.**Honey Encryption**. Honey. This outlines Honey encryption.
## Stream ciphers**ChaCha20**. ChaCha20. ChaCha is a**stream cipher**and is three-times faster than AES.**Salsa20**. Salsa20. Salsa20 is a**stream cipher**and is three-times faster than AES.**RC4**. RC4. RC4 is a**stream cipher**used in WEP (in wireless encryption).**RC4 (repeating IV)**. RC4. This illustrates how we can EX-OR two values with the same IV value.**RC4 key generation**. RC4. This illustrates how we generate the key.**Affine**. Affine. Affine is a**stream cipher**which uses an equation to encrypt.**ARIA**. ARIA. ARIA is a**stream cipher**and has a similar operation to AES but has two S-boxes.
## Padding Methods**Padding (AES)**. Padding. This outlines how data is padded for AES.**Padding (DES)**. Padding. This outlines how data is padded for DES.**Padding (DES) with CBC**. Padding. This outlines how data is padded for DES for CBC.
## Mobile networks (crypto)**A5/1**. A5. This uses the A5/1 algorithm.**A5/3 (Kasumi)**. Kasumi. This uses the A5/3 (Kasumi) algorithm.**Snow**. Snow. This uses the Snow stream cipher algorithm.**Zuc**. Zuc. This uses the Zuc stream cipher algorithm.
## Public Key## Public-key encryption (RSA)The following are the tips related to encryption: **RSA**. Simple RSA Calculation. This is a simple tutorial for RSA key generation.**RSA**. RSA Encryption. This uses RSA key generation and encryption.**RSA (range of keys)**. RSA Encryption. This uses RSA key generation and encryption using a range of key sizes from 512-bits up to 16,384 bit.**RSA with Commutative Keys**. Comm. Commutative encryption allows Bob and Alice to encrypt in any order, and then they can decrypt in any order.**Commutative Keys (with SRA - Shamir, Rivest and Aldeman)**. Comm. Commutative encryption examples.**RSA Decrypt**. RSA. This outlines RSA decryption.**RSA -partially homomorphic cryptosystem: Multiply**. RSA. This outlines RSA as a partially homomorphic cryptosystem for multiplication.**RSA -partially homomorphic cryptosystem: Divide**. RSA. This outlines RSA as a partially homomorphic cryptosystem for integer divide (and using the extended euclidean method for the divide).**Public Key (ASCII format)**. RSA Public Key. Often we have to convert the public key to an ASCII format.**RSA with Weak Prime Numbers (RSALib)**. copper. Weak generation of prime numbers within RSA (using RSALib).**RSA Optimal asymmetric encryption padding (RSA-OAEP)**. RSA OAEP. This uses RSA encryption and integrates a padding scheme. It was defined by Bellare and Rogaway, and has been standardized in PKCS#1 v2 and RFC 2437.**Montgomery reduction algorithm**. Montgomery. This performs multipication using Montgomery reduction algorithm.**Multiply and Square algorithm**. MSM. This performs exponent calculation.
## Public-key encryption (Elliptic Curve)The following are the tips related to encryption: **Elliptic Curve**. Elliptic Curve. Elliptic Curve is a public key method which can also be used to generate a shared key.**Elliptic Curve - Point addition**. Elliptic Curve Point Addition. This shows the addition of two points on an elliptic curve.**First 20 Elliptic Curve points in Finite Field**. Elliptic Curve points. Locating the first 20 points in an elliptic curve in a finite field.**First 20 Elliptic Curve points in Finite Field (plot)**. Elliptic Curve points (plot). Locating the first 20 points in an elliptic curve in a finite field.**First 20 Elliptic Curve points in Finite Field for common curves**. Elliptic Curve points. Locating the first 20 points in an elliptic curve in a finite field for curves including Curve25519 (Tor), secp256k1 (Bitcoin) and NIST P-256.**Elliptic Curve - Blinding factor**. Elliptic Curve Blinding. This shows the addition of transactions with a blinding factor.**Elliptic Curve Diffie-Hellman (ECDH) with simple parameters**. ECDH. Elliptic Curve Diffie Hellman is used to create a shared key.**Elliptic Curve Diffie-Hellman (ECDH) with secp256k1**. ECDH. Elliptic Curve Diffie Hellman is used to create a shared key.**Elliptic Curve Diffie-Hellman (ECDH) with different curves**. ECDH. Elliptic Curve Diffie Hellman is used to create a shared key using different curves, including secp256k1, p192 and p224.**Elliptic Curve Digital Signature Algorithm (ECDSA)**. ECDSA. Elliptic Curve Digital Signature Algorithm (ECDSA) is used to sign data.**Elliptic Curve Digital Signature Algorithm (ECDSA) with core operations**. ECDSA. Elliptic Curve Digital Signature Algorithm (ECDSA) is used to sign data with core operations.**Edwards-curve Digital Signature Algorithm (EdDSA) with core operations**. EdDSA. Edwards-curve Digital Signature Algorithm (EdDSA) is used to sign data with core operations.**Elliptic Curve (Plot)**. Elliptic Curve (Plot). Elliptic Curve is a public key method which can also be used to generate a shared key. This page outlines a graphic of the curve.**Elliptic Curve (Real plots)**. Elliptic Curve (Real plot). This provides a range of well-defined elliptic curve plots.**Elliptic Curve (Keys)**. Elliptic Curve (Keys). Elliptic Curv is a public key method. This page outline the generation of ECC keys in Bitcoin.**Elliptic Curve Integrated Encryption Scheme (ECIES with Rabbit Encryption)**. Elliptic Curve (Encryption). Elliptic Curv is a public key method. This page outlines how we can use it to encrypt with Rabbit (a light-weight stream cipher).**Elliptic Curve Integrated Encryption Scheme (ECIES with AES Encryption)**. Elliptic Curve (Encryption). Elliptic Curv is a public key method. This page outlines how we can use it to encrypt with AES.**Hash to Elliptic Curve**. Hash to ECC. In this we match a value to the nearest point on an elliptic curve.
## Crypto Pairing**Simple pairing**. Key pairing. This page outlines simple examples of pair-based cryptography.**Tripartite Diffie Hellman with Pairing**. Tripartite. This page outlines Tripartite Diffie Hellman with pairing-based cryptography.**Key pairing over BN-curves**. Key pairing over BN-curves. This page demonstrates key pairing over BN-curves.**Shared key over BN-curves**. Shared key over BN-curves. This page demonstrates key generation over three parties with pairing over BN-curves.**IBE using elliptic curves**. IBE using elliptic curves. This page demonstrates IBE.**Boneh–Lynn–Shacham (BLS) signature**. BLS. Example of BLS signature.**Camenisch-Lysyanskaya Signatures**. CL. Example of Camenisch-Lysyanskaya Signatures.**Attributed-based Encryption (ABE)**. ABE. Example of ABE.**CP-Attributed-based Encryption (CP-ABE)**. ABE. Example of CP-ABE using Java.
## Public-key encryption (Others)The following are the tips related to encryption: **PGP Encryption**. PGP. This uses PGP encryption.**PGP Encryption (Key Generation - RSA) with Node.js**. PGP Keys. This uses PGP encryption with Node.js.**PGP Encryption (Key Generation - Elliptic Curve) with Node.js**. PGP Keys. This uses PGP encryption with Node.js.**DSA**. DSA Encryption. This uses DSA key and fingerprint generation.**ElGamal**. ElGamal. ElGamal is a public key method which uses discrete logarithms.**Selecting G in ElGamal**. G in ElGamal. ElGamal is a public key method which uses discrete logarithms.**Knapsack Encryption (Theory)**. Knapsack. This outlines Knapsack public encryption**Knapsack Encryption (Example)**. Knapsack. This outlines Knapsack public encryption**Paillier crypto system (JavaScript)**. Paillier. Outlines Paillier crypto system using JavaScript.**Simple Paillier example (Python)**. Paillier. Outlines a simple Paillier crypto system using Python.**Identity Based Encryption (IBE)**. IBE. Outlines Identity Based Encryption.**Cramer-Shoup**. Cramer-Shoup. Outlines Cramer-Shoup public key encryption.**Goldwasser–Micali method: probablitistic encryption**. Goldwasser–Micali. The uses the Goldwasser–Micali and which is a probabilistic encryption met
## Quantum-robust Public Key (Key exchange and encryption)**McEliece cryptosystem**. mce. Outlines McEliece cryptosystem.**Lattice Encryption**. Lattice. This outlines Lattice encryption.**Unbalanced Oil and Vinegar (UOV)**. UOV. Outlines Unbalanced Oil and Vinegar (UOV) cryptosystem.**Generalised Merkle Signature Scheme**. GMSS. Outlines Generalised Merkle Signature Scheme.**Very simple LWE**. LWE. Outlines Learning With Errors.**BGV - (Ring LWE)**. BGV. Outlines BGV.**Public Key Encryption with Learning With Errors (LWE)**. LWE. Outlines public key encryption with Learning With Errors (LWE).**Multibit Encryption with Learning With Errors (LWE)**. LWE. Outlines multibit Encryption encryption with Learning With Errors (LWE).**Homomorphic Encryption with Learning With Errors (LWE)**. LWE. Outlines homomorphic encryption with Learning With Errors (LWE).**Ring Learning With Errors for Key Exchange (RLWE-KEX)**. LWE. Outlines RLWE-KEX.**LWE and Ring LWE**. LWE. Outlines Learning With Errors and RLWE.**NewHope for Key Exchange**. NewHope. Outlines NewHope for shared key generation.**Lattice Encryption: NTRU (Python)**. NTRU. Outlines how NTRU operates for key generation.**Lattice Encryption: Mod P polynomial operations**. Poly. Outlines Mod P polynomial operations.**Supersingular Isogeny Diffie-Hellman for Key Generation**. SIDH. Outlines SIDH.
## Quantum-robust Public Key (Hash-based signature)**Lamport Signatures**. Lamport. Outlines Lamport signatures.**Winternitz Signatures**. Winternitz. Outlines Winternitz signatures.**Merkle Signatures**. Merkle Signature. Outlines Merkle signatures.**Hash to Obtain Random Subset (HORS) Signatures**. HORS Signature. Outlines Hash to Obtain Random Subset (HORS) signatures.**SPHINCS**. SPHINCS. Outlines SPHINCS.
## Hashing## Hash functionsThe following are the tips related to hashing: **MD5 and SHA-1**. Hash. MD5 and SHA-1 methods produce a hash signature, and are the two of the most widely used methods. The MD5 algorithm has been shown to have weaknesses, and a collision of message hashes has been shown to occur in less than one day. An MD5 signature has 128 bits, an SHA-1 signature has 160 bits, and an SHA-256 signature has 256 bits.**MD5 Cracking**. Hash Cracker. MD5 has a 128-bit signature and can be cracked using rainbow tables. This page tries to crack the MD5 signature.**MD5 and SHA-1 (to Base-64)**Hash. MD5 and SHA-1 produces a hash signature, and the output is typically shown in a hex format or a Base-64. In this example the output is converted into a**Base-64**format.**MD5 and SHA-1 (to Base-64) with salt**Salt. It is possible to add salt to the MD5 algorithm, to mix it up a little.**MD2 and MD4**MD2/4. The MD2 and MD4 hashing functions were developed by Prof Ronald Rivest in 1989 and 1990, respectively. They both produce a 128-bit hash, but have been shown be vulnerable to attack (see the Collision section in the page).**Murmur and FNV**Murmur and FNV. While hashing methods such as MD5 and SHA-1 use crypto methods, the Murmur and FNV hashes uses a non-cryptographic hash function. This can be used for general hash-based lookup and was designed by Austin Appleby. It has good performance compared with other hashing methods.**Bloom Filter**Bloom filter. A Bloom filter goes a probabilistic method of determining if an element is in a data structure, using indexed hashing methods.**LM Hash**. LM Hash. This is an LM Hash Calculator. LM Hash is used in many versions of Windows to store user passwords that are fewer than 15 characters long.**APR1**. APR1. This produces an APR1 hash signature for a password.**phpass**. phpass. This produces a phpass hash signature for a password.**LDAP**. LDAP. This produces a LDAP hash signature for a password.**Chaffing**. Chaffing. This produces a keyless system.**Peason**. Pearson. This uses a non-crypto hash.**Whirlpool**. Whirlpool. Whirlpool is a 512-bit cryptographic hash function and was created by Vincent Rijmen (one of the AES creators) and Paulo Barreto, in 2000.**RIPEMD (RACE Integrity Primitives Evaluation Message Digest) and GOST**. RIPEM160. RIPEMD is a 128-bit, 160-bit, 256-bit or 320-bit cryptographic hash function, and was created by Hans Dobbertin, Antoon Bosselaers, and Bart Preneel. It is used on TrueCrypt and is open source. The 160-bit version is seen as an alternative to SHA-1, and is part of ISO/IEC 10118**Tiger**. Tiger. Tiger is a 192-bit hash function and was designed by Ross Anderson and Eli Biham in 1995. It is often used by clients within Gnutella file-sharing networks and does not suffer from known attacks on MD5 and SHA-0/SHA-1. Tiger2 is an addition, in which the message is padded with a byte of 0x80 (in a similar way to MD4, MD5, and SHA), whereas in Tiger it is 0x01. Otherwise, the two methods are the same in their operation.**WPA-2 hash**. WPA-2 hash. Implements SHA-2 hash.**Hash benchmark**. Benchmark. Benchmarks some hashing methods.**Hash values**. Hashes. Outlines hash method.**Open SSL Hash passwords**. Open SSL Passwords. This creates a hash value which has salt using a range of methods.**Detecting hash types**. Hash type. This detects has values.
## Similarity hashesThe following are the tips related to similarity hashing: **Similarity hash (Charikar similarity)**Charikar similarity. The Charikar similarity is used to find similarities between strings, files and metadata.**Similarity hash (Nilsimsa similarity)**Nilsimsa. The Nilsimsa similarity is used to find similarities between spam emails.**Minhash (Jaccard similarity)**Jaccard similarity. The Minhash method is used to find similarities between strings, files and metadata.**String enthropy**String enthropy. Measurement of the entropy of strings.
## SHA-3 contendersThe following are the tips related to Key derivation hashing: **SHA-3**. SHA-3. SHA-3 was known as Keccak and is a hash function designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche. MD5 and SHA-0 have been shown to be susceptible to attacks, along with theoretical attacks on SHA-1. NIST thus defined there was a need for a new hashing method which did not use the existing methods for hashing, and setup a competition for competing algorithms. In October 2012, Keccak won the NIST hash function competition and is proposed as the SHA-3 standard. It should be noted that it is not replacement SHA-2, which is currently a secure method. Overall Keccak uses the sponge construction where the message blocks are XORed into the initial bits of the state, and then inevitably permuted.**SHA-3, Keccak and SHAKE**. SHA-3. Implements SHA-3, Keccak and SHAKE (SHA-3 winner).**Blake and Blake 2**. Blake. Implements Blake and Blake 2 (SHA-3 contender).**Skein**. Skein. Implements Skein (SHA-3 contender).**Grøstl**. Grøstl. Implements Grøstl (SHA-3 contender).
## Key derivation hashingThe following are the tips related to Key derivation hashing: **Bcrypt**. Bcrypt. This creates a hash value which has salt.**PBKDF2**. PBKDF2. The PBKDF2 method created a salted hashed value, and which is used to generate the main key for TrueCrypt.**PBKDF2 (Part 2)**. PBKDF2. The PBKDF2 method created a salted hashed value, and which is used to generate the main key for TrueCrypt.**Scrypt**. Scrypt. The Scrypt method created a salted hashed value using iterations and salting.**Argon2**. Go. Outline of Argon2.**Balloon**. Go. Outline of Balloon.**HKDF**. Go. Outline of HKDF (HMAC Key Derivation Function).**Double ratchet**. Go. Outline of double ratcheting.**SPAKE2**. Go. Outline of SPAKE2.
## Non-crypto/fast hashingThe following are the tips related to non-crypto hashing: **xxHash**. xxHash. xxHash is one of the fastest hashing methods.**FNV**. FNV. FNV is one of the fastest hashing methods.**Murmur**. Murmur. Murmur is one of the fastest hashing methods.**Spooky**. Spooky. Spooky is a fast hashing method.**Siphash**. Siphash. Siphash is a fast hashing method.**A perfect hash**Perfect hash. This is a non-crypto hash which optimizes the hash value.
## One Time Passwords/Time StampsThe following are the tips related to hashing: **One Time Passwords**. One Time. This allows a new unique password to be created each instance, based on an initial seed.**Timed One Time Password (TOTP)**. Timed One Time Password. This allows a new unique passcode to be created each instance, based on an initial seed for a given time window. We will use a five second window in this case, where a new passcode is generated every five seconds, based on an initial seed of a pass phrase.**Hashed One Time Password (HOTP)**. Hashed One Time Password. This allows a new unique passcode to be created each instance, based on a counter value and an initial seed.**Time Stamp Protocol**. TSP. This creates a time stamp for data.**HOTP and TOTP (Python)**. OTP. This creates hashed passwords.
## Message authentication codes (MACs)**OMA Digest**OMA. Open Mobile Alliance Device Management (OMA DM)**MAC Triple-DES**. MAC3DES. MACs can be used to authenticate a message, as a key is required to determine the hash value. With this the sender computes the hash with a secret key and sends to the receiver, where the receiver then calculates the hash of the message, and uses the secret key. If the hash received is the same as the computed one, the message has not been tampered with. The key size can be 8, 16 or 24 bytes. In this case, 24 bytes are used, and produces a hash of 8 bytes (64 bits), using the TripleDES encryption method.**HMAC**. HMAC. HMAC is a message authentication code (MAC) and can be used to verify the integrity and authentication of a message. It involves hashing a message with a secret key. As with any MAC, it can be used with a standard hash function, such as MD5 or SHA-1, which results in methods such as HMAC-MD5 or HMAC-SHA-1. As with any hashing function, the strength depends on the quality of the hashing function, and the resulting number of code bits. Along with this the number of bits in the secret key is a factor.**HMAC (Python)**. HMAC. HMAC is a message authentication code (MAC).
## Key Exchange## Key interchange/generationThe following relates to key interchange: **Diffie-Hellman**. Diffie-Hellman Calculation. Diffie-Hellman is a standard method of Alice and Bob being able to communicate, and end up with the same secret encryption key. It is used in many applications.**Diffie-Hellman (Real example)**. Diffie-Hellman Real. Diffie-Hellman is a standard method of Alice and Bob being able to communicate, and end up with the same secret encryption key. It is used in many applications.**Diffie-Hellman (Python)**. Diffie-Hellman. Diffie-Hellman is a standard method of Alice and Bob being able to communicate, and end up with the same secret encryption key. It is used in many applications.**Diffie-Hellman (pre-compute)**. Diffie-Hellman (pre-compute). Many sites use the same prime numbers, which can then be cracked with a pre-computing attack.**Key generation**. Key gen. This will generate keys for different methods based on a passphrase.**Diffie-Hellman (Man-in-the-middle)**. DF. This outlines the man-in-the-middle method for Diffie-Hellman.**Ephemeral Diffie-Hellman with RSA (DHE-RSA)**. DHE. This outlines DHE.**Curve25519**. Curve25519. This outlines Curve25519, which is used in the Tor network.
## Trust Centres**Simple Key Distribution Centre**. KDC. This implements a simple KDC.**Kerberos**. Kerberos. This will implement a Kerberos method of generating a shared key.
## Digital Certificates## Digital CertificatesThe following are the tips related to digital certs: **Digital Certificate**Digital Cert.**Digital Certificate (PFX)**Digital Cert.**Certificate with Public/Private key**. Cert. This includes the creation of the digital certificate.**SSL**. SSL. This outlines the debug information returned from an SSL/TLS connection.**Cracking certificates**. Crack. This defines the cracking of digital certificates.**Certificates (OpenSSL)**. View. This defines the viewing of digital certificates.**Code Signing Request (CSR)**. View. This defines the reading the CSR.**Generating key pair**. View. This defines creating a 512-bit keypair.
## Light-weight Crypto## Light-weight crypto**XTEA**. XTEA. XTEA is a light-weight**block cipher**.**PRESENT**. PRESENT. Present is a light-weight**block cipher**.**SIMON**. SIMON. SIMON is a light-weight**block cipher**.**SPECK**. SPECK. SPECK is a light-weight**block cipher**.**CLEFIA**. CLEFIA. CLEFIA is a light-weight**block cipher**.**LED**. LED. LED is a light-weight**block cipher**.**Enocoro**. Enocoro. Enocoro is a light-weight**stream cipher**.**Grain**. Grain. Grain is a light-weight**stream cipher**.**Trivium**. Trivium. Trivium is a light-weight**stream cipher**.**Mickey**. Mickey. Mickey is a light-weight**stream cipher**.**Rabbit Keystream Test**. Rabbit keystream. Rabbit is a light-weight**stream cipher**.**Rabbit Encryption/Decryption**. Rabbit encryption. Rabbit is a light-weight**stream cipher**.**SPONGENT**. SPONGENT. SPONGENT is a light-weight**hashing function**.**Lesamnta-LW**. Lesamnta-LW. Lesamnta-LW is a light-weight**hashing function**.**QUARK**. QUARK. QUARK is a light-weight**hashing function**.**PHOTON**. PHOTON. PHOTON is a light-weight**hashing function**.**Chaskey (MAC)**. Chaskey. Chaskey is a light-weight**MAC function**.**ELLI**. ELLI. ELLI is a light-weight**asymmetric**encryption method.
## ZKP/Homomorphic## Homomorphic Encryption**Simple Homomorphic Cipher**. Hom. This outlines a Simple Homomorphic cipher.**Simple Homomorphic Cipher (Python)**. Hom. This outlines a Simple Homomorphic cipher with Python.**Full Homomorphic Cipher for 2-bit Adder**. Adder. This outlines a Simple Homomorphic cipher for a 2-bit adder with DGHV.**Full Homomorphic Cipher for Full Adder**. Full Adder. This outlines a Simple Homomorphic cipher for a full adder with DGHV.**Full Homomorphic Cipher for 4-bit Adder**. Adder. This outlines a Simple Homomorphic cipher for a 4-bit adder with DGHV.**Full Homomorphic Cipher for 4-bit Adder/Subtractor**. Subtract. This outlines a Simple Homomorphic cipher for a 4-bit adder/subtractor with DGHV.**Full Homomorphic Cipher to determine if Bob is older**. Older. This outlines a Simple Homomorphic cipher to determine if Bob is older than Alice.**Full Homomorphic Cipher to determine matching password**. Password. This outlines a Simple Homomorphic cipher to determine if a password matches**Full Homomorphic Cipher to XOR two integers**. X-OR. This outlines a Simple Homomorphic cipher to X-OR two integers**Full Homomorphic Cipher for Millionaire's Problem**. Millionaire. This outlines a Simple Homomorphic cipher for the Millionaire's Problem**Full Homomorphic Cipher with a Public Key**. Public key. This outlines a Simple Homomorphic cipher using a public key**Multiplying with RSA**. Multiply. This outlines the multiplication of ciphers with RSA.
## Zero-knowledge proofGit code here]: **Zero-knowledge Proof: Proving age with hash chains**. Age. Proving someone's age, without revealing their age.**Zero-knowledge proof (discrete logs)**. ZKP. Outlines zero-knowledge proof.**Zero-knowledge proof (zkSnark - Hidden Homomorphic)**. ZKP. Outlines zero-knowledge proof.**Zero-knowledge proof (zkSnark - Blind evaluation problem)**. ZKP. Outlines zero-knowledge proof.**Zero-knowledge proof (Fiat-Shamir)**. ZKP. Outlines zero-knowledge proof.**Zero-knowledge proof (Fiat-Shamir) with password**. ZKP. Outlines zero-knowledge proof with a password hash and an inverse power.**Zero-knowledge proof (Feige-Fiat-Shamir)**. ZKP. Outlines zero-knowledge proof using the Feige-Fiat-Shamir method.**Zero-knowledge proof (non-interactive random oracle access)**. ZKP. Non-interactive random oracle access for the Fiat-Shamir heuristic.**Zero-knowledge proof (GQ)**. GQ. Outlines zero-knowledge proof with Guillou-Quisquater (GQ) identification scheme.**Zero-knowledge proof (Schnorr)**. Schnorr. Outlines zero-knowledge proof with Schnorr identification scheme.**Zero-knowledge proof (Graphs)**. ZKP. Outlines zero-knowledge proof using graphing methods.**Voting with Paillier crypto system**. ZKP. Outlines voting with Paillier crypto system.**Oblivious transfer**. OT. Oblivious transfer.**Millionaire's Problem**. Mill. Yao's Millionaire Problem.**RAPPOR**. RAPPOR. Outlines RAPPOR (Randomized Aggregatable Privacy-Preserving. Ordinal Response) which allows for privacy in gathered data.**A Fair and Open Election**. Election. Outline of a Fair and Open Election process.**Diffie-Hellman with Zero-knowledge proof**. Diffie. Example of ZKP with Diffie-Hellman key exchange.**Dragonfly (used in WPA-3)**. Dragonfly. The Dragonfly protocol is used in WPA-3.**Pedersen Commitment**. Pedersen. The Pedersen Commitment.**EC-VOPRF (Elliptic Curve Verifiable Oblivious Pseudo-Random Function)**. EC-VOPRF. EC-VOPRF.
## Secure Function Evaluation**Scrambled circuits**. Scrambled. Scrambled circuits - SFE.**Fair coin flip**. ZKP. Outlines how a fair coin flip can be created, without a trusted verifier.**SFE**. SFE. SFE can be used to verify a value, without releasing the original data. For example, if we have a voting competition with Bob, Alice, and Carol. Bob, Alice and Carol vote, and they want to keep their votes secret, but they need to calculate the overall total. Typically an independent person would tally up the votes, but what if they do not trust anyone. This is where SFE comes in, where they can calculate the total with knowing the votes from the others.
## Cryptocurrencies and Blockchain## Bitcoins**Base58 (used in Bitcoins)**. Base58.**Bitcoin keys**. Bitcoin keys.**Bitcoin signing**. Bitcoin signing.**Bitcoin details**. Bitcoin details.**Vanity Bitcoin Address Generation**. Generating addresses.**Split Vanity Bitcoin Address Generation Proof**. Generating addresses proof.**Schnorr signature**. Schnorr. This is an implementation in node.js.**Schnorr signature with multiple public keys**. Schnorr. This is an implementation in node.js for multiple public keys.
## Blockchain**Introduction to Blockchain**. Go.**Blockchain: Adding Maths Functions**. Go.**Blockchain: Hello World!**. Go.**Blockchain: Simple Purchasing System**. Go.**Blockchain: Blocks, transactions and writing data**. Go.**Blockchain: Getting transactions**. Go.**Blockchain: Viewing the blockchain**. Go.**Blockchain: Contracts and Addresses**. Go.**Blockchain:Cracking Wallets**. Go.**Schnorr multi-signatures**. Go.**Viewing Ethereum blockchain with Python**. Go.**Viewing Bitcoin blockchain with Python**. Go.**Viewing Cryptocurrency API with Python**. Go.**IOTA Trytes**. Trytes. `This outlines Trytes, as used in IOTA.
## Additional## Ciphers CrackingThe following are examples of cipher cracking: **Index of Coincidence (IC)**. IC. This outlines the Index of Coincidence (IC).**Kasiski examination**. Kasiski. This outlines Kasiski examination.**Vigenère Calculator Crack**. Vig. This outlines Vigenère Crack.**Frequency Analysis**. Freq. This involves frequency analysis of text.**Frequency Analysis (Example)**. Freq. This involves frequency analysis of text.
## Encryption cracking**RSA Challenge Generator**. RSA. This provides a value for e and N, and gives the cipher, and you must crack it by finding d.**RSA Crack (same message, different e)**. RSA. This outlines the usage of modified e value and the same message and N value.**RSA Crack**. RSA. This outlines the factorisation of the N value in the RSA method.**RSA Crack 2**. RSA. This outlines of the cracking of RSA when \(M^e\) is less than N.**RSA Crack 2 (CRT)**. RSA. This outlines of the cracking of RSA with Chinese Remainder Theorem.**RSA - chosen cipher attack**. RSA. This outlines of the cracking of RSA with a chosen cipher attack.**RSA - blinding attack**. RSA. This outlines the RSA blinding attack, which tricks a user to sign a message.**RSA - Bleichenbacher's attack**. RSA. This outlines the RSA Bleichenbacher's attack.**RSA - Cracking the private key**. Go.**AES Crack (Copy-and-paste)**. AES. This outlines of the cracking of AES with copy-and-paste attacks.**AES Crack (Brute force)**. AES. This outlines of the cracking of AES with common passwords.**AES Crack (Non-random numbers)**. AES. This outlines of the cracking of AES with non-random numbers.**Differential Cryptanalysis (AES)**. Cryptanalysis. This provides an implementation of differential cryptanalysis for the AES cipher.**Differential Cryptanalysis (Hashing)**. Cryptanalysis. This provides an implementation of differential cryptanalysis for hashing methods.
## Authenticated Encryption**AES CCM**. AES CCM. AES is a secret key encryption method, and does not provide authentication of the message. CCM can add to AES by providing an authentication and encrypt block cipher mode [CCM - Counter with CBC-MAC]]. It has two parameters: M which indicates the indicates the size of the integrity check value (ICV) and L which defines the size of the length field in octets.
## Data Integrity**CRC-32**. CRC-32. CRC is one of the most reliable error detection schemes and can detect up to 95.5% of all errors. The most commonly used code is the CRC-32 standard code which is defined by the CCITT, and will give a 32-bit CRC signature (8 hex characters). This signature is normally appended onto the data, and then checked when the data is read. If the CRC-32 check differs from the stored value, there is likely to be an error in the data.
## JavaScript encryption**CryptoJS**. CryptoJS. Various crypto methods in the browser.**CryptoJS (in node.js)**. CryptoJS (Node.js). Various crypto methods in the browser.**ChaCha20 and Poly1305**. ChaCha. ChaCha20 and Poly1305.**Random number generator**. Rand. Random number generator**AES**. AES. AES encryption**Hash**. Hash. Hashing using JavaScript**RSA**. RSA. RSA using JavaScript**Password generation/hashing**. Hashing. Password generation/hashing using JavaScript**CMS**. CMS. Encapsulating with CMS**ECDH**. ECDH. Elliptic Curve Diffie Hellman**ECDSA with node.js**. ECDSA. ECDSA with node.js.**EdDSA with node.js**. EdDSA. EdDSA with node.js.**JSON Web Signatures and JSON Web Tokens**. Web Tokens. JSON Web Tokens with node.js.**Symmetric encryption with node.js**. Crypto. AES with node.js.**Hashing with node.js**. Hashing. Hashing with node.js.**Diffie-Hellman with node.js**. DH. DH with node.js.**Diffie-Hellman with node.js (random prime)**. DH. DH with node.js (random prime).**ECDH with node.js**. ECDH. ECDH with node.js.**Ethereum with node.js**. Ethereum. Ethereum with node.js.**FPE with node.js**. FPR. FPE with node.js.**Puny with node.js**. Puny. Puny character format with node.js.**Merkle Tree with node.js**. Merkle. Merkle Tree with node.js.**PATRICIA trie**. PATRICIA. Example of using PATRICIA (and which is used in Ethereum).**Boneh–Lynn–Shacham (BLS) signature**. BLS. Example of BLS signature.**Fortuna with node.js**. Fortuna. Fortuna random numbers with node.js.
## Theshold encrptionThe following are the tips related to associated material: **Shamir's Secret Sharing (creator)**. Shamir.**Shamir's Secret Sharing (decrypt)**. Shamir.**ECC threshold encrytion**. ECC.
## AssociatedThe following are the tips related to associated material: **Web.config**. Web.config. The following is a demonstration of the Web.config file in ASP.NET. Alt Demo: Security Software (ASP.NET)**Role-based security**. Role-based. The Microsoft .NET environment now offers an excellent alternative to Java in producing portable and secure code. It uses a role-based approach for user authentication, with the WindowsIndentity class, where the GetCurrent() method can be used to get the current user. The WindowsPrincipal class can then be used to apply the role.**SSH**. SSH. An overview of SSH.
## Data Communications**Binary multiplication (modulo 2) - GF(2)**. Bin. This outlines the calculation of binary multiplication (modulo 2).**Binary division (modulo 2) - GF(2)**. Bin. This outlines the calculation of binary divide (modulo 2).**Hamming distance**. Bin. This outlines the calculation of the Hamming distance.**Longitudinal/vertical redundancy checks (LRC/VRC)**. LRC. This outlines the calculation of the LRC.**Bit errors**. Bits. This outlines the calculation of bit error.**Block parity**. Bits. This outlines the calculation of block parity.**Hamming (7,4) code**. Hamming. This outlines the single bit error correcting code.
## PresentationThe following is an outline presentation on encryption: |