commit ecd9359a645f2e42ba0bebc05d93755fa9f4ebdb
parent 699dd540edccc6ab72db5f1f2d205c1ad17815bf
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date: Mon, 3 Feb 2025 06:27:11 -0600
Read portion of security text
Diffstat:
8 files changed, 92 insertions(+), 5 deletions(-)
diff --git a/definitions/AngleBetweenVectors.md b/definitions/AngleBetweenVectors.md
@@ -11,7 +11,3 @@ Khan
1. Find magnitude of both vectors ([[DistanceCalculation.md]])
2. Take dot product divided by lengths of vectors to find cosine of the angle (solve)
- cos(theta) = (u dot v)/(||u||||v||)
-
-## Intuition
-
-
diff --git a/definitions/ChineseRemainderTheorem.md b/definitions/ChineseRemainderTheorem.md
@@ -0,0 +1,9 @@
+# Chinese Remainder Theorem
+
+**Source:** Computer and Network Security
+
+**Chapter:** 2.7
+
+## Notes
+
+**Definition:** The Chinese Remainder Theorem states...
diff --git a/definitions/ComputerSecurity.md b/definitions/ComputerSecurity.md
@@ -37,7 +37,7 @@ Chapter 1 - Background
1.5 - Security Mechanisms
- Cryptographic Algorithms
-- (Data) [Integrity](Integrity.md)
+- [Integrity](Integrity.md)
- Digital Signatures
- Authentication Exchange
- Traffic Padding
@@ -69,3 +69,17 @@ Chapter 2: Introduction to Number Theory
- [EuclideanAlgorithm](EuclideanAlgorithm.md)
- [GCD](GCD.md)
+
+2.5 - Fermat's and Euler's Theorems
+
+- [FermatsTheorem](FermatsTheorem.md)
+- [EulersTotientFunction](EulersTotientFunction.md)
+- [EulersTheorem](EulersTheorem.md)
+
+2.6 - Primality Tests
+
+- [MillerRabinAlgorithm](MillerRabinAlgorithm.md)
+
+2.7 - Chinese Remainder Theorem
+
+- [ChineseRemainderTheorem](ChineseRemainderTheorem.md)
diff --git a/definitions/EuclideanAlgorithm.md b/definitions/EuclideanAlgorithm.md
@@ -36,3 +36,5 @@ print(gcd(10, 3))
# Extended Euclidean Algorithm
**Definition:** Let a,b \in Z such that a,b > 0 & a >= b. Then there exists u,v \in Z such that gcd(a,b) = a * u + b * v.
+
+The extended Euclidean Algorithm is useful because is allows for us to solve for u which is the inverse of a modulo b.
diff --git a/definitions/EulersTheorem.md b/definitions/EulersTheorem.md
@@ -0,0 +1,11 @@
+# Euler's Theorem
+
+**Source:** Computer and Network Security
+
+**Chapter:** 2.5
+
+## Notes
+
+**Definition:** Euler's theorem states that for every $a$ and $n$ that are relatively prime $a^{\phi(n)} \equiv 1 \text{(mod )} n \text{)}$.
+
+An alternative form of this is $a^{\phi(n) + 1} \equiv a \text{(mod )} n \text{)}$. This form does not require that $a$ and $n$ be relatively prime.
diff --git a/definitions/EulersTotientFunction.md b/definitions/EulersTotientFunction.md
@@ -0,0 +1,31 @@
+# Euler's Totient Function
+
+**Source:** Computer and Network Security
+
+**Chapter:** 2.5
+
+## Notes
+
+**Definition:** Euler's totient function, denoted as $\phi$, is the number of positive integers less than $n$ and relatively prime to $n$.
+
+Note: $\phi(1) = 1$ by convention, which does not make much sense.
+
+## Work
+
+Determine $\phi(37).
+
+To find $\phi(37)$ we notice 37 is prime and thus all integers less than it are relatively prime to it thus $\phi(37) = 36$.
+
+Determine $\phi(35)$.
+
+By evaluating 1-34 we find the following are relatively prime to 35:
+
+1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 22, 23, 24, 26, 27, 29, 31, 32, 33, 34
+
+Given this we see $\phi(35) = 24$.
+
+## Corollaries
+
+Where n is defined as pq:
+
+$\phi(n) = \phi(pq) = \phi(p) * \phi(q) = (p-1) * (q - 1)$.
diff --git a/definitions/FermatsTheorem.md b/definitions/FermatsTheorem.md
@@ -0,0 +1,11 @@
+# Fermat's (Little) Theorem
+
+**Source:** Computer and Network Security
+
+**Chapter:** 2.5
+
+## Notes
+
+**Definition:** Fermat's theorem states if p is prime and a is a positive integer not divisible by p then $a^{p-1} \equiv 1 \text{(mod } p \text{)}$.
+
+An alternative form of this is that $a^{p} \equiv a \text{(mod } p \text{)}$. With this statement there is no requirement that $a$ be relatively prime to $p$.
diff --git a/definitions/MillerRabinAlgorithm.md b/definitions/MillerRabinAlgorithm.md
@@ -0,0 +1,13 @@
+# Miller-Rabin Algorithm
+
+**Source:** Computer and Network Security
+
+**Chapter:** 2.6
+
+## Notes
+
+**Definition:** The Miller-Rabin Algorithm uses the knowledge that if $n$ is prime then either the first element in the list of residues modulo $n$ equals 1; or some element in the list equals ($n-1$); otherwise $n$ is composite. This only guarantees a number is likely prime because this is necessary but not sufficient.
+
+## Background
+
+Any positive odd integer $n \geq 3$ can be stated as $n - 1 = 2^k q$ with $k \gt 0, q$ is odd.