構文
解説
使用例Rijndael クラスを使用してデータを暗号化し、復号化する方法を次のコード例に示します。
Imports System.Security.Cryptography Imports System.Text Imports System.IO Module RijndaelSample Sub Main() Try ' Create a new Rijndael object to generate a key ' and initialization vector (IV). Dim RijndaelAlg As Rijndael = Rijndael.Create ' Create a string to encrypt. Dim sData As String = "Here is some data to encrypt." Dim FileName As String = "CText.txt" ' Encrypt text to a file using the file name, key, and IV. EncryptTextToFile(sData, FileName, RijndaelAlg.Key, RijndaelAlg.IV) ' Decrypt the text from a file using the file name, key, and IV. Dim Final As String = DecryptTextFromFile(FileName, RijndaelAlg.Key, RijndaelAlg.IV) ' Display the decrypted string to the console. Console.WriteLine(Final) Catch e As Exception Console.WriteLine(e.Message) End Try Console.ReadLine() End Sub Sub EncryptTextToFile(ByVal Data As String, ByVal FileName As String, ByVal Key() As Byte, ByVal IV() As Byte) Try ' Create or open the specified file. Dim fStream As FileStream = File.Open(FileName, FileMode.OpenOrCreate) ' Create a new Rijndael object. Dim RijndaelAlg As Rijndael = Rijndael.Create ' Create a CryptoStream using the FileStream ' and the passed key and initialization vector (IV). Dim cStream As New CryptoStream(fStream, _ RijndaelAlg.CreateEncryptor(Key, IV), _ CryptoStreamMode.Write) ' Create a StreamWriter using the CryptoStream. Dim sWriter As New StreamWriter(cStream) Try ' Write the data to the stream ' to encrypt it. sWriter.WriteLine(Data) Catch e As Exception Console.WriteLine("An error occurred: {0}", e.Message) Finally ' Close the streams and ' close the file. sWriter.Close() cStream.Close() fStream.Close() End Try Catch e As CryptographicException Console.WriteLine("A Cryptographic error occurred: {0}", e.Message) Catch e As UnauthorizedAccessException Console.WriteLine("A file error occurred: {0}", e.Message) End Try End Sub Function DecryptTextFromFile(ByVal FileName As String, ByVal Key() As Byte, ByVal IV() As Byte) As String Try ' Create or open the specified file. Dim fStream As FileStream = File.Open(FileName, FileMode.OpenOrCreate) ' Create a new Rijndael object. Dim RijndaelAlg As Rijndael = Rijndael.Create ' Create a CryptoStream using the FileStream ' and the passed key and initialization vector (IV). Dim cStream As New CryptoStream(fStream, _ RijndaelAlg.CreateDecryptor(Key, IV), _ CryptoStreamMode.Read) ' Create a StreamReader using the CryptoStream. Dim sReader As New StreamReader(cStream) ' Read the data from the stream ' to decrypt it. Dim val As String = Nothing Try val = sReader.ReadLine() Catch e As Exception Console.WriteLine("An Cerror occurred: {0}", e.Message) Finally ' Close the streams and ' close the file. sReader.Close() cStream.Close() fStream.Close() End Try ' Return the string. Return val Catch e As CryptographicException Console.WriteLine("A Cryptographic error occurred: {0}", e.Message) Return Nothing Catch e As UnauthorizedAccessException Console.WriteLine("A file error occurred: {0}", e.Message) Return Nothing End Try End Function End Module
using System; using System.Security.Cryptography; using System.Text; using System.IO; class RijndaelSample { static void Main() { try { // Create a new Rijndael object to generate a key // and initialization vector (IV). Rijndael RijndaelAlg = Rijndael.Create(); // Create a string to encrypt. string sData = "Here is some data to encrypt."; string FileName = "CText.txt"; // Encrypt text to a file using the file name, key, and IV. EncryptTextToFile(sData, FileName, RijndaelAlg.Key, RijndaelAlg.IV); // Decrypt the text from a file using the file name, key, and IV. string Final = DecryptTextFromFile(FileName, RijndaelAlg.Key, RijndaelAlg.IV); // Display the decrypted string to the console. Console.WriteLine(Final); } catch (Exception e) { Console.WriteLine(e.Message); } Console.ReadLine(); } public static void EncryptTextToFile(String Data, String FileName, byte[] Key, byte[] IV) { try { // Create or open the specified file. FileStream fStream = File.Open(FileName, FileMode.OpenOrCreate); // Create a new Rijndael object. Rijndael RijndaelAlg = Rijndael.Create(); // Create a CryptoStream using the FileStream // and the passed key and initialization vector (IV). CryptoStream cStream = new CryptoStream(fStream, RijndaelAlg.CreateEncryptor(Key, IV), CryptoStreamMode.Write); // Create a StreamWriter using the CryptoStream. StreamWriter sWriter = new StreamWriter(cStream); try { // Write the data to the stream // to encrypt it. sWriter.WriteLine(Data); } catch (Exception e) { Console.WriteLine("An error occurred: {0}", e.Message); } finally { // Close the streams and // close the file. sWriter.Close(); cStream.Close(); fStream.Close(); } } catch (CryptographicException e) { Console.WriteLine("A Cryptographic error occurred: {0}", e.Message); } catch (UnauthorizedAccessException e) { Console.WriteLine("A file error occurred: {0}", e.Message); } } public static string DecryptTextFromFile(String FileName, byte[] Key, byte[] IV) { try { // Create or open the specified file. FileStream fStream = File.Open(FileName, FileMode.OpenOrCreate); // Create a new Rijndael object. Rijndael RijndaelAlg = Rijndael.Create(); // Create a CryptoStream using the FileStream // and the passed key and initialization vector (IV). CryptoStream cStream = new CryptoStream(fStream, RijndaelAlg.CreateDecryptor(Key, IV), CryptoStreamMode.Read); // Create a StreamReader using the CryptoStream. StreamReader sReader = new StreamReader(cStream); string val = null; try { // Read the data from the stream // to decrypt it. val = sReader.ReadLine(); } catch (Exception e) { Console.WriteLine("An error occurred: {0}", e.Message); } finally { // Close the streams and // close the file. sReader.Close(); cStream.Close(); fStream.Close(); } // Return the string. return val; } catch (CryptographicException e) { Console.WriteLine("A Cryptographic error occurred: {0}", e.Message); return null; } catch (UnauthorizedAccessException e) { Console.WriteLine("A file error occurred: {0}", e.Message); return null; } } }
継承階層
スレッド セーフ
プラットフォームWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照
構文
解説抽象クラスのインスタンスは作成できません。アプリケーション コードは、派生クラスの新しいインスタンスを作成します。
このメソッドは、SymmetricAlgorithm のプロテクト フィールドを次の表に示す既定値で初期化します。
使用例Rijndael クラスを使用してデータを暗号化し、復号化する方法を次のコード例に示します。
Imports System.Security.Cryptography Imports System.Text Imports System.IO Module RijndaelSample Sub Main() Try ' Create a new Rijndael object to generate a key ' and initialization vector (IV). Dim RijndaelAlg As Rijndael = Rijndael.Create ' Create a string to encrypt. Dim sData As String = "Here is some data to encrypt." Dim FileName As String = "CText.txt" ' Encrypt text to a file using the file name, key, and IV. EncryptTextToFile(sData, FileName, RijndaelAlg.Key, RijndaelAlg.IV) ' Decrypt the text from a file using the file name, key, and IV. Dim Final As String = DecryptTextFromFile(FileName, RijndaelAlg.Key, RijndaelAlg.IV) ' Display the decrypted string to the console. Console.WriteLine(Final) Catch e As Exception Console.WriteLine(e.Message) End Try Console.ReadLine() End Sub Sub EncryptTextToFile(ByVal Data As String, ByVal FileName As String, ByVal Key() As Byte, ByVal IV() As Byte) Try ' Create or open the specified file. Dim fStream As FileStream = File.Open(FileName, FileMode.OpenOrCreate) ' Create a new Rijndael object. Dim RijndaelAlg As Rijndael = Rijndael.Create ' Create a CryptoStream using the FileStream ' and the passed key and initialization vector (IV). Dim cStream As New CryptoStream(fStream, _ RijndaelAlg.CreateEncryptor(Key, IV), _ CryptoStreamMode.Write) ' Create a StreamWriter using the CryptoStream. Dim sWriter As New StreamWriter(cStream) Try ' Write the data to the stream ' to encrypt it. sWriter.WriteLine(Data) Catch e As Exception Console.WriteLine("An error occurred: {0}", e.Message) Finally ' Close the streams and ' close the file. sWriter.Close() cStream.Close() fStream.Close() End Try Catch e As CryptographicException Console.WriteLine("A Cryptographic error occurred: {0}", e.Message) Catch e As UnauthorizedAccessException Console.WriteLine("A file error occurred: {0}", e.Message) End Try End Sub Function DecryptTextFromFile(ByVal FileName As String, ByVal Key() As Byte, ByVal IV() As Byte) As String Try ' Create or open the specified file. Dim fStream As FileStream = File.Open(FileName, FileMode.OpenOrCreate) ' Create a new Rijndael object. Dim RijndaelAlg As Rijndael = Rijndael.Create ' Create a CryptoStream using the FileStream ' and the passed key and initialization vector (IV). Dim cStream As New CryptoStream(fStream, _ RijndaelAlg.CreateDecryptor(Key, IV), _ CryptoStreamMode.Read) ' Create a StreamReader using the CryptoStream. Dim sReader As New StreamReader(cStream) ' Read the data from the stream ' to decrypt it. Dim val As String = Nothing Try val = sReader.ReadLine() Catch e As Exception Console.WriteLine("An Cerror occurred: {0}", e.Message) Finally ' Close the streams and ' close the file. sReader.Close() cStream.Close() fStream.Close() End Try ' Return the string. Return val Catch e As CryptographicException Console.WriteLine("A Cryptographic error occurred: {0}", e.Message) Return Nothing Catch e As UnauthorizedAccessException Console.WriteLine("A file error occurred: {0}", e.Message) Return Nothing End Try End Function End Module
using System; using System.Security.Cryptography; using System.Text; using System.IO; class RijndaelSample { static void Main() { try { // Create a new Rijndael object to generate a key // and initialization vector (IV). Rijndael RijndaelAlg = Rijndael.Create(); // Create a string to encrypt. string sData = "Here is some data to encrypt."; string FileName = "CText.txt"; // Encrypt text to a file using the file name, key, and IV. EncryptTextToFile(sData, FileName, RijndaelAlg.Key, RijndaelAlg.IV); // Decrypt the text from a file using the file name, key, and IV. string Final = DecryptTextFromFile(FileName, RijndaelAlg.Key, RijndaelAlg.IV); // Display the decrypted string to the console. Console.WriteLine(Final); } catch (Exception e) { Console.WriteLine(e.Message); } Console.ReadLine(); } public static void EncryptTextToFile(String Data, String FileName, byte[] Key, byte[] IV) { try { // Create or open the specified file. FileStream fStream = File.Open(FileName, FileMode.OpenOrCreate); // Create a new Rijndael object. Rijndael RijndaelAlg = Rijndael.Create(); // Create a CryptoStream using the FileStream // and the passed key and initialization vector (IV). CryptoStream cStream = new CryptoStream(fStream, RijndaelAlg.CreateEncryptor(Key, IV), CryptoStreamMode.Write); // Create a StreamWriter using the CryptoStream. StreamWriter sWriter = new StreamWriter(cStream); try { // Write the data to the stream // to encrypt it. sWriter.WriteLine(Data); } catch (Exception e) { Console.WriteLine("An error occurred: {0}", e.Message); } finally { // Close the streams and // close the file. sWriter.Close(); cStream.Close(); fStream.Close(); } } catch (CryptographicException e) { Console.WriteLine("A Cryptographic error occurred: {0}", e.Message); } catch (UnauthorizedAccessException e) { Console.WriteLine("A file error occurred: {0}", e.Message); } } public static string DecryptTextFromFile(String FileName, byte[] Key, byte[] IV) { try { // Create or open the specified file. FileStream fStream = File.Open(FileName, FileMode.OpenOrCreate); // Create a new Rijndael object. Rijndael RijndaelAlg = Rijndael.Create(); // Create a CryptoStream using the FileStream // and the passed key and initialization vector (IV). CryptoStream cStream = new CryptoStream(fStream, RijndaelAlg.CreateDecryptor(Key, IV), CryptoStreamMode.Read); // Create a StreamReader using the CryptoStream. StreamReader sReader = new StreamReader(cStream); string val = null; try { // Read the data from the stream // to decrypt it. val = sReader.ReadLine(); } catch (Exception e) { Console.WriteLine("An error occurred: {0}", e.Message); } finally { // Close the streams and // close the file. sReader.Close(); cStream.Close(); fStream.Close(); } // Return the string. return val; } catch (CryptographicException e) { Console.WriteLine("A Cryptographic error occurred: {0}", e.Message); return null; } catch (UnauthorizedAccessException e) { Console.WriteLine("A file error occurred: {0}", e.Message); return null; } } }
プラットフォームWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照
プロテクト フィールド| 名前 | 説明 | |
|---|---|---|
| BlockSizeValue | 暗号操作のブロック サイズをビット単位で表します。 ( SymmetricAlgorithm から継承されます。) |
| FeedbackSizeValue | 暗号操作のフィードバック サイズをビット単位で表します。 ( SymmetricAlgorithm から継承されます。) |
| IVValue | 対称アルゴリズムで使用する初期化ベクタ (IV) を表します。 ( SymmetricAlgorithm から継承されます。) |
| KeySizeValue | 対称アルゴリズムで使用する共有キーのサイズをビット単位で表します。 ( SymmetricAlgorithm から継承されます。) |
| KeyValue | 対称アルゴリズムの共有キーを表します。 ( SymmetricAlgorithm から継承されます。) |
| LegalBlockSizesValue | 対称アルゴリズムでサポートされているブロック サイズを指定します。 ( SymmetricAlgorithm から継承されます。) |
| LegalKeySizesValue | 対称アルゴリズムでサポートされているキー サイズを指定します。 ( SymmetricAlgorithm から継承されます。) |
| ModeValue | 対称アルゴリズムで使用する暗号モードを表します。 ( SymmetricAlgorithm から継承されます。) |
| PaddingValue | 対称アルゴリズムで使用する埋め込みモードを表します。 ( SymmetricAlgorithm から継承されます。) |
参照
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| BlockSize | 暗号操作のブロック サイズをビット単位で取得または設定します。 ( SymmetricAlgorithm から継承されます。) |
| FeedbackSize | 暗号操作のフィードバック サイズをビット単位で取得または設定します。 ( SymmetricAlgorithm から継承されます。) |
| IV | 対称アルゴリズムの初期化ベクタ (IV) を取得または設定します。 ( SymmetricAlgorithm から継承されます。) |
| Key | 対称アルゴリズムの共有キーを取得または設定します。 ( SymmetricAlgorithm から継承されます。) |
| KeySize | 対称アルゴリズムで使用する共有キーのサイズをビット単位で取得または設定します。 ( SymmetricAlgorithm から継承されます。) |
| LegalBlockSizes | 対称アルゴリズムでサポートされているブロック サイズを取得します。 ( SymmetricAlgorithm から継承されます。) |
| LegalKeySizes | 対称アルゴリズムでサポートされているキー サイズを取得します。 ( SymmetricAlgorithm から継承されます。) |
| Mode | 対称アルゴリズムの操作モードを取得または設定します。 ( SymmetricAlgorithm から継承されます。) |
| Padding | 対称アルゴリズムで使用する埋め込みモードを取得または設定します。 ( SymmetricAlgorithm から継承されます。) |
参照
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| Clear | SymmetricAlgorithm クラスによって使用されているすべてのリソースを解放します。 ( SymmetricAlgorithm から継承されます。) |
| Create | オーバーロードされます。 Rijndael アルゴリズムを実行する暗号オブジェクトを作成します。 |
| CreateDecryptor | オーバーロードされます。 対称復号化オブジェクトを作成します。 ( SymmetricAlgorithm から継承されます。) |
| CreateEncryptor | オーバーロードされます。 対称暗号化オブジェクトを作成します。 ( SymmetricAlgorithm から継承されます。) |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
| GenerateIV | 派生クラスでオーバーライドされると、アルゴリズムで使用するランダムな初期化ベクタ (IV) を生成します。 ( SymmetricAlgorithm から継承されます。) |
| GenerateKey | 派生クラスでオーバーライドされると、アルゴリズムで使用するランダム キー (Key) を生成します。 ( SymmetricAlgorithm から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
| GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
| ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |
| ValidKeySize | 指定されたキー サイズが、現在のアルゴリズムに対して有効かどうかを判断します。 ( SymmetricAlgorithm から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Dispose | SymmetricAlgorithm によって使用されているアンマネージ リソースを解放し、オプションでマネージ リソースも解放します。 ( SymmetricAlgorithm から継承されます。) |
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
参照Rijndael 対称暗号化アルゴリズムのすべての実装の継承元となる基本クラスを表します。
Rijndael データ型で公開されるメンバを以下の表に示します。
プロテクト コンストラクタ
プロテクト フィールド| 名前 | 説明 | |
|---|---|---|
| BlockSizeValue | 暗号操作のブロック サイズをビット単位で表します。(SymmetricAlgorithm から継承されます。) |
| FeedbackSizeValue | 暗号操作のフィードバック サイズをビット単位で表します。(SymmetricAlgorithm から継承されます。) |
| IVValue | 対称アルゴリズムで使用する初期化ベクタ (IV) を表します。(SymmetricAlgorithm から継承されます。) |
| KeySizeValue | 対称アルゴリズムで使用する共有キーのサイズをビット単位で表します。(SymmetricAlgorithm から継承されます。) |
| KeyValue | 対称アルゴリズムの共有キーを表します。(SymmetricAlgorithm から継承されます。) |
| LegalBlockSizesValue | 対称アルゴリズムでサポートされているブロック サイズを指定します。(SymmetricAlgorithm から継承されます。) |
| LegalKeySizesValue | 対称アルゴリズムでサポートされているキー サイズを指定します。(SymmetricAlgorithm から継承されます。) |
| ModeValue | 対称アルゴリズムで使用する暗号モードを表します。(SymmetricAlgorithm から継承されます。) |
| PaddingValue | 対称アルゴリズムで使用する埋め込みモードを表します。(SymmetricAlgorithm から継承されます。) |
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| BlockSize | 暗号操作のブロック サイズをビット単位で取得または設定します。(SymmetricAlgorithm から継承されます。) |
| FeedbackSize | 暗号操作のフィードバック サイズをビット単位で取得または設定します。(SymmetricAlgorithm から継承されます。) |
| IV | 対称アルゴリズムの初期化ベクタ (IV) を取得または設定します。(SymmetricAlgorithm から継承されます。) |
| Key | 対称アルゴリズムの共有キーを取得または設定します。(SymmetricAlgorithm から継承されます。) |
| KeySize | 対称アルゴリズムで使用する共有キーのサイズをビット単位で取得または設定します。(SymmetricAlgorithm から継承されます。) |
| LegalBlockSizes | 対称アルゴリズムでサポートされているブロック サイズを取得します。(SymmetricAlgorithm から継承されます。) |
| LegalKeySizes | 対称アルゴリズムでサポートされているキー サイズを取得します。(SymmetricAlgorithm から継承されます。) |
| Mode | 対称アルゴリズムの操作モードを取得または設定します。(SymmetricAlgorithm から継承されます。) |
| Padding | 対称アルゴリズムで使用する埋め込みモードを取得または設定します。(SymmetricAlgorithm から継承されます。) |
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| Clear | SymmetricAlgorithm クラスによって使用されているすべてのリソースを解放します。 (SymmetricAlgorithm から継承されます。) |
| Create | オーバーロードされます。 Rijndael アルゴリズムを実行する暗号オブジェクトを作成します。 |
| CreateDecryptor | オーバーロードされます。 対称復号化オブジェクトを作成します。 (SymmetricAlgorithm から継承されます。) |
| CreateEncryptor | オーバーロードされます。 対称暗号化オブジェクトを作成します。 (SymmetricAlgorithm から継承されます。) |
| Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
| GenerateIV | 派生クラスでオーバーライドされると、アルゴリズムで使用するランダムな初期化ベクタ (IV) を生成します。 (SymmetricAlgorithm から継承されます。) |
| GenerateKey | 派生クラスでオーバーライドされると、アルゴリズムで使用するランダム キー (Key) を生成します。 (SymmetricAlgorithm から継承されます。) |
| GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
| GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
| ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
| ValidKeySize | 指定されたキー サイズが、現在のアルゴリズムに対して有効かどうかを判断します。 (SymmetricAlgorithm から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Dispose | SymmetricAlgorithm によって使用されているアンマネージ リソースを解放し、オプションでマネージ リソースも解放します。 (SymmetricAlgorithm から継承されます。) |
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
参照(Rijndael から転送)
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2026/02/12 05:20 UTC 版)
|
The SubBytes step, one of four stages in a round of AES
|
|
| 一般 | |
|---|---|
| 設計者 | フィンセント・ライメン, ホァン・ダーメン |
| 初版発行日 | 1998 |
| 派生元 | Square |
| 後継 | Anubis, Grand Cru |
| 認証 | AES採用, CRYPTREC, NESSIE, NSA |
| 暗号詳細 | |
| 鍵長 | 128, 192 or 256 bits[1] |
| ブロック長 | 128 bits[2] |
| 構造 | SPN構造 |
| ラウンド数 | 10, 12, 14(鍵長による) |
| 最良の暗号解読法 | |
| 完全な総当たり攻撃よりも計算量の多い攻撃が発表されているが、2013年時点では計算量が少ない攻撃は見つかっていない:[3] AES-128については、完全2部グラフ(Biclique)を使用すると2126.1の計算量で鍵を復元することが可能である。AES-192とAES-256に対するBiclique攻撃では、それぞれ2189.7と2254.4の計算複雑度が適用される。関連鍵攻撃では、AES-192とAES-256をそれぞれ2176と299.5の複雑さで破ることができる。 | |
Advanced Encryption Standard (AES) は、アメリカ国立標準技術研究所(NIST)が2001年に連邦情報処理標準(FIPS 197)として制定した、128ビットのブロック長を持つ共通鍵ブロック暗号である[4]。鍵長56ビットのDESに代わる標準暗号として公開公募により選定された。
AESは、ベルギーの暗号研究者 Joan Daemen とフィンセント・ライメン(Vincent Rijmen)が設計した暗号方式 Rijndael の128ビットブロック長仕様が標準化されたものであり、鍵長128・192・256ビットを規定する。
現在ではTLSなどの通信暗号化をはじめ、政府機関および民間の情報システムで利用されている。
AES以前の標準暗号であったDESは、次の2点が問題であった。
そこで、新しい標準暗号がアメリカ国立標準技術研究所(NIST)の主導によって公募され、AESが選出された。2001年3月に FIPS PUB 197 として公表された。
厳密には「AES」は、選出されなかった暗号も含む、手続き期間中から使われた「新しい標準暗号」の総称であり、選出された暗号方式自体の名はRijndael(ラインダール)である。
AESはSPN構造のブロック暗号である。ブロック長は128ビットであり、鍵長には128ビット・192ビット・256ビットの3種類が選択できる(鍵長が大きいほうが暗号強度が高い)。これに対し、AESの元となった Rijndael では、ブロック長と鍵長が可変であり、128ビットから256ビットまでの32ビットの倍数が選べる。NISTが公募した際のスペックに従い、米国標準となったAESではブロック長は128ビットに固定され、鍵長も3種類に限られた[5]。
旧規格 DES (FIPS 46) の安全性が低下したので、1997年9月にNIST(アメリカ国立標準技術研究所)が後継の暗号標準AES (Advanced Encryption Standard) とすべく共通鍵ブロック暗号を公募した。公募要件には下記のような条件が挙げられた[5]。
世界から応募された21方式から、公募要件を満たした15方式に対する評価が行われ、安全性と実装性能に優れた5方式が最終候補として残った。最終候補および設計者は下記のとおりである[5]。
最終選考の結果、あらゆる実装条件で優れた実装性能を発揮したベルギーのルーヴェン・カトリック大学の研究者ホァン・ダーメン (Joan Daemen) と フィンセント・ライメン (Vincent Rijmen) が設計した Rijndael (ラインダール)が2000年10月に採用された。
Rijndaelという名称のうち、RijnはRijmen、daeはDaemenから取られたことは明白だが、lはどこから来たのかが不明だった。指導教授だったバート・プレネル (Bart Preneel) から取ったのではという説があり、Rijmenが講演した際に質問を受けたが、その答えは "It's a conjecture.(それは憶測に過ぎないね)" だった[要出典]。
AESはSPN構造のブロック暗号で、ブロック長は128ビット、鍵長は128ビット・192ビット・256ビットの3つが利用できる[4]。
暗号化処理では、始めに鍵生成を行う。AES暗号の鍵長によって変換のラウンド数が異なる。次のとおりである。
暗号化は下記の4つの処理から構成される[5]。
これら4つの処理を1ラウンドとして暗号化を行う。
なお、復号は上記処理の逆変換を逆順で実行する。
関連鍵攻撃により、256ビットのAES暗号の第9ラウンドまでが解読可能である。また、選択平文攻撃により、192ビットおよび256ビットのAES暗号の第8ラウンドまで、128ビットのAES暗号の第7ラウンドまでが解読可能である (Ferguson et al., 2000)。シュナイアーはAESの「代数的単純さに疑問」を感じているが、AESは欧州の暗号規格NESSIEや日本の暗号規格CRYPTRECでも採用された。AESの数学的構造は他のブロック暗号と異なり、きちんとした記述もある[6][7]。
この暗号は暗号化方式としてはまだどんな攻撃にも屈していないが、実装によってはサイドチャネル攻撃が成功する場合がある[8][9]。
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/06/13 02:48 UTC 版)
「スターソルジャー」の記事における「RIJNDAEL」の解説
ショットは後方に集中し、ブラスターは自機の前方にレーザーを放つタイプ・レーザー。
※この「RIJNDAEL」の解説は、「スターソルジャー」の解説の一部です。
「RIJNDAEL」を含む「スターソルジャー」の記事については、「スターソルジャー」の概要を参照ください。