Introduction: The Mathematics of Trust

In Modules 1 through 3, we established a comprehensive cybersecurity framework for financial institutions. We explored the threat landscape, regulatory requirements, risk assessment methodologies, security architecture principles, network defense mechanisms, and secure remote access solutions. Each of these components relies on a common foundation:Β cryptography.

Cryptography is the science of securing communication and data through the use of mathematical algorithms. It is the bedrock upon which virtually all modern cybersecurity is built. In financial institutions, cryptography protects:

  • Customer Data:Β Encryption protects personally identifiable information (PII), account numbers, and transaction histories from unauthorized access.

  • Financial Transactions:Β Cryptographic protocols secure payment processing, wire transfers, and trading systems.

  • Authentication:Β Digital signatures and certificates verify the identity of customers, employees, and systems.

  • Compliance:Β Encryption and key management are required by regulations such as GLBA, GDPR, NYDFS, and PCI DSS.

Without cryptography, financial institutions could not operate securely in the digital age. Every online banking session, every ATM transaction, every wire transfer, and every stock trade relies on cryptographic algorithms to ensure confidentiality, integrity, authentication, and non-repudiation.

This lesson provides the complete mathematical foundation for cryptography in financial systems. We begin by examining theΒ Core Cryptographic Concepts: confidentiality, integrity, authentication, and non-repudiation. We derive the mathematical formulations of each concept and analyze their security properties.

We then examineΒ Symmetric-Key Cryptography, including the Advanced Encryption Standard (AES), its mathematical structure, and its security properties. We derive theΒ AES Encryption Algorithm:Β C=AddRoundKey(ShiftRows(MixColumns(SubBytes(P)))). We analyze theΒ Block Cipher ModesΒ used in financial systems, including Electronic Codebook (ECB), Cipher Block Chaining (CBC), Counter Mode (CTR), and Galois/Counter Mode (GCM). We derive the security properties of each mode and analyze their suitability for financial applications.

We then examineΒ Asymmetric-Key Cryptography, including the RSA algorithm and Elliptic Curve Cryptography (ECC). We derive theΒ RSA Algorithm:Β C=Memod  n,Β M=Cdmod  n. We analyze the mathematical foundations of RSA, including the use of prime numbers, modular arithmetic, and the discrete logarithm problem. We compare RSA and ECC and analyze their security properties.

We also examineΒ Cryptographic Hash Functions, including SHA-256 and SHA-3. We derive the properties of cryptographic hash functions:Β Pre-image Resistance,Β Second Pre-image Resistance, andΒ Collision Resistance. We derive theΒ SHA-256 Algorithm:Β H=Compression(M,IV).

By the end, you will have a complete mathematical understanding of the core cryptographic algorithms used in financial systems and be able to analyze their security properties.


Learning Objectives

Upon completion of this lesson, you will be able to:

  1. DefineΒ the core cryptographic concepts: Confidentiality, Integrity, Authentication, and Non-Repudiation.

  2. AnalyzeΒ the mathematical structure of theΒ Advanced Encryption Standard (AES)Β :Β C=AddRoundKey(ShiftRows(MixColumns(SubBytes(P)))).

  3. DeriveΒ theΒ Block Cipher ModesΒ used in financial systems: ECB, CBC, CTR, and GCM.

  4. AnalyzeΒ theΒ RSA Algorithm:Β C=Memod  n,Β M=Cdmod  n, and the mathematical foundations of RSA.

  5. AnalyzeΒ Elliptic Curve Cryptography (ECC)Β and compare RSA and ECC for financial applications.

  6. AnalyzeΒ Cryptographic Hash Functions:Β H=Compression(M,IV), SHA-256, and their properties.

  7. ApplyΒ the security models for cryptographic algorithms to financial systems.


Part 1: Core Cryptographic Concepts

1.1 The Cryptographic Objectives

Cryptography serves four primary objectives:

Cryptography={Confidentiality,Integrity,Authentication,Non-Repudiation}

1.2 Confidentiality

Definition:Β Confidentiality ensures that information is accessible only to authorized parties.

