Skip to content

.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.

License

Notifications You must be signed in to change notification settings

dorssel/dotnet-aes-extra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotnet-aes-extra

Build CodeQL Lint Codecov REUSE NuGet

.NET Standard 2.0 implementation of the following AES modes that are not included in .NET:

The implementation is for AnyCPU, and works on all platforms.

Usage

The released NuGet package and the .NET assemblies contained therein have the following properties:

All public classes are in the Dorssel.Security.Cryptography namespace.

  • AesCtr is modeled after .NET's Aes.
    Use AesCtr.Create() instead of Aes.Create().

  • AesCmac is modeled after .NET's HMACSHA256
    Use new AesCmac(key) instead of new HMACSHA256(key).

  • AesSiv is modeled after .NET's AesGcm.
    Use new AesSiv(key) instead of new AesGcm(key).

  • For AES-CMAC-PRF-128, AesCmacPrf128 is modeled after .NET's HKDF.
    Use AesCmacPrf128.DeriveKey() instead of HKDF.DeriveKey().

  • For PBKDF2-AES-CMAC-PRF-128, AesCmacPrf128 is modeled after .NET's Rfc2898DeriveBytes.
    Use AesCmacPrf128.Pbkdf2() instead of Rfc2898DeriveBytes.Pbkdf2().

For further information, see the API documentation.