@@ -30,7 +30,8 @@ of cryptography by the development team for the application or system.
30
30
31
31
Although cryptography was initially restricted primarily to the military and the realm of academia,
32
32
cryptography has become ubiquitous in securing software applications.
33
- Common every day uses of cryptography include mobile phones, passwords, SSL VPNs, smart cards, and DVDs.
33
+ Common every day uses of cryptography include cloud storage, passwords,
34
+ SSL VPNs, smart cards, and end-to-end encrypted messaging apps.
34
35
Cryptography has permeated through everyday life, and is heavily used by many web applications.
35
36
36
37
Cryptography is one of the more advanced topics of information security,
@@ -40,7 +41,7 @@ each with advantages and disadvantages that need to be thoroughly understood by
40
41
41
42
The proper and accurate implementation of cryptography is extremely critical to its efficacy.
42
43
A small mistake in configuration or coding will result in removing most of the protection
43
- and rending the crypto implementation useless.
44
+ and rendering the crypto implementation useless.
44
45
45
46
A good understanding of crypto is required to be able to discern between solid products and snake oil.
46
47
The inherent complexity of crypto makes it easy to fall for fantastic claims from vendors about their product.
@@ -50,8 +51,8 @@ If a vendor says "trust us, we have had experts look at this," chances are they
50
51
#### Confidentiality
51
52
52
53
For the purposes of this section, confidentiality is defined as "no unauthorized disclosure of information".
53
- Cryptography addresses this via encryption of either the data at rest or data in transit by
54
- protecting the information from all who do not hold the decryption key.
54
+ Cryptography addresses this via encryption of either the [ data at rest] [ cstorage ] or data
55
+ in transit by protecting the information from all who do not hold the decryption key.
55
56
Cryptographic hashes (secure, one way hashes) to prevent passwords from disclosure.
56
57
57
58
#### Authentication
@@ -63,15 +64,15 @@ Cryptography is central to authentication:
63
64
1 . to protect the provided corroborating evidence (for example hashing of passwords for subsequent storage)
64
65
2 . in authentication protocols often use cryptography to either directly authenticate entities
65
66
or to exchange credentials in a secure manner
66
- 3 . to verify the identity one or both parties in exchanging messages,
67
+ 3 . to verify the identity of one or both parties in exchanging messages,
67
68
for example identity verification within [ Transport Layer Security] [ tls ] (TLS)
68
69
69
70
OpenID Connect is widely used as an identity layer on top of the OAuth 2.0 protocol,
70
71
see the [ OAuth 2.0 Protocol] [ csoauth ] Cheat Sheet.
71
72
72
73
#### Integrity
73
74
74
- Integrity ensures that even authorized users have performed no accidental or malicious alternation of information.
75
+ Integrity ensures that even authorized users have performed no accidental or malicious alteration of information.
75
76
Cryptography can be used to prevent tampering by means of Message Authentication Codes (MACs) or digital signatures.
76
77
77
78
The term 'message authenticity' refers to ensuring the integrity of information,
@@ -83,7 +84,7 @@ and, if asymmetric encryption is used, can authenticate the sender.
83
84
84
85
#### Non-repudiation
85
86
86
- Non-repudiation of sender ensures that someone sending a message should not be able to deny later that they have sent it .
87
+ Non-repudiation ensures that a sender cannot later deny having sent a message .
87
88
Non-repudiation of receiver means that the receiver of a message should not be able to deny that they have received it.
88
89
Cryptography can be used to provide non-repudiation by providing unforgeable messages or replies to messages.
89
90
@@ -142,13 +143,13 @@ Symmetric ciphers come in two main types:
142
143
1 . Block ciphers, which operate on a block of characters (typically 8 or 16 octets) at a time.
143
144
An example of a block cipher is AES
144
145
2 . Stream ciphers, which operate on a single bit (or occasionally a single byte) at a time.
145
- Examples of a stream ciphers are RC4 (aka, ARC4 ) and Salsa20
146
+ Examples of stream ciphers are ChaCha20 (often paired with Poly1305 ) and Salsa20
146
147
147
148
Note that all block ciphers can also operate in 'streaming mode' by selecting the appropriate cipher mode.
148
149
149
150
#### Cipher Modes
150
151
151
- Block ciphers can function in different modes of operations known as "cipher modes".
152
+ Block ciphers can function in different modes of operation known as "cipher modes".
152
153
This cipher mode algorithmically describes how a cipher operates to repeatedly
153
154
apply its encryption or decryption mechanism to a given cipher block.
154
155
Cipher modes are important because they have an enormous impact on both the confidentiality
@@ -157,6 +158,11 @@ and the message authenticity of the resulting ciphertext messages.
157
158
Almost all cryptographic libraries support the four original DES cipher modes of ECB, CBC (Cipher Block Chaining)
158
159
OFB (Output Feedback), and CFB (Cipher Feedback). Many also support CTR (Counter) mode.
159
160
161
+ Note that the DES modes are insecure and aren't used today.
162
+ Modern standards indicate the use of AEAD (Authenticated Encryption with Associated Data) modes.
163
+
164
+ These work on both block ciphers and stream ciphers, such as GCM, CCM, OCB and EAX.
165
+
160
166
#### Initialization vector
161
167
162
168
A cryptographic initialization vector (IV) is a fixed size input to a block cipher's encryption / decryption primitive.
@@ -248,6 +254,7 @@ These protocols prevent adversaries from learning the key or forcing their own k
248
254
* [ SAML Security] [ sscs ]
249
255
* [ Secure Product Design] [ spdcs ]
250
256
* [ User Privacy Protection] [ uppcs ]
257
+ * [ Cryptographic storage] [ cstorage ]
251
258
252
259
----
253
260
@@ -266,5 +273,6 @@ then [submit an issue][issue0404] or [edit on GitHub][edit0404].
266
273
[ spdcs ] : https://cheatsheetseries.owasp.org/cheatsheets/Secure_Product_Design_Cheat_Sheet
267
274
[ tls ] : https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet
268
275
[ uppcs ] : https://cheatsheetseries.owasp.org/cheatsheets/User_Privacy_Protection_Cheat_Sheet
276
+ [ cstorage ] : https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html
269
277
270
278
\newpage
0 commit comments