Mathematical Formulation:Β LetΒ MΒ be the plaintext message,Β CΒ be the ciphertext,Β KΒ be the encryption key, andΒ EKΒ be the encryption function. Confidentiality is achieved when:

C=EK(M)β€…β€ŠβŸΉβ€…β€ŠP(M∣C)=P(M)

Interpretation:Β The ciphertextΒ CΒ reveals no information about the plaintextΒ M. An attacker with access toΒ CΒ cannot determineΒ MΒ without the keyΒ K.

Implementation:Β Encryption algorithms (symmetric-key encryption, asymmetric-key encryption) provide confidentiality.

1.3 Integrity

Definition:Β Integrity ensures that information has not been altered or tampered with.

Mathematical Formulation:Β LetΒ MΒ be the original message andΒ Mβ€²Β be the received message. Integrity is achieved when:

Mβ€²=Mβ€…β€ŠβŸΉβ€…β€ŠVerificationΒ succeeds

Interpretation:Β Any alteration of the message is detectable. An attacker cannot modify the message without detection.

Implementation:Β Hash functions, message authentication codes (MACs), and digital signatures provide integrity.

1.4 Authentication

Definition:Β Authentication verifies the identity of a party and the origin of a message.

Mathematical Formulation:Β LetΒ SΒ be the sender of a messageΒ M. Authentication is achieved when:

Verify(M,SignatureS)=Trueβ€…β€ŠβŸΉβ€…β€ŠSΒ isΒ theΒ origin

Interpretation:Β The recipient can verify that the message originated from the claimed sender and was not forged.

Implementation:Β Digital signatures, public-key certificates, and challenge-response protocols provide authentication.

1.5 Non-Repudiation

Definition:Β Non-Repudiation ensures that a party cannot deny having performed a particular action.

Mathematical Formulation:Β LetΒ AΒ be an action performed by partyΒ S. Non-Repudiation is achieved when:

Proof(A)=Trueβ€…β€ŠβŸΉβ€…β€ŠSΒ cannotΒ denyΒ performingΒ A

Interpretation:Β The party cannot later deny having performed the action. This is essential for financial transactions, contracts, and regulatory compliance.

Implementation:Β Digital signatures, audit trails, and timestamping provide non-repudiation.

text
Core Cryptographic Concepts (Visual):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
|                                                                         |
|  ╔═══════════════════════════════════════════════════════════════════╗  |
|  β•‘  Confidentiality                                                β•‘  |
|  ╠═══════════════════════════════════════════════════════════════════╣  |
|  β•‘  Definition: Information accessible only to authorized parties   β•‘  |
|  β•‘  Mathematical: P(M|C) = P(M)                                    β•‘  |
|  β•‘  Implementation: Encryption (AES, RSA)                          β•‘  |
|  β•‘  Example: Encrypting customer data at rest and in transit      β•‘  |
|  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•  |
|                                                                         |
|  ╔═══════════════════════════════════════════════════════════════════╗  |
|  β•‘  Integrity                                                     β•‘  |
|  ╠═══════════════════════════════════════════════════════════════════╣  |
|  β•‘  Definition: Information has not been altered or tampered with   β•‘  |
|  β•‘  Mathematical: M' = M β‡’ Verification succeeds                  β•‘  |
|  β•‘  Implementation: Hash functions, MACs, digital signatures       β•‘  |
|  β•‘  Example: Verifying financial transaction data integrity       β•‘  |
|  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•  |
|                                                                         |
|  ╔═══════════════════════════════════════════════════════════════════╗  |
|  β•‘  Authentication                                                β•‘  |
|  ╠═══════════════════════════════════════════════════════════════════╣  |
|  β•‘  Definition: Verifying identity and origin                     β•‘  |
|  β•‘  Mathematical: Verify(M, Signature_S) = True β‡’ S is origin     β•‘  |
|  β•‘  Implementation: Digital signatures, certificates, challenge   β•‘  |
|  β•‘  Example: Authenticating customers and employees               β•‘  |
|  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•  |
|                                                                         |
|  ╔═══════════════════════════════════════════════════════════════════╗  |
|  β•‘  Non-Repudiation                                               β•‘  |
|  ╠═══════════════════════════════════════════════════════════════════╣  |
|  β•‘  Definition: Cannot deny having performed an action             β•‘  |
|  β•‘  Mathematical: Proof(A) = True β‡’ S cannot deny A              β•‘  |
|  β•‘  Implementation: Digital signatures, audit trails              β•‘  |
|  β•‘  Example: Financial transaction records, signed contracts      β•‘  |
|  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•  |
|                                                                         |
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Part 2: Symmetric-Key Cryptography

