From dee05948a56eb6edd6563089367255ee9676ecd2 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 5 Jul 2022 16:01:23 +0700 Subject: Use static classes and 'using' aliases --- crypto/src/math/ec/rfc8032/Ed25519.cs | 5 ++--- crypto/src/math/ec/rfc8032/Ed448.cs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'crypto/src/math/ec/rfc8032') diff --git a/crypto/src/math/ec/rfc8032/Ed25519.cs b/crypto/src/math/ec/rfc8032/Ed25519.cs index 97aa9c7df..d88914c90 100644 --- a/crypto/src/math/ec/rfc8032/Ed25519.cs +++ b/crypto/src/math/ec/rfc8032/Ed25519.cs @@ -3,13 +3,14 @@ using System.Diagnostics; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; -using Org.BouncyCastle.Math.EC.Rfc7748; using Org.BouncyCastle.Math.Raw; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Math.EC.Rfc8032 { + using F = Rfc7748.X25519Field; + /// /// A low-level implementation of the Ed25519, Ed25519ctx, and Ed25519ph instantiations of the Edwards-Curve Digital /// Signature Algorithm specified in RFC 8032. @@ -33,8 +34,6 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032 Ed25519ph = 2, } - private class F : X25519Field {}; - private const long M08L = 0x000000FFL; private const long M28L = 0x0FFFFFFFL; private const long M32L = 0xFFFFFFFFL; diff --git a/crypto/src/math/ec/rfc8032/Ed448.cs b/crypto/src/math/ec/rfc8032/Ed448.cs index 39c0bc0ee..55ec5f03b 100644 --- a/crypto/src/math/ec/rfc8032/Ed448.cs +++ b/crypto/src/math/ec/rfc8032/Ed448.cs @@ -3,13 +3,14 @@ using System.Diagnostics; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; -using Org.BouncyCastle.Math.EC.Rfc7748; using Org.BouncyCastle.Math.Raw; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Math.EC.Rfc8032 { + using F = Rfc7748.X448Field; + /// /// A low-level implementation of the Ed448 and Ed448ph instantiations of the Edwards-Curve Digital Signature /// Algorithm specified in RFC 8032. @@ -30,8 +31,6 @@ namespace Org.BouncyCastle.Math.EC.Rfc8032 Ed448ph = 1, } - private class F : X448Field {}; - private const ulong M26UL = 0x03FFFFFFUL; private const ulong M28UL = 0x0FFFFFFFUL; -- cgit 1.5.1