Skip to content

Commit 3cfb6b5

Browse files
author
Filipe GP
committed
Update README.md
1 parent 546e04a commit 3cfb6b5

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# EntityFrameworkCore.DataEncryption
22

3-
[![Build Status](https://dev.azure.com/eastrall/EntityFrameworkCore.DataEncryption/_apis/build/status/EntityFrameworkCore.DataEncryption?branchName=refs%2Fpull%2F14%2Fmerge)](https://dev.azure.com/eastrall/EntityFrameworkCore.DataEncryption/_build/latest?definitionId=9&branchName=refs%2Fpull%2F14%2Fmerge)
4-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2bfb621fd6fc453488d022a3eec8069e)](https://www.codacy.com/app/Eastrall/EntityFrameworkCore.DataEncryption?utm_source=github.com&utm_medium=referral&utm_content=Eastrall/EntityFrameworkCore.DataEncryption&utm_campaign=Badge_Grade)
3+
[![Build Status](https://dev.azure.com/eastrall/EntityFrameworkCore.DataEncryption/_apis/build/status/EntityFrameworkCore.DataEncryption?branchName=master)](https://dev.azure.com/eastrall/EntityFrameworkCore.DataEncryption/_build/latest?definitionId=9&branchName=master)
54
[![codecov](https://codecov.io/gh/Eastrall/EntityFrameworkCore.DataEncryption/branch/master/graph/badge.svg)](https://codecov.io/gh/Eastrall/EntityFrameworkCore.DataEncryption)
65
[![Nuget](https://img.shields.io/nuget/v/EntityFrameworkCore.DataEncryption.svg)](https://www.nuget.org/packages/EntityFrameworkCore.DataEncryption)
76

@@ -72,6 +71,8 @@ The code bellow creates a new `AesEncryption` provider and gives it to the curre
7271

7372
## Create an encryption provider
7473

74+
> :warning: This section is outdated and doesn't work for V3.0.0 and will be updated soon.
75+
7576
`EntityFrameworkCore.DataEncryption` gives the possibility to create your own encryption providers. To do so, create a new class and make it inherit from `IEncryptionProvider`. You will need to implement the `Encrypt(string)` and `Decrypt(string)` methods.
7677

7778
```csharp
@@ -108,15 +109,35 @@ public class DatabaseContext : DbContext
108109
}
109110
```
110111

111-
112112
## Important notes
113113

114114
### AES Provider structure
115115

116116
The following section describes how encrypted fields using the built-in AES provider encrypts data.
117+
There is two available modes :
118+
119+
* Fixed IV
120+
* Dynamic IV
121+
122+
#### Fixed IV
123+
124+
A fixed IV is generated at setup and is used for every encrypted fields on the database.
125+
This might be a security issue depending on your context.
126+
127+
#### Dynamic IV
117128

118129
For each encrypted field, the provider generates a new IV with a length of `16 bytes`. These 16 bytes are written at the begining of the `CryptoStream` followed by the actual input to encrypt.
119130

120131
Similarly, for reading, the provider reads the first **16 bytes** from the input data converted as a `byte[]` to retrieve the initialization vector and then read the encrypted content.
121132

122133
For more information, checkout the [`AesProvider`](https://github.com/Eastrall/EntityFrameworkCore.DataEncryption/blob/master/src/EntityFrameworkCore.DataEncryption/Providers/AesProvider.cs#L58) class.
134+
135+
> :warning: When using Dynamic IV, you cannot use the Entity Framework LINQ extensions because the provider will generate a new IV per value, which will create unexpected behaviors.
136+
137+
## Thanks
138+
139+
I would like to thank all the people that supports and contributes to the project and helped to improve the library. :smile:
140+
141+
## Credits
142+
143+
Package Icon : from [Icons8](https://icons8.com/)

src/EntityFrameworkCore.DataEncryption/EntityFrameworkCore.DataEncryption.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@
1616
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1717
<PackageTags>entity-framework-core, extensions, dotnet-core, dotnet, encryption, fluent-api</PackageTags>
1818
<PackageIcon>icon.png</PackageIcon>
19-
<Copyright>Filipe GOMES PEIXOTO © 2019 - 2020</Copyright>
19+
<Copyright>Filipe GOMES PEIXOTO © 2019 - 2021</Copyright>
2020
<Description>A plugin for Microsoft.EntityFrameworkCore to add support of encrypted fields using built-in or custom encryption providers.</Description>
2121
<PackageLicenseFile>LICENSE</PackageLicenseFile>
22-
<PackageReleaseNotes>
23-
- Add support for storing data as binary or Base64
24-
- Add support for SecureString and binary model properties
25-
</PackageReleaseNotes>
22+
<PackageReleaseNotes>- Add support for storing data as binary or Base64
23+
- Add support for SecureString and binary model properties </PackageReleaseNotes>
24+
</PropertyGroup>
25+
26+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
27+
<GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
2628
</PropertyGroup>
2729

2830
<ItemGroup>

0 commit comments

Comments
 (0)