2.1 The Advanced Encryption Standard (AES)

Definition:Β AES is a symmetric-key encryption algorithm adopted as the standard for protecting sensitive information in financial institutions.

AES={SubBytes,ShiftRows,MixColumns,AddRoundKey}

Key Sizes:Β AES-128 (128-bit key), AES-192 (192-bit key), AES-256 (256-bit key).

Block Size:Β 128 bits (16 bytes).

2.2 The AES Algorithm

The AES algorithm consists of multiple rounds (10, 12, or 14 rounds depending on the key size):

C=AddRoundKey(ShiftRows(MixColumns(SubBytes(P))))N

WhereΒ NΒ is the number of rounds.

The Four AES Operations:

Β 
Β 
Operation Description Mathematical Formulation
SubBytes Nonlinear substitution using S-box S(ai,j)
ShiftRows Cyclic shift of each row bi,j=ai,(j+shift(i))mod  4
MixColumns Linear mixing of each column bj=Mix(aj)
AddRoundKey XOR with round key b=aβŠ•RoundKey

2.3 Block Cipher Modes

Block cipher modes determine how a block cipher is used to encrypt data of arbitrary length:

BlockΒ CipherΒ Modes={ECB,CBC,CTR,GCM}

Β 
Β 
Mode Description Security Properties Financial Use Case
ECB (Electronic Codebook) Each block encrypted independently Weak: Identical plaintext blocks produce identical ciphertext Not recommended for financial data
CBC (Cipher Block Chaining) Each block XORed with previous ciphertext Strong: Provides confidentiality Data encryption at rest
CTR (Counter Mode) Uses counter as input to the cipher Strong: Parallelizable, random access High-performance encryption
GCM (Galois/Counter Mode) CTR mode with authentication Strong: Provides confidentiality + integrity TLS, IPSec, authenticated encryption

ECB Mode:

Ci=EK(Pi)

CBC Mode:

Ci=EK(PiβŠ•Ciβˆ’1),C0=IV

CTR Mode:

Ci=PiβŠ•EK(CTRi)

GCM Mode:

Ci=PiβŠ•EK(CTRi),T=Auth(A,C)

text
Block Cipher Modes (Visual):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
|                                                                         |
|  ECB Mode                                                             β”‚
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
|  β”‚  P₁ ──▢ E_K ──▢ C₁                                            β”‚  β”‚
|  β”‚  Pβ‚‚ ──▢ E_K ──▢ Cβ‚‚                                            β”‚  β”‚
|  β”‚  P₃ ──▢ E_K ──▢ C₃                                            β”‚  β”‚
|  β”‚  Weakness: Identical plaintext blocks β†’ identical ciphertext  β”‚  β”‚
|  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
|                                                                         |
|  CBC Mode                                                             β”‚
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
|  β”‚  P₁ βŠ• IV ──▢ E_K ──▢ C₁                                       β”‚  β”‚
|  β”‚  Pβ‚‚ βŠ• C₁ ──▢ E_K ──▢ Cβ‚‚                                       β”‚  β”‚
|  β”‚  P₃ βŠ• Cβ‚‚ ──▢ E_K ──▢ C₃                                       β”‚  β”‚
|  β”‚  Strength: Identical plaintext blocks produce different       β”‚  β”‚
|  β”‚  ciphertext                                                    β”‚  β”‚
|  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
|                                                                         |
|  CTR Mode                                                             β”‚
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
|  β”‚  CTR₁ ──▢ E_K ──▢ K₁ ──▢ P₁ βŠ• K₁ ──▢ C₁                     β”‚  β”‚
|  β”‚  CTRβ‚‚ ──▢ E_K ──▢ Kβ‚‚ ──▢ Pβ‚‚ βŠ• Kβ‚‚ ──▢ Cβ‚‚                     β”‚  β”‚
|  β”‚  CTR₃ ──▢ E_K ──▢ K₃ ──▢ P₃ βŠ• K₃ ──▢ C₃                     β”‚  β”‚
|  β”‚  Strength: Parallelizable, random access                       β”‚  β”‚
|  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
|                                                                         |
|  GCM Mode                                                             β”‚
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
|  β”‚  CTR Mode (encryption) + Authentication (tag)                 β”‚  β”‚
|  β”‚  C₁, Cβ‚‚, C₃, T (Authentication Tag)                            β”‚  β”‚
|  β”‚  Strength: Confidentiality + Integrity                         β”‚  β”‚
|  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
|                                                                         |
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Part 3: Asymmetric-Key Cryptography

