Skip to content

Commit bcd61b0

Browse files
grammer fix module concepts, course, crypto
1 parent 558eb57 commit bcd61b0

21 files changed

+237
-214
lines changed

concepts/bpf.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# eBPF
2-
- Packet filerting done in kernel space without context switch.
2+
- Packet filtering is done in kernel space without a context switch.
33
- On link driver -> BPF + Protocol Stack
44
- eBBF - parse modify packet - filter before
55
- TCPDump uses BPF
@@ -20,11 +20,11 @@
2020
- tcpdump greater 64
2121
- tcpdump <= 128
2222
- -d to get assembly line
23-
- To limit no of packet capture -c
23+
- To limit the packet capture -c
2424
- -nn to ip reveal
2525
- tcpdump port 80 -w capture_file ( Writing to pcap file )
2626
- Other capture method
27-
- sudo spctl --master-disableo
27+
- sudo spctl --master-disable
2828
- airport -s
2929
- airport en0 sniff 13
3030
- JamWifi
@@ -35,13 +35,13 @@
3535
- tcpdump -nnvvS src 10.5.2.3 and dst port 3389
3636
- tcpdump -vvAls0 | grep 'User-Agent:' (User agents isolate)
3737
- Packet format
38-
- Packet headers information
39-
- 08:41:13.729687 IP 192.168.64.28.22 > 192.168.64.1.41916: Flags [P.], seq 196:568, ack 1, win 309, options [nop,nop,TS val 117964079 ecr 816509256], length 372
40-
- S SYN Connection Start
41-
- F FIN Connection Finish
42-
- P PUSH Data push
43-
- R RST Connection reset
44-
- . ACK Acknowledgment
38+
- Packet header information
39+
- 08:41:13.729687 IP 192.168.64.28.22 > 192.168.64.1.41916: Flags [P.], seq 196:568, ack 1, win 309, options [nop, nop, TS val 117964079 ecr 816509256], length 372
40+
- S SYN Connection Start
41+
- F FIN Connection Finish
42+
- P PUSH Data push
43+
- R RST Connection reset
44+
- ACK Acknowledgment
4545
- Packet Content
4646
- -X to print content in hex, and ASCII or -A to print the content in ASCII.
4747
- Capturing ssh session
@@ -54,15 +54,15 @@
5454
- Kprobes / Uprobes
5555
- Static tracepoint
5656
- Debugging replaces instruction with jump
57-
- Anything platform independent introduce virtual machine
57+
- Anything platform independent introduces virtual machine
5858

5959
### IP Table
6060
- Table, Chain, Target
6161
- Firewall
6262

6363
### Netcut
6464
- TCP UDP packet generate
65-
- Or ping for control packet
65+
- Or ping for a control packet
6666

