Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rijndael in class library (package) not available for .NET Core

Please help me. Where to find the Rijndael Security Cryptography in .NET Core?

What dependency I must to include in my class library (Package) project?

like image 894
zenixgrace Avatar asked Mar 10 '16 09:03

zenixgrace


People also ask

What is Rijndael algorithm in c#?

Rijndael is an iterated block cipher, meaning that it encrypts and decrypts a block of data by the iteration or round of a specific transformation. It supports encryption key sizes of 128, 192, and 256 bits and handles data in 128-bit blocks.

Is Rijndael obsolete?

The Rijndael and RijndaelManaged types are marked as obsolete, starting in . NET 6.

What is IV in Rijndael?

The initialization vector (IV) to use for the symmetric algorithm.

Is RijndaelManaged secure?

The Rijndael algorithm, in conjunction with safe configuration values (i.e. AES ), is very robust and secure. The only true measure of an encryption algorithm's security is its consistent and long-lived exposure to cryptanalysis and attempts to defeat it by many cryptographers.


1 Answers

The Rijndael implementation is not (yet) ported to .NET Core. You could use AES (which is a subset of Rijndael) using the System.Security.Cryptography.Algorithms package which targets netstandard1.3:

var aes = System.Security.Cryptography.Aes.Create();

Note: you should only add this package dependency to the netstandard1.3 TFM, as it exists in the core library of the full framework already:

"netstandard1.3": {
  "dependencies": {
    "System.Security.Cryptography.Algorithms": "4.2.0"
  }
}
like image 177
Henk Mollema Avatar answered Sep 21 '22 17:09

Henk Mollema