https://github.com/dorssel/dotnet-aes-extra
.NET Standard 2.0 implementation of AES-CTR, AES-CMAC, SIV-AES (aka AES-SIV), AES-CMAC-PRF-128 (aka PRF_AES128_CMAC), and PBKDF2-AES-CMAC-PRF-128.
https://github.com/dorssel/dotnet-aes-extra
aes aes-cmac aes-cmac-prf-128 aes-cmac-siv aes-ctr aes-ctr-mode aes-siv cmac cryptography dotnet dotnet-standard pbkdf2-aes-cmac-prf-128 siv siv-aes siv-mode
Last synced: 3 months ago
JSON representation
.NET Standard 2.0 implementation of AES-CTR, AES-CMAC, SIV-AES (aka AES-SIV), AES-CMAC-PRF-128 (aka PRF_AES128_CMAC), and PBKDF2-AES-CMAC-PRF-128.
- Host: GitHub
- URL: https://github.com/dorssel/dotnet-aes-extra
- Owner: dorssel
- License: mit
- Created: 2022-07-17T21:38:26.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-04-01T21:35:38.000Z (3 months ago)
- Last Synced: 2025-04-01T22:33:52.064Z (3 months ago)
- Topics: aes, aes-cmac, aes-cmac-prf-128, aes-cmac-siv, aes-ctr, aes-ctr-mode, aes-siv, cmac, cryptography, dotnet, dotnet-standard, pbkdf2-aes-cmac-prf-128, siv, siv-aes, siv-mode
- Language: C#
- Homepage: https://dorssel.github.io/dotnet-aes-extra/
- Size: 423 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# dotnet-aes-extra
[](https://github.com/dorssel/dotnet-aes-extra/actions?query=workflow%3ABuild+branch%3Amaster)
[](https://github.com/dorssel/dotnet-aes-extra/actions?query=workflow%3ACodeQL+branch%3Amaster)
[](https://github.com/dorssel/dotnet-aes-extra/actions?query=workflow%3AMegaLinter+branch%3Amaster)
[](https://codecov.io/gh/dorssel/dotnet-aes-extra)
[](https://api.reuse.software/info/github.com/dorssel/dotnet-aes-extra)
[](https://www.nuget.org/packages/Dorssel.Security.Cryptography.AesExtra).NET Standard 2.0 implementation of the following AES modes that are not included in .NET 6.0 / .NET Framework:
- AES-CTR, as defined by [NIST SP 800-38A](https://csrc.nist.gov/publications/detail/sp/800-38a/final)
- AES-CMAC, as defined by [NIST SP 800-38B](https://csrc.nist.gov/publications/detail/sp/800-38b/final)
- SIV-AES, as defined by [RFC 5297](https://datatracker.ietf.org/doc/html/rfc5297) \
(Note: this is often refered to as AES-SIV, but the original RFC specification uses the name SIV-AES)The implementation is for AnyCPU, and works on all platforms.
# Usage
The released binary NuGet packages and the .NET assemblies contained therein:
- use [Strong Naming](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming),
- include [SourceLink](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink),
- include [IntelliSense](https://docs.microsoft.com/en-us/visualstudio/ide/using-intellisense) compatible documentation, and
- are signed and timestamped with Authenticode.All public classes are in the `Dorssel.Security.Cryptography` namespace.
- `AesCtr` is modeled after .NET's `Aes`. So, instead of `Aes.Create()`, use `AesCtr.Create()`.
- `AesCmac` is modeled after .NET's `HMACSHA256`. So, instead of `new HMACSHA256(key)`, use `new AesCmac(key)`.
- `AesSiv` is modeled after .NET's `AesGcm`. So, instead of `new AesGcm(key)`, use `new AesSiv(key)`.