3.1 The RSA Algorithm

Definition:Β RSA (Rivest-Shamir-Adleman) is a public-key cryptosystem based on the difficulty of factoring large prime numbers.

RSA={KeyΒ Generation,Encryption,Decryption}

Key Generation:

  1. Choose two large primesΒ pΒ andΒ q

  2. ComputeΒ n=pΓ—q

  3. ComputeΒ Ο•(n)=(pβˆ’1)Γ—(qβˆ’1)

  4. ChooseΒ eΒ such thatΒ gcd⁑(e,Ο•(n))=1

  5. ComputeΒ dΒ such thatΒ eΓ—d≑1mod  ϕ(n)

Public Key:Β (e,n)

Private Key:Β (d,n)

Encryption:

C=Memod  n

Decryption:

M=Cdmod  n

3.2 The Mathematical Foundation of RSA

The security of RSA is based on the difficulty of factoring the modulusΒ nΒ into its prime factorsΒ pΒ andΒ q:

RSA Security∝Difficulty of Factoring(n)

The RSA Assumption:Β GivenΒ n=pΓ—qΒ andΒ e, it is computationally infeasible to determineΒ MΒ fromΒ C=Memod  nΒ withoutΒ d.

3.3 Elliptic Curve Cryptography (ECC)

Definition:Β ECC is a public-key cryptosystem based on the algebraic structure of elliptic curves over finite fields.

The Weierstrass Equation:

y2=x3+ax+b

ECC Key Generation:

  1. Choose an elliptic curveΒ EΒ over a finite field

  2. Choose a base pointΒ GΒ onΒ E

  3. Choose a private keyΒ dΒ (a large random integer)

  4. Compute the public keyΒ Q=dΓ—GΒ (point multiplication)

ECC Security:Β Based on the difficulty of the Elliptic Curve Discrete Logarithm Problem (ECDLP):

ECC Security∝Difficulty of ECDLP

3.4 RSA vs. ECC for Financial Institutions

Β 
Β 
Aspect RSA ECC
Key Size Larger (2048-4096 bits) Smaller (256-512 bits)
Performance Slower Faster
Security Level Based on integer factoring Based on ECDLP
Implementation Widely implemented Growing adoption
Financial Use Case Legacy systems, certificates Modern systems, mobile devices

Equivalent Key Sizes:

Β 
Β 
RSA Key Size ECC Key Size Security Level
1024 bits 160 bits 80 bits
2048 bits 224 bits 112 bits
3072 bits 256 bits 128 bits
7680 bits 384 bits 192 bits
15360 bits 512 bits 256 bits

Part 4: Cryptographic Hash Functions

4.1 The Definition

A cryptographic hash function is a deterministic algorithm that maps an arbitrary-length input to a fixed-length output.

Hash={Pre-imageΒ Resistance,SecondΒ Pre-imageΒ Resistance,CollisionΒ Resistance}

Hash Function Notation:

H(M)=h

