0% found this document useful (0 votes)
27 views6 pages

Mathematical Foundations

The document provides an overview of cryptography, detailing its mathematical foundations and core algorithms. It covers types of cryptography including symmetric, asymmetric, and hash functions, along with key algorithms like AES and RSA. Additionally, it discusses digital signatures, key exchange methods, modern use cases, and essential security considerations.

Uploaded by

naourasfahd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views6 pages

Mathematical Foundations

The document provides an overview of cryptography, detailing its mathematical foundations and core algorithms. It covers types of cryptography including symmetric, asymmetric, and hash functions, along with key algorithms like AES and RSA. Additionally, it discusses digital signatures, key exchange methods, modern use cases, and essential security considerations.

Uploaded by

naourasfahd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Cryptography: Mathematical Foundations and

Core Algorithms
Version: 1.0
Last Updated: [Date]
Prepared for: Developers, security engineers, researchers, and students

1. What Is Cryptography?
Cryptography is the science of securing information and communications using
mathematical techniques. It ensures confidentiality, integrity, authenticity, and non-
repudiation in digital systems.

2. Core Concepts
Concept Description
Plaintex
Original message/data
t
Ciphert
Encrypted version of the plaintext
ext
A parameter (number/bit string) that determines the output of a cryptographic
Key
algorithm
Encrypti
Transforming plaintext to ciphertext
on
Decrypti
Reversing ciphertext back to plaintext
on
Hashing One-way transformation of data to fixed-size output
3. Types of Cryptography

3.1 Symmetric Cryptography

• Same key used for encryption and decryption.


• Fast, suitable for bulk encryption.

Examples:

• AES (Advanced Encryption Standard)


• DES (Data Encryption Standard)
• ChaCha20

3.2 Asymmetric Cryptography

• Uses a public key for encryption and a private key for decryption.
• Enables secure key exchange and digital signatures.

Examples:

• RSA
• ECC (Elliptic Curve Cryptography)
• ElGamal

3.3 Hash Functions

• One-way, deterministic functions producing fixed-size output.


• Used in passwords, blockchain, data integrity.

Examples:

• SHA-256
• SHA-3
• BLAKE3
4. Key Algorithms and Math

4.1 AES (Advanced Encryption Standard)

• Symmetric block cipher (128-bit block, 128/192/256-bit key)


• Operations include:
o SubBytes (S-box substitution)
o ShiftRows (row transposition)
o MixColumns (matrix multiplication in GF(2⁸))
o AddRoundKey (XOR with key)

4.2 RSA (Rivest-Shamir-Adleman)

• Asymmetric encryption based on the difficulty of factoring large primes.

Key generation:

1. Choose two large primes: p,qp, qp,q


2. Compute n=pqn = pqn=pq
3. Compute ϕ(n)=(p−1)(q−1)\phi(n) = (p-1)(q-1)ϕ(n)=(p−1)(q−1)
4. Choose public exponent eee (commonly 65537)
5. Compute private key d≡e−1mod ϕ(n)d \equiv e^{-1} \mod \phi(n)d≡e−1modϕ(n)

Encryption: c=memod nc = m^e \mod nc=memodn


Decryption: m=cdmod nm = c^d \mod nm=cdmodn

4.3 Elliptic Curve Cryptography (ECC)

• Based on the mathematics of elliptic curves over finite fields.

Curve equation (simplified):


y2=x3+ax+bmod py^2 = x^3 + ax + b \mod py2=x3+ax+bmodp

Operations:

• Point addition
• Scalar multiplication: k⋅Gk \cdot Gk⋅G, where GGG is a base point

Example: secp256k1 (used in Bitcoin)


4.4 Hash Functions (e.g., SHA-256)

• Uses bitwise operations, modular additions, and compression functions.


• Output is fixed at 256 bits, regardless of input size.
• Property: Collision resistance, pre-image resistance, second pre-image resistance.

5. Digital Signatures
Used for authentication and non-repudiation.

RSA Signatures

• Sign: s=mdmod ns = m^d \mod ns=mdmodn


• Verify: m=?semod nm \stackrel{?}{=} s^e \mod nm=?semodn

ECDSA (Elliptic Curve Digital Signature Algorithm)

• Based on ECC
• Much smaller key sizes than RSA for equivalent security

6. Key Exchange Algorithms

6.1 Diffie-Hellman (DH) Key Exchange

• Securely shares a secret key over an insecure channel.

Steps:

1. Agree on prime ppp and base ggg


2. Alice selects secret aaa, sends A=gamod pA = g^a \mod pA=gamodp
3. Bob selects secret bbb, sends B=gbmod pB = g^b \mod pB=gbmodp
4. Both compute shared secret s=Ba=Abmod ps = B^a = A^b \mod ps=Ba=Abmodp
6.2 Elliptic Curve Diffie-Hellman (ECDH)

• Uses scalar multiplication on elliptic curves.


• More efficient and secure at smaller key sizes.

7. Modern Use Cases


Use Case Algorithms Used
Blockchain (Bitcoin) SHA-256, ECDSA (secp256k1)
TLS/SSL RSA, ECC, AES, SHA-2
Encrypted
Signal Protocol (Curve25519, AES, HMAC)
Messaging
Password Hashing bcrypt, scrypt, Argon2
Digital Signatures RSA, ECDSA, EdDSA

8. Security Considerations
• Always use modern, peer-reviewed algorithms.
• Never implement crypto from scratch without expertise.
• Use constant-time algorithms to avoid timing attacks.
• Secure random number generation is critical.
• Private keys must be stored securely (e.g., hardware modules, secure enclaves).

9. Glossary
Term Definition
An algorithm for performing encryption or
Cipher
decryption
Entropy Randomness used in cryptographic functions
Key Exchange Protocol for sharing encryption keys securely
Side-Channel Exploits physical or timing information from a
Attack system
10. References and Further Reading
• "Understanding Cryptography" by Christof Paar and Jan Pelzl
• NIST SP 800-38A: Block Cipher Modes of Operation
• RFC 8017: PKCS #1: RSA Cryptography Standard
• Crypto101.io – Free book on cryptographic primitives
• NIST Cryptographic Toolkit

You might also like