diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-02 10:12:55 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-02-02 10:12:55 +0700 |
commit | 36c38833a1c137ee55ffa44e12df0f65f87456ad (patch) | |
tree | f494345aefb75f5a7a0d3dfabf259279c58078b6 /crypto/src | |
parent | Refactoring in Tls.Tests (diff) | |
download | BouncyCastle.NET-ed25519-36c38833a1c137ee55ffa44e12df0f65f87456ad.tar.xz |
Cleanup warnings
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/crypto/digests/PhotonBeetleDigest.cs | 20 | ||||
-rw-r--r-- | crypto/src/crypto/engines/AsconEngine.cs | 23 | ||||
-rw-r--r-- | crypto/src/crypto/engines/ElephantEngine.cs | 16 | ||||
-rw-r--r-- | crypto/src/crypto/engines/ISAPEngine.cs | 24 | ||||
-rw-r--r-- | crypto/src/crypto/engines/PhotonBeetleEngine.cs | 20 | ||||
-rw-r--r-- | crypto/src/crypto/engines/XoodyakEngine.cs | 16 |
6 files changed, 61 insertions, 58 deletions
diff --git a/crypto/src/crypto/digests/PhotonBeetleDigest.cs b/crypto/src/crypto/digests/PhotonBeetleDigest.cs index e0961cc3f..13b30e025 100644 --- a/crypto/src/crypto/digests/PhotonBeetleDigest.cs +++ b/crypto/src/crypto/digests/PhotonBeetleDigest.cs @@ -1,19 +1,19 @@ using System; using System.IO; -using Org.BouncyCastle.Crypto.Utilities; -using Org.BouncyCastle.Utilities; -/** - * Photon-Beetle, https://www.isical.ac.in/~lightweight/beetle/ - * https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/readonlyist-round/updated-spec-doc/photon-beetle-spec-readonly.pdf - * <p> - * Photon-Beetle with reference to C Reference Impl from: https://github.com/PHOTON-Beetle/Software - * </p> - */ +using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Crypto.Digests { - public class PhotonBeetleDigest : IDigest + /** + * Photon-Beetle, https://www.isical.ac.in/~lightweight/beetle/ + * https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/readonlyist-round/updated-spec-doc/photon-beetle-spec-readonly.pdf + * <p> + * Photon-Beetle with reference to C Reference Impl from: https://github.com/PHOTON-Beetle/Software + * </p> + */ + public class PhotonBeetleDigest + : IDigest { private byte[] state; private byte[][] state_2d; diff --git a/crypto/src/crypto/engines/AsconEngine.cs b/crypto/src/crypto/engines/AsconEngine.cs index c3091b9ef..281c4b0df 100644 --- a/crypto/src/crypto/engines/AsconEngine.cs +++ b/crypto/src/crypto/engines/AsconEngine.cs @@ -1,21 +1,20 @@ using System; using System.IO; + using Org.BouncyCastle.Crypto.Modes; using Org.BouncyCastle.Crypto.Parameters; -using Org.BouncyCastle.Crypto.Utilities; -using Org.BouncyCastle.Utilities; -using static Org.BouncyCastle.Tls.DtlsReliableHandshake; - -/** -* ASCON AEAD v1.2, https://ascon.iaik.tugraz.at/ -* https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/ascon-spec-final.pdf -* <p> -* ASCON AEAD v1.2 with reference to C Reference Impl from: https://github.com/ascon/ascon-c -* </p> -*/ + namespace Org.BouncyCastle.Crypto.Engines { - public class AsconEngine : IAeadBlockCipher + /** + * ASCON AEAD v1.2, https://ascon.iaik.tugraz.at/ + * https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/ascon-spec-final.pdf + * <p> + * ASCON AEAD v1.2 with reference to C Reference Impl from: https://github.com/ascon/ascon-c + * </p> + */ + public class AsconEngine + : IAeadBlockCipher { public enum AsconParameters { diff --git a/crypto/src/crypto/engines/ElephantEngine.cs b/crypto/src/crypto/engines/ElephantEngine.cs index e3d9ca670..d5f05f658 100644 --- a/crypto/src/crypto/engines/ElephantEngine.cs +++ b/crypto/src/crypto/engines/ElephantEngine.cs @@ -1,18 +1,19 @@ using System; using System.IO; + using Org.BouncyCastle.Crypto.Modes; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Utilities; - -/** - * Elephant AEAD v2, based on the current round 3 submission, https://www.esat.kuleuven.be/cosic/elephant/ - * Reference C implementation: https://github.com/TimBeyne/Elephant - * Specification: https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/elephant-spec-final.pdf - */ namespace Org.BouncyCastle.Crypto.Engines { - public class ElephantEngine : IAeadBlockCipher + /** + * Elephant AEAD v2, based on the current round 3 submission, https://www.esat.kuleuven.be/cosic/elephant/ + * Reference C implementation: https://github.com/TimBeyne/Elephant + * Specification: https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/elephant-spec-final.pdf + */ + public class ElephantEngine + : IAeadBlockCipher { public enum ElephantParameters { @@ -20,6 +21,7 @@ namespace Org.BouncyCastle.Crypto.Engines elephant176, elephant200 } + private bool forEncryption; private readonly string algorithmName; private ElephantParameters parameters; diff --git a/crypto/src/crypto/engines/ISAPEngine.cs b/crypto/src/crypto/engines/ISAPEngine.cs index 3745f3ae9..0280b1ce1 100644 --- a/crypto/src/crypto/engines/ISAPEngine.cs +++ b/crypto/src/crypto/engines/ISAPEngine.cs @@ -1,23 +1,21 @@ using System; using System.IO; + using Org.BouncyCastle.Crypto.Modes; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Crypto.Utilities; -using Org.BouncyCastle.Utilities; -using static Org.BouncyCastle.Tls.DtlsReliableHandshake; - - -/** - * ISAP AEAD v2, https://isap.iaik.tugraz.at/ - * https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/constist-round/updated-spec-doc/isap-spec-const.pdf - * <p> - * ISAP AEAD v2 with reference to C Reference Impl from: https://github.com/isap-lwc/isap-code-package - * </p> - */ namespace Org.BouncyCastle.Crypto.Engines { - public class ISAPEngine : IAeadBlockCipher + /** + * ISAP AEAD v2, https://isap.iaik.tugraz.at/ + * https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/constist-round/updated-spec-doc/isap-spec-const.pdf + * <p> + * ISAP AEAD v2 with reference to C Reference Impl from: https://github.com/isap-lwc/isap-code-package + * </p> + */ + public class ISAPEngine + : IAeadBlockCipher { public enum IsapType { @@ -821,7 +819,7 @@ namespace Org.BouncyCastle.Crypto.Engines "ISAP AEAD key must be 128 bits ulong"); } - /** + /* * Initialize variables. */ byte[] npub = new byte[iv.Length]; diff --git a/crypto/src/crypto/engines/PhotonBeetleEngine.cs b/crypto/src/crypto/engines/PhotonBeetleEngine.cs index 9245faa27..0d5728a76 100644 --- a/crypto/src/crypto/engines/PhotonBeetleEngine.cs +++ b/crypto/src/crypto/engines/PhotonBeetleEngine.cs @@ -1,25 +1,27 @@ using System; using System.IO; + using Org.BouncyCastle.Crypto.Modes; using Org.BouncyCastle.Crypto.Parameters; -/** - * Photon-Beetle, https://www.isical.ac.in/~lightweight/beetle/ - * https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/readonlyist-round/updated-spec-doc/photon-beetle-spec-readonly.pdf - * <p> - * Photon-Beetle with reference to C Reference Impl from: https://github.com/PHOTON-Beetle/Software - * </p> - */ - namespace Org.BouncyCastle.Crypto.Engines { - public class PhotonBeetleEngine : IAeadBlockCipher + /** + * Photon-Beetle, https://www.isical.ac.in/~lightweight/beetle/ + * https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/readonlyist-round/updated-spec-doc/photon-beetle-spec-readonly.pdf + * <p> + * Photon-Beetle with reference to C Reference Impl from: https://github.com/PHOTON-Beetle/Software + * </p> + */ + public class PhotonBeetleEngine + : IAeadBlockCipher { public enum PhotonBeetleParameters { pb32, pb128 } + private bool input_empty; private bool forEncryption; private bool initialised; diff --git a/crypto/src/crypto/engines/XoodyakEngine.cs b/crypto/src/crypto/engines/XoodyakEngine.cs index fb4f074ee..caf49e53c 100644 --- a/crypto/src/crypto/engines/XoodyakEngine.cs +++ b/crypto/src/crypto/engines/XoodyakEngine.cs @@ -5,15 +5,17 @@ using Org.BouncyCastle.Crypto.Modes; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Crypto.Utilities; using Org.BouncyCastle.Utilities; -/** -* Xoodyak v1, https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/xoodyak-spec-final.pdf -* <p> -* Xoodyak with reference to C Reference Impl from: https://github.com/XKCP/XKCP -* </p> -*/ + namespace Org.BouncyCastle.Crypto.Engines { - public sealed class XoodyakEngine : IAeadBlockCipher + /** + * Xoodyak v1, https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/xoodyak-spec-final.pdf + * <p> + * Xoodyak with reference to C Reference Impl from: https://github.com/XKCP/XKCP + * </p> +*/ + public sealed class XoodyakEngine + : IAeadBlockCipher { private bool forEncryption; private byte[] state; |