Merge branch 'master' of gitlab.com:shockrah/csnotes
This commit is contained in:
commit
3ac517e5ee
38
312/hash.md
Normal file
38
312/hash.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Cryptographic Hash Functions
|
||||||
|
|
||||||
|
## Random Jargon
|
||||||
|
|
||||||
|
_If you made it this far you know what all of this is but we need these terms because "muh academic vernacular"_
|
||||||
|
|
||||||
|
* Variable Length Input
|
||||||
|
* Fixed size output
|
||||||
|
|
||||||
|
```python
|
||||||
|
a = {
|
||||||
|
'first',
|
||||||
|
'second',
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Both `first` & `second` as inputs result in distinct references of the same size.
|
||||||
|
|
||||||
|
* One-way property
|
||||||
|
|
||||||
|
You should **not** be able to use a hash result(i.e. reference) to find an input.
|
||||||
|
|
||||||
|
In English: _Only inputs can find outputs, not the other way around._
|
||||||
|
|
||||||
|
* Two-way property/ Collision-free Property
|
||||||
|
|
||||||
|
**2** identical data inputs will map to the same output
|
||||||
|
|
||||||
|
## What does a hash provide?
|
||||||
|
|
||||||
|
* Integrity checks
|
||||||
|
|
||||||
|
* Message Digest / Authentication
|
||||||
|
|
||||||
|
_Hashes are not secure ffs_. When we say authentication we really mean that we are checking to ensure there has been no changes to the original message.
|
||||||
|
_NOTE:_ this really doesn't guarantee anything in communications susceptible to man-in-the-middle attacks.
|
||||||
|
|
||||||
|
**Let's get real for minute:** Think of it this way a message is like a car and the key is our hash. If the key doesn't fit in the slot then its not our car, **but** if we sent our car + key oversees whoever steals the car + key has full control and we lose security effectively. Using SSL is _kinda_ like putting that car + key combo in a box that nobody except the recipient can open.
|
||||||
|
|
8
312/kerberos.md
Normal file
8
312/kerberos.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Kerberos
|
||||||
|
|
||||||
|
Method of distributing keys where we deal with clusters made of two parts:
|
||||||
|
|
||||||
|
* Authentication server
|
||||||
|
* Ticket-granting server
|
||||||
|
|
||||||
|
|
35
312/key-dist.md
Normal file
35
312/key-dist.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Key Distribution
|
||||||
|
|
||||||
|
A wants to talk to B but securely(duh).
|
||||||
|
A trusted third party steps in to provide keys
|
||||||
|
|
||||||
|
|
||||||
|
## Needham-Schoeder
|
||||||
|
|
||||||
|
> _used to authenticate users_
|
||||||
|
|
||||||
|
Say we have A & B that want to talk.
|
||||||
|
|
||||||
|
```
|
||||||
|
A sends (IDA, IDB) to KDC
|
||||||
|
KDC sends Enc(SessionKeyA, IDB, Nonce1, Enc(SessionKeyB, SharedKeyA, IDA)) to A
|
||||||
|
A sends Enc(SessionKeyB, SharedKeyB, IDA) // this bit came in the package from last round
|
||||||
|
...
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## Denning
|
||||||
|
|
||||||
|
Fixes step 3 with timestamps. We also shorten the overall process.
|
||||||
|
Problem: both parties need to be time synchronized.
|
||||||
|
|
||||||
|
NOTE: the Sessionkey below is shared between A and B. THe SharedKeyX is shared between the Key Distribution Center and the user.
|
||||||
|
|
||||||
|
1. A sends {IDA, NonceA} B
|
||||||
|
2. B sends {NonceB, Enc(SharedKeyB, [IDA, NonceA, TimeB])} to KDC
|
||||||
|
3. KDC sends {Enc(SharedKeyA, [IDB,, NonceA, SessionKey, TimeB), E(SharedKeyB, [IDA, SessionKey, TimeB]), NonceB} to A
|
||||||
|
4. A sends {E(SharedKey, [IDA, SessionKey, TimeB]), E(SessionKey, NonceB} to B
|
||||||
|
|
||||||
|
## Kerberos
|
||||||
|
|
||||||
|
The model itself can be thought of similar to
|
15
312/wireless-sec.md
Normal file
15
312/wireless-sec.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Wireless Security
|
||||||
|
|
||||||
|
Let's go over the biggest most issue with wireless networks/communications
|
||||||
|
|
||||||
|
> Wireless signals must be broadcast
|
||||||
|
|
||||||
|
This means if _anything_ wants to communicate wirelessly then, everything/everyone will be able to hear those messages.
|
||||||
|
This also means that wireless receivers have to filter through a ton of noise/signals that aren't meant for it.
|
||||||
|
|
||||||
|
Taking the more innocent approach for a minute: it's kinda like walking around a crowded place, while talking to someone, you _can_ hear other people but mentally you are discarding other conversations as you're paying attention to the person you are talking to.
|
||||||
|
|
||||||
|
> DOS - Denial of Service
|
||||||
|
|
||||||
|
Furthering the crowded room example if you and a friend were talking and someone else started screaming talking to them would become much harder/impossible at some point.
|
||||||
|
|
2
412/.gitignore
vendored
2
412/.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
*pdf
|
*pdf
|
||||||
homework/
|
homework/
|
||||||
|
todo.md
|
||||||
|
|
||||||
|
@ -35,6 +35,10 @@ Outsourcing the storage for users to services like Onedrive because it becomes t
|
|||||||
Ensure that the OS gets its own space/partition on a drive and give the user their own partition to ruin. That way the OS(windows) will just fill its partition into another dimension.
|
Ensure that the OS gets its own space/partition on a drive and give the user their own partition to ruin. That way the OS(windows) will just fill its partition into another dimension.
|
||||||
|
|
||||||
|
|
||||||
# Print Services
|
# Backup
|
||||||
|
|
||||||
|
Other people's data is in your hands so make sure that you backup data in some way.
|
||||||
|
Some external services can be nice if you find that you constantly need to get to your backups.
|
||||||
|
Tape records are good for archival purposes; keep in mind that they are slow as hell.
|
||||||
|
|
||||||
|
|
||||||
|
22
412/mail.md
Normal file
22
412/mail.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Email Service
|
||||||
|
|
||||||
|
> Standards
|
||||||
|
|
||||||
|
Try to keep things with standard protocols
|
||||||
|
|
||||||
|
> Automation
|
||||||
|
|
||||||
|
Have some system that can create emails for you instead of manually creating them
|
||||||
|
|
||||||
|
> Redundancy
|
||||||
|
|
||||||
|
Backup mail servers to insure against partial loss
|
||||||
|
|
||||||
|
> POP/IMAP
|
||||||
|
|
||||||
|
Most servers accept IMAP and not POP anymore
|
||||||
|
|
||||||
|
> Encryption
|
||||||
|
|
||||||
|
For the most part we use SSL on the mail server to retain privacy among the users.
|
||||||
|
|
36
412/midterm.md
Normal file
36
412/midterm.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Midterm Sample Questions
|
||||||
|
|
||||||
|
Difference between NAS and SAN?
|
||||||
|
|
||||||
|
Subnet:
|
||||||
|
|
||||||
|
* What kind of class is the given IP?
|
||||||
|
|
||||||
|
* What is the subnet mask, network address, etc?
|
||||||
|
|
||||||
|
* Subnet addresses?
|
||||||
|
|
||||||
|
`Host & subnet mask(classless)`
|
||||||
|
|
||||||
|
BTW: this is the analog of the network address(classful addressing). When we talk about network addresses we are implying a classful network.
|
||||||
|
|
||||||
|
* Subnet bits
|
||||||
|
|
||||||
|
i.e. 21 => 8+8+5+0 <= `5` is the odd one out so we have _5 subnet bits_
|
||||||
|
|
||||||
|
* VLSM - Variable Length Subnet Mask
|
||||||
|
|
||||||
|
|
||||||
|
Suppose we want to assign addresses to the following networks with x many hosts.
|
||||||
|
A:600; B:1000; C:200
|
||||||
|
|
||||||
|
`150.180.0.0/16`
|
||||||
|
`150.181.0.0/16`
|
||||||
|
|
||||||
|
Start with the largest network B : requires 1000 hosts.
|
||||||
|
|
||||||
|
Hosts part requires 10 bits so we have an IP/22.
|
||||||
|
|
||||||
|
Network address then is (subnet address)150.180.0.0/22 - (broadcast address)150.180.3.255/22
|
||||||
|
|
||||||
|
**NOTE:** I included both the subnet(network) address and the broadcast for sake of brevity.
|
12
412/monitoring.md
Normal file
12
412/monitoring.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Service Monitoring
|
||||||
|
|
||||||
|
Several types of monitoring:
|
||||||
|
|
||||||
|
## Building Monitoring System
|
||||||
|
|
||||||
|
If your monitoring a lot of _stuff_ know that you will could have lots of stuff going across the network(in some cases).
|
||||||
|
Know that we have to _get data, store data, and ultimately view data_.
|
||||||
|
|
||||||
|
## Historically
|
||||||
|
|
||||||
|
SNMP: Usually you will get back a ton of data
|
5
412/pass.md
Normal file
5
412/pass.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# OpenFiler
|
||||||
|
|
||||||
|
> both on the browser and the regular user account
|
||||||
|
openfiler
|
||||||
|
openfiler
|
33
412/vlsm.md
Normal file
33
412/vlsm.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# VLSM Examples
|
||||||
|
|
||||||
|
Say we have the IPs: 210.19.[14 -> 19].0/24
|
||||||
|
|
||||||
|
We want to create to networks which support this many hosts
|
||||||
|
|
||||||
|
## Part A
|
||||||
|
* A: 1000 hosts
|
||||||
|
* B: 500 hosts
|
||||||
|
|
||||||
|
Doing A first(because it's bigger):
|
||||||
|
|
||||||
|
Third octet in our IP has the bit pattern of `0000 11100`
|
||||||
|
|
||||||
|
If we want to support 1000 hosts we need to borrow the last two bits of that pattern:
|
||||||
|
|
||||||
|
> __problem__: one of those is 1 which means we can't borrow it as its part of our given network address.
|
||||||
|
|
||||||
|
Thus this problem then can't be done given this information.
|
||||||
|
|
||||||
|
If we had been given x.x..12.0 we could do it because 12's bit pattern is `0000 1100`, which leaves the last two bits as 0's that we can use for the hosts.
|
||||||
|
|
||||||
|
## Part B
|
||||||
|
|
||||||
|
This time we need to support 500 hosts so we need 9 bits for the hosts. This time we can use `x.x.14.0` as our network address
|
||||||
|
|
||||||
|
Our mask is /23 `255.255.154.0`. This leaves our network address as `210.19.14.0`.
|
||||||
|
|
||||||
|
* The first host is x.x.14.1
|
||||||
|
|
||||||
|
* The last host is x.x.15.254
|
||||||
|
|
||||||
|
* Broadcast is x.x.15.255
|
25
readme.md
25
readme.md
@ -1,9 +1,32 @@
|
|||||||
# CSUMB NOTES
|
# Everyone else
|
||||||
|
|
||||||
|
To some degree these notes are personal so there are a few mistakes that I just can't be bothered dealing with.
|
||||||
|
Some mistakes however are just because I wrote those notes during class, likely rushed but meh just take it with a grain of salt sometimes.
|
||||||
|
|
||||||
|
# Prelim to Students
|
||||||
|
|
||||||
|
Some of these courses are very bs'd or missing information.
|
||||||
|
This is (mostly) intentional: some courses cover lower division material that I couldn't be bothered to write down in this repository.
|
||||||
|
|
||||||
|
Also I'm basing lower division material on the curriculum of [Irvine Valley College](http://ivc.edu/Pages/default.aspx).
|
||||||
|
|
||||||
|
# Directory Guide
|
||||||
|
|
||||||
## 311/ - Introduction to Networking and internet Programming
|
## 311/ - Introduction to Networking and internet Programming
|
||||||
|
|
||||||
|
## 312/ - Network Security
|
||||||
|
|
||||||
|
## 334/ - Operating Systems
|
||||||
|
|
||||||
## 337/ - Introduction to Computer Architecture
|
## 337/ - Introduction to Computer Architecture
|
||||||
|
|
||||||
|
## 338/ - Software Design
|
||||||
|
|
||||||
|
**Oh boy**: I'm gonna level with you I took nearly no notes so instead I'm providing a decent source for learning design in software:
|
||||||
|
|
||||||
|
|
||||||
## 363/ - Introduction to Database systems
|
## 363/ - Introduction to Database systems
|
||||||
|
|
||||||
|
## 370/ - Algorithms
|
||||||
|
|
||||||
|
## 412/ - Network Administration
|
||||||
|
Loading…
Reference in New Issue
Block a user