diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-29 10:55:48 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-29 10:55:48 +0700 |
commit | 973f18d6a98da81686ca5113f9406c91fa87ab5c (patch) | |
tree | 0f07613fd1b75864d7f753f5e078f1e9c8b1c606 /crypto/src | |
parent | updated text on OCB patents. (diff) | |
download | BouncyCastle.NET-ed25519-973f18d6a98da81686ca5113f9406c91fa87ab5c.tar.xz |
Use AesUtilities
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/pqc/crypto/crystals/dilithium/Symmetric.cs | 5 | ||||
-rw-r--r-- | crypto/src/pqc/crypto/crystals/kyber/Symmetric.cs | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/crypto/src/pqc/crypto/crystals/dilithium/Symmetric.cs b/crypto/src/pqc/crypto/crystals/dilithium/Symmetric.cs index a46c12d90..d025b98fd 100644 --- a/crypto/src/pqc/crypto/crystals/dilithium/Symmetric.cs +++ b/crypto/src/pqc/crypto/crystals/dilithium/Symmetric.cs @@ -1,4 +1,5 @@ -using Org.BouncyCastle.Crypto.Digests; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Engines; using Org.BouncyCastle.Crypto.Modes; using Org.BouncyCastle.Crypto.Parameters; @@ -34,7 +35,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium public AesSymmetric() : base(64, 64) { - cipher = new SicBlockCipher(new AesEngine()); + cipher = new SicBlockCipher(AesUtilities.CreateEngine()); } private void Aes128(byte[] output, int offset, int size) diff --git a/crypto/src/pqc/crypto/crystals/kyber/Symmetric.cs b/crypto/src/pqc/crypto/crystals/kyber/Symmetric.cs index 1ceb76b98..b618d7bce 100644 --- a/crypto/src/pqc/crypto/crystals/kyber/Symmetric.cs +++ b/crypto/src/pqc/crypto/crystals/kyber/Symmetric.cs @@ -1,7 +1,7 @@ -using Org.BouncyCastle.Crypto.Digests; -using System; +using System; + using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Engines; +using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Modes; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Utilities; @@ -102,7 +102,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Kyber { this.sha256Digest = new Sha256Digest(); this.sha512Digest = new Sha512Digest(); - this.cipher = new SicBlockCipher(new AesEngine()); + this.cipher = new SicBlockCipher(AesUtilities.CreateEngine()); } private void DoDigest(IDigest digest, byte[] output, byte[] input, int outOffset) { |