6767
### Reference
6868
- [Talk on BPF](https://www.youtube.com/watch?v=4SiWL5tULnQ)
@@ -74,6 +74,6 @@
7474
- [Hacking: Aircrack-ng on Mac OsX | Cracking wi-fi without kali in parallels](https://martinsjean256.wordpress.com/2018/02/12/hacking-aircrack-ng-on-mac-cracking-wi-fi-without-kali-in-parallels)
7575
- [What is ICMP and How ICMP works || Explained](https://www.youtube.com/watch?v=jQm-J-8iPVw)
7676
- https://en.wikipedia.org/wiki/Network_socket
77-
- [The Amazing World of Kprobes](https://www.cs.dartmouth.edu/~sergey/cs258/2016/kprobes-2016.pdf)
77+
- [The Amazing World of Kprobes](https://www.cs.dartmouth.edu/~sergey/cs258/2016/kprobes-2016.pdf)
7878
- [Linux Networking Explained](https://events.static.linuxfound.org/sites/events/files/slides/2016%20-%20Linux%20Networking%20explained_0.pdf)
7979
- [An introduction to using tcpdump at the Linux command line](https://opensource.com/article/18/10/introduction-tcpdump)

concepts/docker.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
### Namespace
77
- Isolation of global system resources between independent processes.
88

9-
- Namespaces do not restrict access to physical resources such as CPU, memory and disk. That access is metered and restricted by a kernel feature called `cgroups`.
9+
- Namespaces do not restrict access to physical resources such as CPU, memory, and disk. That access is metered and restricted by a kernel feature called `cgroups`.
1010

1111
- 7 Namespace available
1212
- `Mount`
1313
- isolate filesystem mount points
1414
- `UTS`
15-
- isolate hostname and domainname
15+
- isolate hostname and domain name
1616
- `IPC`
1717
- isolate interprocess communication (IPC) resources
1818
- `PID`
@@ -46,7 +46,7 @@
4646

4747
`Storage drivers` allow you to create data in the writable layer of your container.
4848

49-
The files won’t be persisted after the container is deleted, and both read and write speeds are lower than native file system performance. Transferring similar to rsync.
49+
The files won’t persist after the container is deleted, and both read and write speeds are lower than native file system performance. Transferring similar to rsync.
5050

5151
- When you use the FROM command in a Dockerfile you are referring to a base image. Rather than copy everything in a new image, you will share the contents (a.k.a. fs layers); this is what is known as a **copy-on-write** (holy cow!) filesystem.
5252

@@ -67,10 +67,10 @@ The files won’t be persisted after the container is deleted, and both read and
6767
- VFS
6868

6969
### Cgroups
70-
- Control the resource utilization. Keep a limit memory, CPU.
70+
- Control the resource utilization. Keep a limited memory and CPU.
7171

7272
### Seccomps
73-
- Sort of `bpf` based hook that happen before syscall.
73+
- Sort of `bpf` based hook that happens before syscall.
7474

7575
### References
7676
- [The Linux Programming Interface](https://man7.org/tlpi/)

concepts/encoding.md

+15-16
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,57 @@
77

88
- Why 64? We can generally rely on the same 64 characters being present in many character sets which end up on the other side of the wire uncorrupted.
99

10-
- Essentially each 6 bits of the input is encoded in a 64-character alphabet. The "standard" alphabet uses A-Z, a-z, 0-9 and + and /, with = as a padding character. There are URL-safe variants.
10+
- Essentially each 6 bits of the input is encoded in a 64-character alphabet. The "standard" alphabet uses A-Z, a-z, 0-9, and + and /, with = as a padding character. There are URL-safe variants.
1111

1212
### Bit parity
1313

14-
- In this method, every byte transmitted would have 7-bits of data, and the 8th would be 1 or 0, to force the total number of 1 bits in the byte to be even.
14+
- In this method, every byte transmitted would have 7 bits of data, and the 8th would be 1 or 0, to force the total number of 1 bits in the byte to be even.
1515
- eg. 0x01 to 0x81, 0x02 to 0x82, 0x03 to 0x03 etc.
1616

1717
- For this compatibility, when the ASCII character set was defined, only 00-7F were assigned characters. (Still today, all characters set in the range 80-FF are non-standard).
1818

1919
- Many routers of the day put the parity check and byte translation into hardware, forcing the computers attached to them to deal strictly with 7-bit data.
2020

21-
- This force email attachments (and all other data, which is why HTTP & SMTP protocols are text-based), to be convert into a text-only format.
21+
- This forces email attachments (and all other data, which is why HTTP & SMTP protocols are text-based), to be convert into a text-only format.
2222

2323
- Two equals sign (==) at the end show that 4 zeroes were added (helps in decoding).
2424

2525
- Base64 encoding uses 33% more storage
2626

27-
- Strings stored in the database wont be human readable.
27+
- Strings stored in the database won't be human-readable.
2828

2929
- Base64 is a method to encode a byte sequence to a string.
3030

3131
### Unicode and UTF-8
3232

33-
- **UTF-8** is a compromise character encoding that can be as compact as ASCII (if the file is just plain English text) but can also contain any unicode characters (with some increase in file size).
33+
- **UTF-8** is a compromise character encoding that can be as compact as ASCII (if the file is just plain English text) but can also contain any Unicode characters (with some increase in file size).
3434

3535
- In Unicode, a letter maps to something called a **code point** which is still just a theoretical concept.
3636

37-
- For example, the Unicode code point for the capital letter “T” is U+0054, the Unicode code point for the lowercase letter “t” is U+0074, and the Unicode point for the lower left triangle “◺” is U+25FA.
37+
- For example, the Unicode code point for the capital letter “T” is U+0054, the Unicode code point for the lowercase letter “t” is U+0074, and the Unicode point for the lower left triangle “◺” is U+25FA.
3838

39-
- The problem with Unicode is that it is most often represented in software as an int32 (32 bit integer).
40-
- The vast majority of characters in widespread use could fit into a much smaller number than required for a 32 bit data type.
39+
- The problem with Unicode is that it is most often represented in software as an int32 (32-bit integer).
40+
- The vast majority of characters in widespread use could fit into a much smaller number than required for a 32-bit data type.
4141
- This is where UTF-8 enters the picture.
4242

43-
- **UTF-8** is a variable length encoding of Unicode code points.
43+
- **UTF-8** is a variable-length encoding of Unicode code points.
4444
- For each Unicode code point, it uses between 1 and 4 bytes.
4545
- All of the most common characters can be represented using 1–2 bytes (all ASCII characters can be represented in 1 byte).
46-
- UTF-8 allows us to use all of the characters defined by Unicode, but allows us to save some extra space and only reach for the 3rd or 4th byte when we really need it.
47-
- To again list the same examples, we could represent the Unicode code point “T” as 84, “t” as and “◺” as 226 151 186.
46+
- UTF-8 allows us to use all of the characters defined by Unicode but allows us to save some extra space and only reach for the 3rd or 4th byte when we really need it.
47+
- To again list the same examples, we could represent the Unicode code point “T” as 84, “t” as, and “◺” as 226 151 186.
4848

49-
- UTF-8 and UTF-16 are methods to encode Unicode strings to byte sequences. UTF-16 has advantage if non conventional characters are dominant. UTF-8 otherwise.
49+
- UTF-8 and UTF-16 are methods to encode Unicode strings to byte sequences. UTF-16 has an advantage if nonconventional characters are dominant. UTF-8 otherwise.
5050

5151
**Process**
5252
- Character is encoded in UTF8
53-
- Then encoded character is base64 encoded for wire transfer
53+
- Then the encoded character is base64 encoded for wire transfer
5454
- This wire text converted back with base64 decode
5555
- Then we decode `UTF8`
5656
- It does not make sense to have a string without knowing what encoding it uses.
5757
- Not every byte sequence represents an Unicode string encoded in UTF-8 or UTF-16.
5858
- Not every Unicode string represents a byte sequence encoded in Base64.
5959

6060
### References
61-
- [What is base 64 encoding used for?](https://stackoverflow.com/questions/201479/what-is-base-64-encoding-used-for)
61+
- [What are base 64 encodings used for?](https://stackoverflow.com/questions/201479/what-is-base-64-encoding-used-for)
6262
- [The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)](https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses)
63-
- [Unicode list](https://home.unicode.org)
64-
- [mikeash.com](https://mikeash.com/pyblog/?tag=letsbuild)
63+
- [Unicode list](https://home.unicode.org)

concepts/error correction.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Error Correction
22

3-
- Repetation Code
4-
- Turns `1 bit` message to `3 bit` codeword.
3+
- Repetition Code
4+
- Turns a `1-bit` message into a `3-bit` codeword.
55

66
- Hamming Codes
7-
- Takes 4 bits and truns it into 7 bits codeword.
7+
- Takes 4 bits and turns it into 7 bits codeword.
88
- Parity bit - 1 in 16 to detect change
9-
- (15, 11) hamming code
9+
- (15, 11) Hamming code
1010
- Extended hamming code checks for parity bit as well
11-
- Get only the position of the bits containing 1, xor them, get error index.
11+
- Get only the position of the bits containing 1, xor them, and get error index.
1212

1313
- Reed Solomon Codes
1414
- Special case of BCH codes
@@ -18,8 +18,8 @@
1818
### Erasure Code
1919

2020
### Galois Field
21-
- Equation is solvable by radicals if there is simple way of finding it's root. Like equations.
22-
- The coefficients are rational number. Rational numbers form a field, means arithmetic operations generate another rational number.
21+
- Equation is solvable by radicals if there is a simple way of finding its root. Like equations.
22+
- The coefficients are rational numbers. Rational numbers form a field, means arithmetic operations generate another rational number.
2323

2424
# Reference
2525
- [Reed Solomon Code](https://www.cs.cmu.edu/~guyb/realworld/reedsolomon/reed_solomon_codes.html)

concepts/file format.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# File Format
2-
32
- GIF
4-
- The only framerates that GIF supports are: 100, 50, 33.33, 25, 20, 16.66, 14.3, 12.5, 11.11, 10, and lower (100/n).
3+
- The only framerates that GIF supports are 100, 50, 33.33, 25, 20, 16.66, 14.3, 12.5, 11.11, 10, and lower (100/n).
54
- There's no way to say you want 60fps.
6-
- You can say you want some frames played at 100fps, some at 50fps, alternating so that it sort-of averages to about 60fps.
5+
- You can say you want some frames played at 100fps, some at 50fps, alternating so that it sort of averages to about 60fps.
76

87
### References
98
- [File Format](https://www.youtube.com/watch?v=VVdmmN0su6E&ab_channel=LiveOverflow)

concepts/functional programming.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Functional programming
22

3-
- Object oriented programming gives bad habit about functional programming as we have lots of void functions, if a function does not return anything why would we need one?
3+
- Object-oriented programming gives bad habits about functional programming as we have lots of void functions, if a function does not return anything why would we need one?
44

55
- Thread-Safe
6-
- As if executed one after another even executed at same time
6+
- As if executed one after another even executed at the same time
77
- Reentrant
88
- Can be paused anytime by `isr()` and resumed later.
99

concepts/garbage collection.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Garbage Collection
2-
Garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program. In large servers sometiems there is GC pause to reclaim memory.
3-
2+
Garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program. In large servers sometimes there is a GC pause to reclaim memory.
43

54
### [Rethinking Garbage Collection](https://www.youtube.com/watch?v=Fte2pKMjgG0)
65

7-
- Java compilation and execution goes through th below steps
6+
- Java compilation and execution goes through the below steps
87
- JAVA Source File
98
- Static Compiler
109
- Class file
@@ -22,7 +21,7 @@ Creating a new programming language
2221
- Usage Tradeoff
2322
- Highly Engineered Perforamant System - Exact and Tracing
2423
- Java, .NET
25-
- Non Performance Critical - Reference Counting and Conservative
24+
- Non-Performance Critical - Reference Counting and Conservative
2625
- PHP, Python
2726

2827
- GC Fundamental
@@ -32,19 +31,19 @@ Creating a new programming language
3231

3332
- Allocator
3433
- Free list
35-
- Class Based Object Allocation
34+
- Class-Based Object Allocation
3635
- Bump counting
37-
- Just a full heap. Allocation by incrementing pointer
36+
- It's just a full heap. Allocation by incrementing pointer
3837

3938
- Identification
4039
- Tracing (Mark and Sweep)
41-
- Start from top (DFS). Those which are not reached garbage collected
40+
- Start from the top (DFS). Those which are not reached garbage collected
4241
- Know about full heap
4342
- Reference Counting
4443
- Incoming reference count
4544
- Know about one object
4645

47-
- Reclaimation
46+
- Reclamation
4847
- Sweep to Free
4948
- Defragment Compaction > Mark compact
5049
- Evacuate
@@ -66,16 +65,16 @@ Creating a new programming language
6665
- Nursery
6766
- Mature
6867
- Immix
69-
- An upper level hiererchy
68+
- An upper-level hierarchy
7069
- Decrease checking
7170
- Most object size 8-16 bytes
72-
- Specification in software . Never think about implementation.
73-
- Reference counting 30% slower than tracing
71+
- Specification in software. Never think about implementation.
72+
- Reference counting is 30% slower than tracing
7473
- RC immix - rust - bitc
75-
- Tracing > cant identify dead object only live
76-
- Concurrent real time system garbage collection
74+
- Tracing > cant identify dead objects only live
75+
- Concurrent real-time system garbage collection
7776

78-
- Exapmple
77+
- Example
7978
- Mostly copying collector - Apple UI Kit
8079
- BDW collector - Chakra VM - Mark sweep - Free list
8180

concepts/networking.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
| | | |
66
|--|--|--|
7-
| | PROTOCOL DATA UNIT | Devices |
7+
| | PROTOCOL DATA UNIT | Devices |
88
| Process/Application Layer | Data | App Firewalls , SSL,VPN. Proxy
99
| Host-to-Host/Transport Layer | Segments / datagrams | Traditional Load Balancing/ Network Firewalls
1010
| Network Layer | Packets | Routers (Broadcast Domain) |
@@ -16,7 +16,7 @@ HOST LAYER - MEDIA LAYER
1616
- Connect two separate network namespaces (through tap)
1717
- Network namespace
1818
- Logically isolated network stack
19-
- Connect a container or VM or virtual switch
19+
- Connect a container VM or virtual switch
2020
- Adding veth pair. Visible in ip link.
2121
- > ip link add tap1 type veth peer name tap2
2222
- Namespace add. (/var/run/netns/)

concepts/reactive.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55

66
- With `rxSwift`, variable types should always be defined with let. You don't want to ever replace a Variable, you just want to push new data into one.
77

8-
- When using Rx fully, you will usually find that your view models consist of a bunch of let's and a single constructor. It's unusual to have any other methods or even computed properties.
8+
- When using Rx fully, you will usually find that your view models consist of a bunch of lets and a single constructor. It's unusual to have any other methods or even computed properties.
99

10-
- Avoid any UI-related code in your viewModel. It includes RxCocoa extensions and drivers. ViewModel should focus specifically on business logic. Drivers are meant to be used to drive UI, so leave them for ViewControllers
11-
12-
- Try to avoid Variables and Subjects if possible. AKA try to make everything "flowing". Function into function, into function and so on and, eventually, in UI. But be afraid of subjects overuse - otherwise your project will become hard to maintain and scale in no time.
10+
- Avoid any UI-related code in your ViewModel. It includes RxCocoa extensions and drivers. ViewModel should focus specifically on business logic. Drivers are meant to be used to drive UI, so leave them for ViewControllers
1311

12+
- Try to avoid Variables and Subjects if possible. AKA trying to make everything "flowing". Function into function, into function, and so on, and, eventually, in UI. But be afraid of subject overuse - otherwise, your project will become hard to maintain and scale in no time.
1413

1514
### References
1615
- [RX Example](https://github.dev/JussiSuojanen/friends/tree/RxSwift/Friends)

concepts/remote attestation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Remote Attestation
22

3-
- `Remote attestation` is a method by which a host (client) authenticates it’s hardware and software configuration to a remote host (server).
3+
- `Remote attestation` is a method by which a host (client) authenticates its hardware and software configuration to a remote host (server).
44

5-
- The goal of remote attestation is to enable a remote system `challenger` to determine the level of trust in the integrity of platform of another system
5+
- The goal of remote attestation is to enable a remote system `challenger` to determine the level of trust in the integrity of the platform of another system
66
`attestator`.
77

8-
- Enclave sort of same idea of TPM
8+
- Enclave has sort of the same idea as TPM
99
- Intel Trusted Execution Tech
1010
- AMD PSP
1111

0 commit comments

Comments
 (0)