notes

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit c4d44e35e093c7f614d96c63a04e23e14c458540
parent a27ed13652e85d6b85ff7052fb78f2df433b865f
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date:   Wed, 22 Jan 2025 05:44:15 -0600

Finished Computer Security notes on first chapter, started second.

Diffstat:
Mdefinitions/ComputerSecurity.md | 19+++++++++++++++++++
Adefinitions/DigitalSignature.md | 9+++++++++
Adefinitions/DivisionAlgorithm.md | 42++++++++++++++++++++++++++++++++++++++++++
Adefinitions/DivisionRules.md | 15+++++++++++++++
Mdefinitions/EuclideanAlgorithm.md | 2++
Adefinitions/InverseMatrix.md | 27+++++++++++++++++++++++++++
Mdefinitions/LinearAlgebra.md | 2++
Adefinitions/PermutationMatrix.md | 37+++++++++++++++++++++++++++++++++++++
Mdefinitions/RelativelyPrime.md | 2+-
Adefinitions/Trust.md | 9+++++++++
10 files changed, 163 insertions(+), 1 deletion(-)

diff --git a/definitions/ComputerSecurity.md b/definitions/ComputerSecurity.md @@ -4,6 +4,8 @@ Main index for notes related to CSCI 370, Computer Security ## Links +Chapter 1 - Background + 1.1 - Cyber, info, network sec - [Cybersecurity](Cybersecurity.md) @@ -49,3 +51,20 @@ Main index for notes related to CSCI 370, Computer Security - [Keyless](Keyless.md) - [SingleKey](SingleKey.md) - [TwoKey](TwoKey.md) +- [DigitalSignature](DigitalSignature.md) + +1.8 - Trust + +- [Trust](Trust.md) + +Chapter 2: Introduction to Number Theory + +2.1 - Divisibility and The Division Algorithm + +- [DivisionRules](DivisionRules.md) +- [DivisionAlgorithm](DivisionAlgorithm.md) +- [RelativelyPrime](RelativelyPrime.md) + +2.2 - The Euclidean Algorithm + +- [EuclideanAlgorithm](EuclideanAlgorithm.md) diff --git a/definitions/DigitalSignature.md b/definitions/DigitalSignature.md @@ -0,0 +1,9 @@ +# Digital Signature + +**Source:** Cryptography and Network Security + +**Chapter:** 1.6 + +## Notes + +**Definition:** A digital signature is a value computed with an algorithm and data that outputs a deterministic signature to verify the origin and integrity of the data. diff --git a/definitions/DivisionAlgorithm.md b/definitions/DivisionAlgorithm.md @@ -0,0 +1,42 @@ +# Division Algorithm + +**Source:** Cryptography and Network Security + +**Chapter:** 2.1 + +## Notes + +**Definition:** The division algorithm is the theorem that given a = qn + r, 0 <= r < n; q = floor(a/n). + +This basically states that when r (the remainder) is greater than 0 (always), and less than n then the quotient is equivalent to the floor of the numerator divided by the denominator. + + +### Implementation in code to solve the Division Algorithm + +```cpp + +#include "iostream" + +int main(){ + int a = 37; + int n = 13; + + std::cout << "Dividing "; + std::cout << a << std::endl; + + std::cout << "By "; + std::cout << n << std::endl; + + // implicit floor + int q = a / n; + int r = a - (q*n); + + std::cout << "We get "; + std::cout << q << std::endl; + + std::cout << "Remainder "; + std::cout << r << std::endl; + +} + +``` diff --git a/definitions/DivisionRules.md b/definitions/DivisionRules.md @@ -0,0 +1,15 @@ +# Division Rules + +**Source:** Cryptography and Network Security + +**Chapter:** 2.1 + +## Notes + +IMPORTANT RULES THAT MIGHT NOT BE OBVIOUS RIGHT AWAY: + +1. a | 1 then a = +- 1 +2. a | b and b | a then a = +- b +3. Any b != 0 divides 0 +4. a | b and b | c then a | c +5. b | g and b | h -> b | (mg + nh) for arbitrary integers m and n diff --git a/definitions/EuclideanAlgorithm.md b/definitions/EuclideanAlgorithm.md @@ -7,3 +7,5 @@ Ch 2.4 **Definition:** The Euclidean algorithm is an algorithm used to determine the greatest common factor of two numbers. This is done as an alternative to the prime factoziation method which is too slow. + +To perform the Euclidean algorithm we diff --git a/definitions/InverseMatrix.md b/definitions/InverseMatrix.md @@ -0,0 +1,27 @@ +# Inverse Matrix + +**Source:** Strang Lectures + +**Lecture:** 2 + +## Notes + +**Definition:** The inverse matrix is the matrix such that A * A' = I. + +## Example + +Find inverse of M. + +M = [ 1 0 0] + [-3 1 0] + [ 0 0 1] + +SOLVING: + +M' [ 1 0 0] = [1 0 0] + [-3 1 0] [0 1 0] + [ 0 0 1] [0 0 1] + +M' = [1 0 0] + [3 1 0] + [0 0 1] diff --git a/definitions/LinearAlgebra.md b/definitions/LinearAlgebra.md @@ -42,6 +42,8 @@ Gilbert Strang Lectures: Lecture 2: - [GaussianElimination](GaussianElimination.md) +- [PermutationMatrix](PermutationMatrix.md) +- [InverseMatrix](InverseMatrix.md) Khan Academy: diff --git a/definitions/PermutationMatrix.md b/definitions/PermutationMatrix.md @@ -0,0 +1,37 @@ +# Permutation Matrix + +**Source:** Strang Lectures + +**Lecture:** 2 + +## Notes + +**Definition:** A permutation matrix is a matrix that when multiplied by exchanges rows of the other matrix. + + +#### ROWS + +P [a b] = [c d] + [c d] [a b] + +P is the permutation matrix and we can state it as: + +[0 1] +[1 0] + +This will flip the rows. + +#### COLUMNS + +P [a b] = [b a] + [c d] [d c] + +This is not possible. Instead we would need to state it as follows: + +[a b] * P = [b a] +[c d] [d c] + +We could then state P as [0 1] + [1 0] + +This is because we can only do row manipulations, not columns. diff --git a/definitions/RelativelyPrime.md b/definitions/RelativelyPrime.md @@ -4,4 +4,4 @@ U 2.4 ## Notes -**Definition:** A relatively prime numbers (only 2 numbers) are prime numbers such that gcd(a,b) = 1. +**Definition:** Relatively prime numbers are prime numbers such that gcd(a,b) = 1. diff --git a/definitions/Trust.md b/definitions/Trust.md @@ -0,0 +1,9 @@ +# Trust + +**Source:** Cryptography and Network Security + +**Chapter:** 1.8 + +## Notes + +**Definition:** Trust is one's willingness to be vulnerable to the actions of another party based on the expectation the other party will perform an action important to the truster without necessarily being able to monitor or control the other party.