forked from ThePacketBender/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcryptography_cheat_sheet.txt
More file actions
117 lines (103 loc) · 2.68 KB
/
cryptography_cheat_sheet.txt
File metadata and controls
117 lines (103 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Cryptography
ONE-TIME PAD
C = P (XOR) K
Ciphertext = Plaintext XOR Random_Key
0 XOR 0 = 0
0 XOR 1 = 1 <Exclusive or is essential to most cryptographic functions, know it
1 XOR 0 = 1
1 XOR 1 = 0
:SYMMETRIC CIPHERS:
BLOCK CIPHERS
-DES/3DES
-GOST 28147-89
-AES
AES
P K
v v
AddRoundKey<K0<| |
v | |
SubBytes | |
ShiftRows |K|
MixColumns |e|
AddRoundKey<K1<|y|
v |E|
...(7 Rounds)|x|
v |p|
SubBytes |a|
ShiftRows |n|
MixColumns |s|
AddRoundKey<K9<|i|
v |o|
SubBytes |n|
ShiftRows | |
MixColumns | |
AddRoundKey<K10| |
v
C
AddRoundKey - XORs a round key to the internal state
SubBytes - Replaces each byte (s0,s1,..s15) with another byte according to an S-Box
ShiftRows - Shifts the ith row of i potisions, for in range 0-3
MixColumns - Applies the same linear transformation to each of the four columns of the state
(Example S-Box)
s0|s4|s8|s12
--|--|--|--
s1|s5|s9|s13
--|--|--|--
s2|s6|s10|s14
--|--|--|--
s3|s7|s11|s15
(i0,i1,i2,i3)
Block Cipher Attack Vectors
Meet-In-the-Middle Attacks
Padding Oracle Attacks
*padding oracle attacks record which inputs have a calid padding and which don't, then exploit to decrypt chosen ciphertext values
**only effective against CBC mode with padding
Stream Ciphers
-bluetooth, 4G, WiFi, TLS, &c...
Hash Lengths
Hash Size
MD5 Hash Length 16 Bytes
SHA-1 Hash Length 20 Bytes
SHA-256 Hash Length 32 Bytes
SHA-512 Hash Length 64 Bytes
Hash Examples
Likely just use hash-identifier for this but here are some example hashes:
Hash Example
MD5 Hash Example
8743b52063cd84097a65d1633f5c74f5
MD5 $PASS:$SALT Example
01dfae6e5d4d90d9892622325959afbe:7050461
MD5 $SALT:$PASS
f0fda58630310a6dd91a7d8f0a4ceda2:4225637426
SHA1 Hash Example
b89eaac7e61417341b710b727768294d0e6a277b
SHA1 $PASS:$SALT
2fc5a684737ce1bf7b3b239df432416e0dd07357:2014
SHA1 $SALT:$PASS
cac35ec206d868b7d7cb0b55f31d9425b075082b:5363620024
SHA-256
127e6fbfe24a750e72930c220a8e138275656b
8e5d8f48a98c3c92df2caba935
SHA-256 $PASS:$SALT
c73d08de890479518ed60cf670d17faa26a4a7
1f995c1dcc978165399401a6c4
SHA-256 $SALT:$PASS
eb368a2dfd38b405f014118c7d9747fcc97f4
f0ee75c05963cd9da6ee65ef498:560407001617
SHA-512
82a9dda829eb7f8ffe9fbe49e45d47d2dad9
664fbb7adf72492e3c81ebd3e29134d9bc
12212bf83c6840f10e8246b9db54a4
859b7ccd0123d86e5872c1e5082f
SHA-512 $PASS:$SALT
e5c3ede3e49fb86592fb03f471c35ba13e8
d89b8ab65142c9a8fdafb635fa2223c24e5
558fd9313e8995019dcbec1fb58414
6b7bb12685c7765fc8c0d51379fd
SHA-512 $SALT:$PASS
976b451818634a1e2acba682da3fd6ef
a72adf8a7a08d7939550c244b237c72c7d4236754
4e826c0c83fe5c02f97c0373b6b1
386cc794bf0d21d2df01bb9c08a
NTLM Hash Example
b4b9b02e6f09a9bd760f388b67351e2b