You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/standard/security/cryptography-model.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: ".NET Cryptography Model"
2
+
title: ".NET cryptography model"
3
3
description: Review implementations of usual cryptographic algorithms in .NET. Learn the extensible cryptography model of object inheritance, stream design, & configuration.
4
-
ms.date: 07/14/2020
4
+
ms.date: 02/26/2021
5
5
dev_langs:
6
6
- "csharp"
7
7
- "vb"
@@ -10,11 +10,11 @@ helpviewer_keywords:
10
10
- "encryption [.NET], model"
11
11
ms.assetid: 12fecad4-fbab-432a-bade-2f05976a2971
12
12
---
13
-
# .NET Cryptography Model
13
+
# .NET cryptography model
14
14
15
15
.NET provides implementations of many standard cryptographic algorithms, and the .NET cryptography model is extensible.
16
16
17
-
## Object Inheritance
17
+
## Object inheritance
18
18
19
19
The .NET cryptography system implements an extensible pattern of derived class inheritance. The hierarchy is as follows:
20
20
@@ -26,7 +26,7 @@ The .NET cryptography system implements an extensible pattern of derived class i
26
26
27
27
This pattern of derived classes lets you add a new algorithm or a new implementation of an existing algorithm. For example, to create a new public-key algorithm, you would inherit from the <xref:System.Security.Cryptography.AsymmetricAlgorithm> class. To create a new implementation of a specific algorithm, you would create a non-abstract derived class of that algorithm.
28
28
29
-
## How Algorithms Are Implemented in .NET
29
+
## How algorithms are implemented in .NET
30
30
31
31
As an example of the different implementations available for an algorithm, consider symmetric algorithms. The base for all symmetric algorithms is <xref:System.Security.Cryptography.SymmetricAlgorithm>, which is inherited by <xref:System.Security.Cryptography.Aes>, <xref:System.Security.Cryptography.TripleDES>, and others that are no longer recommended.
32
32
@@ -42,14 +42,14 @@ In .NET Core and .NET 5 and later versions, all implementation classes (`*Crypto
42
42
43
43
In most cases, you don't need to directly reference an algorithm implementation class, such as `AesCryptoServiceProvider`. The methods and properties you typically need are on the base algorithm class, such as `Aes`. Create an instance of a default implementation class by using a factory method on the base algorithm class, and refer to the base algorithm class. For example, see the highlighted line of code in the following example:
Cryptographic configuration lets you resolve a specific implementation of an algorithm to an algorithm name, allowing extensibility of the .NET cryptography classes. You can add your own hardware or software implementation of an algorithm and map the implementation to the algorithm name of your choice. If an algorithm is not specified in the configuration file, the default settings are used.
51
51
52
-
## Choosing an Algorithm
52
+
## Choose an algorithm
53
53
54
54
You can select an algorithm for different reasons: for example, for data integrity, for data privacy, or to generate a key. Symmetric and hash algorithms are intended for protecting data for either integrity reasons (protect from change) or privacy reasons (protect from viewing). Hash algorithms are used primarily for data integrity.
0 commit comments