4.2 Hash Function Properties

Β 
Β 
Property Definition Mathematical Formulation
Pre-image Resistance GivenΒ h, it is infeasible to findΒ MΒ such thatΒ H(M)=h βˆ„M:H(M)=h
Second Pre-image Resistance GivenΒ M1, it is infeasible to findΒ M2Β such thatΒ H(M1)=H(M2) βˆ„M2β‰ M1:H(M2)=H(M1)
Collision Resistance It is infeasible to findΒ M1β‰ M2Β such thatΒ H(M1)=H(M2) βˆ„M1β‰ M2:H(M1)=H(M2)

4.3 The SHA-256 Algorithm

Definition:Β SHA-256 is a member of the SHA-2 family of cryptographic hash functions, producing a 256-bit (32-byte) hash value.

SHA-256 Algorithm:Β The algorithm processes messages in 512-bit blocks and produces a 256-bit hash.

H=SHA-256(M)∈{0,1}256

The SHA-256 Compression Function:

Hi=Compression(Hiβˆ’1,Mi)

4.4 Hash Functions in Financial Systems

Β 
Β 
Use Case Hash Function Purpose
Password Storage SHA-256, bcrypt Secure storage of passwords
Data Integrity SHA-256, SHA-3 Verifying file and data integrity
Digital Signatures SHA-256 Signing with RSA or ECC
Blockchain SHA-256 Bitcoin, Ethereum transactions
TLS/SSL SHA-256, SHA-384 Secure communication
text
Cryptographic Hash Functions (Visual):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
|                                                                         |
|  SHA-256 Algorithm                                                    β”‚
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
|  β”‚  Input: M (arbitrary length)                                   β”‚  β”‚
|  β”‚  1. Pad M to a multiple of 512 bits                           β”‚  β”‚
|  β”‚  2. Process each 512-bit block:                               β”‚  β”‚
|  β”‚     H = Compression(H, M_i)                                   β”‚  β”‚
|  β”‚  3. Output H (256 bits)                                       β”‚  β”‚
|  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
|                                                                         |
|  Properties:                                                         β”‚
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
|  β”‚  β€’ Pre-image Resistance: Infeasible to find M given h        β”‚  β”‚
|  β”‚  β€’ Second Pre-image Resistance: Infeasible to find Mβ‚‚        β”‚  β”‚
|  β”‚  β€’ Collision Resistance: Infeasible to find M₁ β‰  Mβ‚‚          β”‚  β”‚
|  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
|                                                                         |
|  Applications in Finance:                                            β”‚
|  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
|  β”‚  β€’ Password Storage: SHA-256, bcrypt                          β”‚  β”‚
|  β”‚  β€’ Data Integrity: Verifying file and data integrity          β”‚  β”‚
|  β”‚  β€’ Digital Signatures: Signing with RSA or ECC               β”‚  β”‚
|  β”‚  β€’ Blockchain: Bitcoin, Ethereum transactions                 β”‚  β”‚
|  β”‚  β€’ TLS/SSL: Secure communication                              β”‚  β”‚
|  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
|                                                                         |
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Summary and Bridge to Lesson 4.2

We have now completed the mathematical foundations of cryptography. You have learned:

  1. Core Cryptographic Concepts:Β Confidentiality, Integrity, Authentication, and Non-Repudiation.

  2. Symmetric-Key Cryptography:Β AES algorithm:Β C=AddRoundKey(ShiftRows(MixColumns(SubBytes(P))))N.

  3. Block Cipher Modes:Β ECB, CBC, CTR, and GCM.

  4. Asymmetric-Key Cryptography:Β RSA:Β C=Memod  n,Β M=Cdmod  n, and ECC:Β y2=x3+ax+b.

  5. Cryptographic Hash Functions:Β SHA-256:Β H=SHA-256(M), and the properties of cryptographic hash functions.

InΒ Lesson 4.2, we will exploreΒ Key Management and Public Key Infrastructure (PKI) in Financial Institutions, analyzing how cryptographic keys are generated, stored, distributed, and revoked.

Β