summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-10-22 02:17:26 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-10-22 02:17:26 +0700
commitc9f432da291298401537c8cfb1314134f21d66ac (patch)
treec11169c8bfa929f13826eca3625fda914f9313c4 /crypto/src
parentRemove extraneous class (diff)
downloadBouncyCastle.NET-ed25519-c9f432da291298401537c8cfb1314134f21d66ac.tar.xz
Refactoring in Pqc.Crypto.Lms
- add missing factory entries
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/pqc/crypto/lms/HSS.cs54
-rw-r--r--crypto/src/pqc/crypto/lms/HSSKeyGenerationParameters.cs12
-rw-r--r--crypto/src/pqc/crypto/lms/HSSKeyPairGenerator.cs8
-rw-r--r--crypto/src/pqc/crypto/lms/HSSPrivateKeyParameters.cs126
-rw-r--r--crypto/src/pqc/crypto/lms/HSSPublicKeyParameters.cs40
-rw-r--r--crypto/src/pqc/crypto/lms/HSSSignature.cs41
-rw-r--r--crypto/src/pqc/crypto/lms/HSSSigner.cs14
-rw-r--r--crypto/src/pqc/crypto/lms/ILMSContextBasedSigner.cs6
-rw-r--r--crypto/src/pqc/crypto/lms/ILMSContextBasedVerifier.cs6
-rw-r--r--crypto/src/pqc/crypto/lms/LMOtsPrivateKey.cs16
-rw-r--r--crypto/src/pqc/crypto/lms/LMOtsPublicKey.cs24
-rw-r--r--crypto/src/pqc/crypto/lms/LMS.cs46
-rw-r--r--crypto/src/pqc/crypto/lms/LMSContext.cs14
-rw-r--r--crypto/src/pqc/crypto/lms/LMSException.cs10
-rw-r--r--crypto/src/pqc/crypto/lms/LMSKeyGenerationParameters.cs10
-rw-r--r--crypto/src/pqc/crypto/lms/LMSKeyPairGenerator.cs8
-rw-r--r--crypto/src/pqc/crypto/lms/LMSKeyParameters.cs4
-rw-r--r--crypto/src/pqc/crypto/lms/LMSParameters.cs4
-rw-r--r--crypto/src/pqc/crypto/lms/LMSPrivateKeyParameters.cs62
-rw-r--r--crypto/src/pqc/crypto/lms/LMSPublicKeyParameters.cs28
-rw-r--r--crypto/src/pqc/crypto/lms/LMSSignature.cs12
-rw-r--r--crypto/src/pqc/crypto/lms/LMSSignedPubKey.cs14
-rw-r--r--crypto/src/pqc/crypto/lms/LMSSigner.cs14
-rw-r--r--crypto/src/pqc/crypto/lms/LM_OTS.cs24
-rw-r--r--crypto/src/pqc/crypto/lms/LmsUtils.cs4
-rw-r--r--crypto/src/pqc/crypto/utils/PrivateKeyFactory.cs10
-rw-r--r--crypto/src/pqc/crypto/utils/PrivateKeyInfoFactory.cs24
-rw-r--r--crypto/src/pqc/crypto/utils/PublicKeyFactory.cs169
-rw-r--r--crypto/src/pqc/crypto/utils/SubjectPublicKeyInfoFactory.cs28
29 files changed, 429 insertions, 403 deletions
diff --git a/crypto/src/pqc/crypto/lms/HSS.cs b/crypto/src/pqc/crypto/lms/HSS.cs
index 77c5fdab0..9c21198e4 100644
--- a/crypto/src/pqc/crypto/lms/HSS.cs
+++ b/crypto/src/pqc/crypto/lms/HSS.cs
@@ -3,15 +3,15 @@ using System.Collections.Generic;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class HSS
+    public static class Hss
     {
-        public static HSSPrivateKeyParameters GenerateHssKeyPair(HSSKeyGenerationParameters parameters)
+        public static HssPrivateKeyParameters GenerateHssKeyPair(HssKeyGenerationParameters parameters)
         {
             //
             // LmsPrivateKey can derive and hold the public key so we just use an array of those.
             //
-            LMSPrivateKeyParameters[] keys = new LMSPrivateKeyParameters[parameters.Depth];
-            LMSSignature[] sig = new LMSSignature[parameters.Depth - 1];
+            LmsPrivateKeyParameters[] keys = new LmsPrivateKeyParameters[parameters.Depth];
+            LmsSignature[] sig = new LmsSignature[parameters.Depth - 1];
 
             byte[] rootSeed = new byte[32];
             parameters.Random.NextBytes(rootSeed);
@@ -33,7 +33,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 var lms = parameters.GetLmsParameters(t);
                 if (t == 0)
                 {
-                    keys[t] = new LMSPrivateKeyParameters(
+                    keys[t] = new LmsPrivateKeyParameters(
                         lms.LMSigParameters,
                         lms.LMOtsParameters,
                         0,
@@ -61,10 +61,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 hssKeyMaxIndex = long.MaxValue;
             }
 
-            return new HSSPrivateKeyParameters(
+            return new HssPrivateKeyParameters(
                 parameters.Depth,
-                new List<LMSPrivateKeyParameters>(keys),
-                new List<LMSSignature>(sig),
+                new List<LmsPrivateKeyParameters>(keys),
+                new List<LmsSignature>(sig),
                 0, hssKeyMaxIndex);
         }
 
@@ -77,7 +77,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
          *
          * @param keyPair
          */
-        public static void IncrementIndex(HSSPrivateKeyParameters keyPair)
+        public static void IncrementIndex(HssPrivateKeyParameters keyPair)
         {
             lock (keyPair)
             {
@@ -87,7 +87,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             }
         }
 
-        public static void RangeTestKeys(HSSPrivateKeyParameters keyPair)
+        public static void RangeTestKeys(HssPrivateKeyParameters keyPair)
         {
             lock (keyPair)
             {
@@ -117,10 +117,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         }
 
 
-        public static HSSSignature GenerateSignature(HSSPrivateKeyParameters keyPair, byte[] message)
+        public static HssSignature GenerateSignature(HssPrivateKeyParameters keyPair, byte[] message)
         {
-            LMSSignedPubKey[] signed_pub_key;
-            LMSPrivateKeyParameters nextKey;
+            LmsSignedPubKey[] signed_pub_key;
+            LmsPrivateKeyParameters nextKey;
             int L = keyPair.L;
 
             lock (keyPair)
@@ -134,10 +134,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
                 // Step 2. Stand in for sig[L-1]
                 int i = 0;
-                signed_pub_key = new LMSSignedPubKey[L - 1];
+                signed_pub_key = new LmsSignedPubKey[L - 1];
                 while (i < L - 1)
                 {
-                    signed_pub_key[i] = new LMSSignedPubKey(sig[i], keys[i + 1].GetPublicKey());
+                    signed_pub_key[i] = new LmsSignedPubKey(sig[i], keys[i + 1].GetPublicKey());
                     ++i;
                 }
 
@@ -147,26 +147,26 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 keyPair.IncIndex();
             }
 
-            LMSContext context = nextKey.GenerateLmsContext().WithSignedPublicKeys(signed_pub_key);
+            LmsContext context = nextKey.GenerateLmsContext().WithSignedPublicKeys(signed_pub_key);
 
             context.BlockUpdate(message, 0, message.Length);
 
             return GenerateSignature(L, context);
         }
 
-        public static HSSSignature GenerateSignature(int L, LMSContext context)
+        public static HssSignature GenerateSignature(int L, LmsContext context)
         {
-            return new HSSSignature(L - 1, context.SignedPubKeys, LMS.GenerateSign(context));
+            return new HssSignature(L - 1, context.SignedPubKeys, Lms.GenerateSign(context));
         }
 
-        public static bool VerifySignature(HSSPublicKeyParameters publicKey, HSSSignature signature, byte[] message)
+        public static bool VerifySignature(HssPublicKeyParameters publicKey, HssSignature signature, byte[] message)
         {
             int Nspk = signature.GetlMinus1();
             if (Nspk + 1 != publicKey.L)
                 return false;
 
-            LMSSignature[] sigList = new LMSSignature[Nspk + 1];
-            LMSPublicKeyParameters[] pubList = new LMSPublicKeyParameters[Nspk];
+            LmsSignature[] sigList = new LmsSignature[Nspk + 1];
+            LmsPublicKeyParameters[] pubList = new LmsPublicKeyParameters[Nspk];
 
             for (int i = 0; i < Nspk; i++)
             {
@@ -175,13 +175,13 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             }
             sigList[Nspk] = signature.Signature;
 
-            LMSPublicKeyParameters key = publicKey.LmsPublicKey;
+            LmsPublicKeyParameters key = publicKey.LmsPublicKey;
 
             for (int i = 0; i < Nspk; i++)
             {
-                LMSSignature sig = sigList[i];
+                LmsSignature sig = sigList[i];
                 byte[] msg = pubList[i].ToByteArray();
-                if (!LMS.VerifySignature(key, sig, msg))
+                if (!Lms.VerifySignature(key, sig, msg))
                 {
                     return false;
                 }
@@ -194,11 +194,11 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                     throw new Exception(ex.Message, ex);
                 }
             }
-            return LMS.VerifySignature(key, sigList[Nspk], message);
+            return Lms.VerifySignature(key, sigList[Nspk], message);
         }
 
         private class PlaceholderLMSPrivateKey
-            : LMSPrivateKeyParameters
+            : LmsPrivateKeyParameters
         {
             internal PlaceholderLMSPrivateKey(LMSigParameters lmsParameter, LMOtsParameters otsParameters, int q,
                 byte[] I, int maxQ, byte[] masterSecret)
@@ -211,7 +211,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 throw new Exception("placeholder only");
             }
 
-            public override LMSPublicKeyParameters GetPublicKey()
+            public override LmsPublicKeyParameters GetPublicKey()
             {
                 throw new Exception("placeholder only");
             }
diff --git a/crypto/src/pqc/crypto/lms/HSSKeyGenerationParameters.cs b/crypto/src/pqc/crypto/lms/HSSKeyGenerationParameters.cs
index 5baaa7aa2..61ea51368 100644
--- a/crypto/src/pqc/crypto/lms/HSSKeyGenerationParameters.cs
+++ b/crypto/src/pqc/crypto/lms/HSSKeyGenerationParameters.cs
@@ -5,10 +5,10 @@ using Org.BouncyCastle.Security;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public sealed class HSSKeyGenerationParameters
+    public sealed class HssKeyGenerationParameters
         : KeyGenerationParameters
     {
-        private static LMSParameters[] ValidateLmsParameters(LMSParameters[] lmsParameters)
+        private static LmsParameters[] ValidateLmsParameters(LmsParameters[] lmsParameters)
         {
             if (lmsParameters == null)
                 throw new ArgumentNullException(nameof(lmsParameters));
@@ -17,7 +17,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return lmsParameters;
         }
 
-        private readonly LMSParameters[] m_lmsParameters;
+        private readonly LmsParameters[] m_lmsParameters;
 
         /**
          * Base constructor - parameters and a source of randomness.
@@ -25,15 +25,15 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
          * @param lmsParameters array of LMS parameters, one per level in the hierarchy (up to 8 levels).
          * @param random   the random byte source.
          */
-        public HSSKeyGenerationParameters(LMSParameters[] lmsParameters, SecureRandom random)
-            :base(random, LmsUtils.CalculateStrength(ValidateLmsParameters(lmsParameters)[0]))
+        public HssKeyGenerationParameters(LmsParameters[] lmsParameters, SecureRandom random)
+            :base(random, LmsUtilities.CalculateStrength(ValidateLmsParameters(lmsParameters)[0]))
         {
             m_lmsParameters = lmsParameters;
         }
 
         public int Depth => m_lmsParameters.Length;
 
-        public LMSParameters GetLmsParameters(int index)
+        public LmsParameters GetLmsParameters(int index)
         {
             if (index < 0 || index >= m_lmsParameters.Length)
                 throw new ArgumentOutOfRangeException(nameof(index));
diff --git a/crypto/src/pqc/crypto/lms/HSSKeyPairGenerator.cs b/crypto/src/pqc/crypto/lms/HSSKeyPairGenerator.cs
index 137275a9a..273e18904 100644
--- a/crypto/src/pqc/crypto/lms/HSSKeyPairGenerator.cs
+++ b/crypto/src/pqc/crypto/lms/HSSKeyPairGenerator.cs
@@ -2,19 +2,19 @@ using Org.BouncyCastle.Crypto;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public sealed class HSSKeyPairGenerator
+    public sealed class HssKeyPairGenerator
         : IAsymmetricCipherKeyPairGenerator
     {
-        private HSSKeyGenerationParameters m_parameters;
+        private HssKeyGenerationParameters m_parameters;
 
         public void Init(KeyGenerationParameters parameters)
         {
-            m_parameters = (HSSKeyGenerationParameters)parameters;
+            m_parameters = (HssKeyGenerationParameters)parameters;
         }
 
         public AsymmetricCipherKeyPair GenerateKeyPair()
         {
-            HSSPrivateKeyParameters privKey = HSS.GenerateHssKeyPair(m_parameters);
+            HssPrivateKeyParameters privKey = Hss.GenerateHssKeyPair(m_parameters);
 
             return new AsymmetricCipherKeyPair(privKey.GetPublicKey(), privKey);
         }
diff --git a/crypto/src/pqc/crypto/lms/HSSPrivateKeyParameters.cs b/crypto/src/pqc/crypto/lms/HSSPrivateKeyParameters.cs
index 535654fd8..447dbad27 100644
--- a/crypto/src/pqc/crypto/lms/HSSPrivateKeyParameters.cs
+++ b/crypto/src/pqc/crypto/lms/HSSPrivateKeyParameters.cs
@@ -8,25 +8,25 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class HSSPrivateKeyParameters
-        : LMSKeyParameters, ILMSContextBasedSigner
+    public class HssPrivateKeyParameters
+        : LmsKeyParameters, ILmsContextBasedSigner
     {
         private int l;
         private bool isShard;
-        private IList<LMSPrivateKeyParameters> keys;
-        private IList<LMSSignature> sig;
+        private IList<LmsPrivateKeyParameters> keys;
+        private IList<LmsSignature> sig;
         private long indexLimit;
         private long index = 0;
 
-        private HSSPublicKeyParameters publicKey;
+        private HssPublicKeyParameters publicKey;
 
-        public HSSPrivateKeyParameters(int l, IList<LMSPrivateKeyParameters> keys, IList<LMSSignature> sig, long index,
+        public HssPrivateKeyParameters(int l, IList<LmsPrivateKeyParameters> keys, IList<LmsSignature> sig, long index,
             long indexLimit)
     	    :base(true)
         {
             this.l = l;
-            this.keys = new List<LMSPrivateKeyParameters>(keys);
-            this.sig = new List<LMSSignature>(sig);
+            this.keys = new List<LmsPrivateKeyParameters>(keys);
+            this.sig = new List<LmsSignature>(sig);
             this.index = index;
             this.indexLimit = indexLimit;
             this.isShard = false;
@@ -37,7 +37,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             ResetKeyToIndex();
         }
 
-        private HSSPrivateKeyParameters(int l, IList<LMSPrivateKeyParameters> keys, IList<LMSSignature> sig, long index,
+        private HssPrivateKeyParameters(int l, IList<LmsPrivateKeyParameters> keys, IList<LmsSignature> sig, long index,
             long indexLimit, bool isShard)
     	    :base(true)
         {
@@ -45,25 +45,25 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             this.l = l;
             // this.keys =  new UnmodifiableListProxy(keys);
             // this.sig =  new UnmodifiableListProxy(sig);
-            this.keys = new List<LMSPrivateKeyParameters>(keys);
-            this.sig = new List<LMSSignature>(sig);
+            this.keys = new List<LmsPrivateKeyParameters>(keys);
+            this.sig = new List<LmsSignature>(sig);
             this.index = index;
             this.indexLimit = indexLimit;
             this.isShard = isShard;
         }
 
-        public static HSSPrivateKeyParameters GetInstance(byte[] privEnc, byte[] pubEnc)
+        public static HssPrivateKeyParameters GetInstance(byte[] privEnc, byte[] pubEnc)
         {
-            HSSPrivateKeyParameters pKey = GetInstance(privEnc);
+            HssPrivateKeyParameters pKey = GetInstance(privEnc);
 
-            pKey.publicKey = HSSPublicKeyParameters.GetInstance(pubEnc);
+            pKey.publicKey = HssPublicKeyParameters.GetInstance(pubEnc);
 
             return pKey;
         }
 
-        public static HSSPrivateKeyParameters GetInstance(object src)
+        public static HssPrivateKeyParameters GetInstance(object src)
         {
-            if (src is HSSPrivateKeyParameters hssPrivateKeyParameters)
+            if (src is HssPrivateKeyParameters hssPrivateKeyParameters)
             {
                 return hssPrivateKeyParameters;
             }
@@ -81,20 +81,20 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
                 bool limited = binaryReader.ReadBoolean();
 
-                var keys = new List<LMSPrivateKeyParameters>();
-                var signatures = new List<LMSSignature>();
+                var keys = new List<LmsPrivateKeyParameters>();
+                var signatures = new List<LmsSignature>();
 
                 for (int t = 0; t < d; t++)
                 {
-                    keys.Add(LMSPrivateKeyParameters.GetInstance(src));
+                    keys.Add(LmsPrivateKeyParameters.GetInstance(src));
                 }
 
                 for (int t = 0; t < d - 1; t++)
                 {
-                    signatures.Add(LMSSignature.GetInstance(src));
+                    signatures.Add(LmsSignature.GetInstance(src));
                 }
 
-                return new HSSPrivateKeyParameters(d, keys, signatures, index, maxIndex, limited);
+                return new HssPrivateKeyParameters(d, keys, signatures, index, maxIndex, limited);
             }
             else if (src is byte[] bytes)
             {
@@ -128,19 +128,19 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 return index;
         }
 
-        public LMSParameters[] GetLmsParameters()
+        public LmsParameters[] GetLmsParameters()
         {
             lock (this)
             {
                 int len = keys.Count;
 
-                LMSParameters[] parms = new LMSParameters[len];
+                LmsParameters[] parms = new LmsParameters[len];
 
                 for (int i = 0; i < len; i++)
                 {
-                    LMSPrivateKeyParameters lmsPrivateKey = keys[i];
+                    LmsPrivateKeyParameters lmsPrivateKey = keys[i];
 
-                    parms[i] = new LMSParameters(lmsPrivateKey.GetSigParameters(), lmsPrivateKey.GetOtsParameters());
+                    parms[i] = new LmsParameters(lmsPrivateKey.GetSigParameters(), lmsPrivateKey.GetOtsParameters());
                 }
 
                 return parms;
@@ -155,17 +155,17 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             }
         }
 
-        private static HSSPrivateKeyParameters MakeCopy(HSSPrivateKeyParameters privateKeyParameters)
+        private static HssPrivateKeyParameters MakeCopy(HssPrivateKeyParameters privateKeyParameters)
         {
             return GetInstance(privateKeyParameters.GetEncoded());
         }
 
-        protected void UpdateHierarchy(IList<LMSPrivateKeyParameters> newKeys, IList<LMSSignature> newSig)
+        protected void UpdateHierarchy(IList<LmsPrivateKeyParameters> newKeys, IList<LmsSignature> newSig)
         {
             lock (this)
             {
-                keys = new List<LMSPrivateKeyParameters>(newKeys);
-                sig = new List<LMSSignature>(newSig);
+                keys = new List<LmsPrivateKeyParameters>(newKeys);
+                sig = new List<LmsSignature>(newSig);
             }
         }
 
@@ -181,7 +181,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return indexLimit - index;
         }
 
-        LMSPrivateKeyParameters GetRootKey()
+        LmsPrivateKeyParameters GetRootKey()
         {
             return keys[0];
         }
@@ -195,7 +195,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
          * @param usageCount the number of usages the key should have.
          * @return a key based on the current key that can be used usageCount times.
          */
-        public HSSPrivateKeyParameters ExtractKeyShard(int usageCount)
+        public HssPrivateKeyParameters ExtractKeyShard(int usageCount)
         {
             lock (this)
             {
@@ -210,11 +210,11 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 //
                 index += usageCount;
 
-                var keys = new List<LMSPrivateKeyParameters>(this.GetKeys());
-                var sig = new List<LMSSignature>(this.GetSig());
+                var keys = new List<LmsPrivateKeyParameters>(this.GetKeys());
+                var sig = new List<LmsSignature>(this.GetSig());
 
-                HSSPrivateKeyParameters shard = MakeCopy(
-                    new HSSPrivateKeyParameters(l, keys, sig, shardStartIndex, maxIndexForShard, true));
+                HssPrivateKeyParameters shard = MakeCopy(
+                    new HssPrivateKeyParameters(l, keys, sig, shardStartIndex, maxIndexForShard, true));
 
                 ResetKeyToIndex();
 
@@ -222,12 +222,12 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             }
         }
 
-        public IList<LMSPrivateKeyParameters> GetKeys()
+        public IList<LmsPrivateKeyParameters> GetKeys()
         {
             lock (this) return keys;
         }
 
-        internal IList<LMSSignature> GetSig()
+        internal IList<LmsSignature> GetSig()
         {
             lock (this) return sig;
         }
@@ -260,14 +260,14 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             // LMSSignature[] sig = this.sig.toArray(new LMSSignature[this.sig.Count]);//   new LMSSignature[originalKeys.Size() - 1];
             //
 
-            LMSPrivateKeyParameters originalRootKey = this.GetRootKey();
+            LmsPrivateKeyParameters originalRootKey = this.GetRootKey();
 
             //
             // We need to replace the root key to a new q value.
             //
             if (keys[0].GetIndex() - 1 != qTreePath[0])
             {
-                keys[0] = LMS.GenerateKeys(
+                keys[0] = Lms.GenerateKeys(
                     originalRootKey.GetSigParameters(),
                     originalRootKey.GetOtsParameters(),
                     (int)qTreePath[0], originalRootKey.GetI(), originalRootKey.GetMasterSecret());
@@ -276,7 +276,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
             for (int i = 1; i < qTreePath.Length; i++)
             {
-                LMSPrivateKeyParameters intermediateKey = keys[i - 1];
+                LmsPrivateKeyParameters intermediateKey = keys[i - 1];
 
                 byte[] childI = new byte[16];
                 byte[] childSeed = new byte[32];
@@ -315,7 +315,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                     //
                     // This means the parent has changed.
                     //
-                    keys[i] = LMS.GenerateKeys(
+                    keys[i] = Lms.GenerateKeys(
                         originalKeys[i].GetSigParameters(),
                         originalKeys[i].GetOtsParameters(),
                         (int)qTreePath[i], childI, childSeed);
@@ -323,7 +323,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                     //
                     // Ensure post increment occurs on parent and the new public key is signed.
                     //
-                    sig[i - 1] = LMS.GenerateSign((LMSPrivateKeyParameters)keys[i - 1], ((LMSPrivateKeyParameters)keys[i]).GetPublicKey().ToByteArray());
+                    sig[i - 1] = Lms.GenerateSign((LmsPrivateKeyParameters)keys[i - 1], ((LmsPrivateKeyParameters)keys[i]).GetPublicKey().ToByteArray());
                     changed = true;
                 }
                 else if (!lmsQMatch)
@@ -332,7 +332,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                     // Q is different so we can generate a new private key but it will have the same public
                     // key so we do not need to sign it again.
                     //
-                    keys[i] = LMS.GenerateKeys(
+                    keys[i] = Lms.GenerateKeys(
                         originalKeys[i].GetSigParameters(),
                         originalKeys[i].GetOtsParameters(),
                         (int)qTreePath[i], childI, childSeed);
@@ -347,10 +347,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             }
         }
 
-        public HSSPublicKeyParameters GetPublicKey()
+        public HssPublicKeyParameters GetPublicKey()
         {
             lock (this)
-                return new HSSPublicKeyParameters(l, GetRootKey().GetPublicKey());
+                return new HssPublicKeyParameters(l, GetRootKey().GetPublicKey());
         }
 
         internal void ReplaceConsumedKey(int d)
@@ -364,21 +364,21 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             byte[] childI = new byte[16];
             Array.Copy(postImage, 0, childI, 0, childI.Length);
 
-            var newKeys = new List<LMSPrivateKeyParameters>(keys);
+            var newKeys = new List<LmsPrivateKeyParameters>(keys);
 
             //
             // We need the parameters from the LMS key we are replacing.
             //
-            LMSPrivateKeyParameters oldPk = keys[d];
+            LmsPrivateKeyParameters oldPk = keys[d];
 
-            newKeys[d] = LMS.GenerateKeys(oldPk.GetSigParameters(), oldPk.GetOtsParameters(), 0, childI, childRootSeed);
+            newKeys[d] = Lms.GenerateKeys(oldPk.GetSigParameters(), oldPk.GetOtsParameters(), 0, childI, childRootSeed);
 
-            var newSig = new List<LMSSignature>(sig);
+            var newSig = new List<LmsSignature>(sig);
 
-            newSig[d - 1] = LMS.GenerateSign(newKeys[d - 1], newKeys[d].GetPublicKey().ToByteArray());
+            newSig[d - 1] = Lms.GenerateSign(newKeys[d - 1], newKeys[d].GetPublicKey().ToByteArray());
 
-            this.keys = new List<LMSPrivateKeyParameters>(newKeys);
-            this.sig = new List<LMSSignature>(newSig);
+            this.keys = new List<LmsPrivateKeyParameters>(newKeys);
+            this.sig = new List<LmsSignature>(newSig);
         }
 
         public override bool Equals(Object o)
@@ -392,7 +392,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 return false;
             }
 
-            HSSPrivateKeyParameters that = (HSSPrivateKeyParameters)o;
+            HssPrivateKeyParameters that = (HssPrivateKeyParameters)o;
 
             if (l != that.l)
             {
@@ -445,12 +445,12 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                     .U64Str(indexLimit)
                     .Boolean(isShard); // Depth
 
-                foreach (LMSPrivateKeyParameters key in keys)
+                foreach (LmsPrivateKeyParameters key in keys)
                 {
                     composer.Bytes(key);
                 }
 
-                foreach (LMSSignature s in sig)
+                foreach (LmsSignature s in sig)
                 {
                     composer.Bytes(s);
                 }
@@ -475,15 +475,15 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return MakeCopy(this);
         }
 
-        public LMSContext GenerateLmsContext()
+        public LmsContext GenerateLmsContext()
         {
-            LMSSignedPubKey[] signed_pub_key;
-            LMSPrivateKeyParameters nextKey;
+            LmsSignedPubKey[] signed_pub_key;
+            LmsPrivateKeyParameters nextKey;
             int L = this.L;
 
             lock (this)
             {
-                HSS.RangeTestKeys(this);
+                Hss.RangeTestKeys(this);
 
                 var keys = this.GetKeys();
                 var sig = this.GetSig();
@@ -492,10 +492,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
                 // Step 2. Stand in for sig[L-1]
                 int i = 0;
-                signed_pub_key = new LMSSignedPubKey[L - 1];
+                signed_pub_key = new LmsSignedPubKey[L - 1];
                 while (i < L - 1)
                 {
-                    signed_pub_key[i] = new LMSSignedPubKey(sig[i], keys[i + 1].GetPublicKey());
+                    signed_pub_key[i] = new LmsSignedPubKey(sig[i], keys[i + 1].GetPublicKey());
                     ++i;
                 }
 
@@ -508,11 +508,11 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return nextKey.GenerateLmsContext().WithSignedPublicKeys(signed_pub_key);
         }
 
-        public byte[] GenerateSignature(LMSContext context)
+        public byte[] GenerateSignature(LmsContext context)
         {
             try
             {
-                return HSS.GenerateSignature(L, context).GetEncoded();
+                return Hss.GenerateSignature(L, context).GetEncoded();
             }
             catch (IOException e)
             {
diff --git a/crypto/src/pqc/crypto/lms/HSSPublicKeyParameters.cs b/crypto/src/pqc/crypto/lms/HSSPublicKeyParameters.cs
index 788b00fbd..85b781228 100644
--- a/crypto/src/pqc/crypto/lms/HSSPublicKeyParameters.cs
+++ b/crypto/src/pqc/crypto/lms/HSSPublicKeyParameters.cs
@@ -5,22 +5,22 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public sealed class HSSPublicKeyParameters
-        : LMSKeyParameters, ILMSContextBasedVerifier
+    public sealed class HssPublicKeyParameters
+        : LmsKeyParameters, ILmsContextBasedVerifier
     {
         private readonly int m_l;
-        private readonly LMSPublicKeyParameters m_lmsPublicKey;
+        private readonly LmsPublicKeyParameters m_lmsPublicKey;
 
-        public HSSPublicKeyParameters(int l, LMSPublicKeyParameters lmsPublicKey)
+        public HssPublicKeyParameters(int l, LmsPublicKeyParameters lmsPublicKey)
     	    :base(false)
         {
             m_l = l;
             m_lmsPublicKey = lmsPublicKey;
         }
 
-        public static HSSPublicKeyParameters GetInstance(object src)
+        public static HssPublicKeyParameters GetInstance(object src)
         {
-            if (src is HSSPublicKeyParameters hssPublicKeyParameters)
+            if (src is HssPublicKeyParameters hssPublicKeyParameters)
             {
                 return hssPublicKeyParameters;
             }
@@ -28,8 +28,8 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             {
                 int L = BinaryReaders.ReadInt32BigEndian(binaryReader);
 
-                LMSPublicKeyParameters lmsPublicKey = LMSPublicKeyParameters.GetInstance(src);
-                return new HSSPublicKeyParameters(L, lmsPublicKey);
+                LmsPublicKeyParameters lmsPublicKey = LmsPublicKeyParameters.GetInstance(src);
+                return new HssPublicKeyParameters(L, lmsPublicKey);
             }
             else if (src is byte[] bytes)
             {
@@ -54,7 +54,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
         public int L => m_l;
 
-        public LMSPublicKeyParameters LmsPublicKey => m_lmsPublicKey;
+        public LmsPublicKeyParameters LmsPublicKey => m_lmsPublicKey;
 
         public override bool Equals(Object o)
         {
@@ -63,7 +63,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             if (o == null || GetType() != o.GetType())
                 return false;
 
-            HSSPublicKeyParameters publicKey = (HSSPublicKeyParameters)o;
+            HssPublicKeyParameters publicKey = (HssPublicKeyParameters)o;
 
             return m_l == publicKey.m_l
                 && m_lmsPublicKey.Equals(publicKey.m_lmsPublicKey);
@@ -83,39 +83,39 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 .Build();
         }
 
-        public LMSContext GenerateLmsContext(byte[] sigEnc)
+        public LmsContext GenerateLmsContext(byte[] sigEnc)
         {
-            HSSSignature signature;
+            HssSignature signature;
             try
             {
-                signature = HSSSignature.GetInstance(sigEnc, L);
+                signature = HssSignature.GetInstance(sigEnc, L);
             }
             catch (IOException e)
             {
                 throw new Exception($"cannot parse signature: {e.Message}");
             }
 
-            LMSSignedPubKey[] signedPubKeys = signature.GetSignedPubKeys();
-            LMSPublicKeyParameters key = signedPubKeys[signedPubKeys.Length - 1].GetPublicKey();
+            LmsSignedPubKey[] signedPubKeys = signature.GetSignedPubKeys();
+            LmsPublicKeyParameters key = signedPubKeys[signedPubKeys.Length - 1].GetPublicKey();
 
             return key.GenerateOtsContext(signature.Signature).WithSignedPublicKeys(signedPubKeys);
         }
 
-        public bool Verify(LMSContext context)
+        public bool Verify(LmsContext context)
         {
-            LMSSignedPubKey[] sigKeys = context.SignedPubKeys;
+            LmsSignedPubKey[] sigKeys = context.SignedPubKeys;
 
             if (sigKeys.Length != L - 1)
                 return false;
 
-            LMSPublicKeyParameters key = LmsPublicKey;
+            LmsPublicKeyParameters key = LmsPublicKey;
             bool failed = false;
 
             for (int i = 0; i < sigKeys.Length; i++)
             {
-                LMSSignature sig = sigKeys[i].GetSignature();
+                LmsSignature sig = sigKeys[i].GetSignature();
                 byte[] msg = sigKeys[i].GetPublicKey().ToByteArray();
-                if (!LMS.VerifySignature(key, sig, msg))
+                if (!Lms.VerifySignature(key, sig, msg))
                 {
                     failed = true;
                 }
diff --git a/crypto/src/pqc/crypto/lms/HSSSignature.cs b/crypto/src/pqc/crypto/lms/HSSSignature.cs
index bd4af1bb8..7c4599835 100644
--- a/crypto/src/pqc/crypto/lms/HSSSignature.cs
+++ b/crypto/src/pqc/crypto/lms/HSSSignature.cs
@@ -6,30 +6,29 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class HSSSignature
+    public sealed class HssSignature
         : IEncodable
     {
         private int lMinus1;
-        private LMSSignedPubKey[] signedPubKey;
-        private LMSSignature signature;
+        private LmsSignedPubKey[] signedPubKey;
+        private LmsSignature signature;
 
-        public HSSSignature(int lMinus1, LMSSignedPubKey[] signedPubKey, LMSSignature signature)
+        public HssSignature(int lMinus1, LmsSignedPubKey[] signedPubKey, LmsSignature signature)
         {
             this.lMinus1 = lMinus1;
             this.signedPubKey = signedPubKey;
             this.signature = signature;
         }
 
-
         /**
-     * @param src byte[], InputStream or HSSSignature
-     * @param L   The HSS depth, available from public key.
-     * @return An HSSSignature instance.
-     * @throws IOException
-     */
-        public static HSSSignature GetInstance(object src, int L)
+         * @param src byte[], InputStream or HSSSignature
+         * @param L   The HSS depth, available from public key.
+         * @return An HSSSignature instance.
+         * @throws IOException
+         */
+        public static HssSignature GetInstance(object src, int L)
         {
-            if (src is HSSSignature hssSignature)
+            if (src is HssSignature hssSignature)
             {
                 return hssSignature;
             }
@@ -39,19 +38,19 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 if (lminus != L - 1)
                     throw new Exception("nspk exceeded maxNspk");
 
-                LMSSignedPubKey[] signedPubKeys = new LMSSignedPubKey[lminus];
+                LmsSignedPubKey[] signedPubKeys = new LmsSignedPubKey[lminus];
                 if (lminus != 0)
                 {
                     for (int t = 0; t < signedPubKeys.Length; t++)
                     {
-                        signedPubKeys[t] = new LMSSignedPubKey(LMSSignature.GetInstance(src),
-                            LMSPublicKeyParameters.GetInstance(src));
+                        signedPubKeys[t] = new LmsSignedPubKey(LmsSignature.GetInstance(src),
+                            LmsPublicKeyParameters.GetInstance(src));
                     }
                 }
 
-                LMSSignature sig = LMSSignature.GetInstance(src);
+                LmsSignature sig = LmsSignature.GetInstance(src);
 
-                return new HSSSignature(lminus, signedPubKeys, sig);
+                return new HssSignature(lminus, signedPubKeys, sig);
             }
             else if (src is byte[] bytes)
             {
@@ -80,12 +79,12 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return lMinus1;
         }
 
-        public LMSSignedPubKey[] GetSignedPubKeys()
+        public LmsSignedPubKey[] GetSignedPubKeys()
         {
             return signedPubKey;
         }
 
-        public LMSSignature Signature => signature;
+        public LmsSignature Signature => signature;
 
         public override bool Equals(Object o)
         {
@@ -99,7 +98,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 return false;
             }
 
-            HSSSignature signature1 = (HSSSignature) o;
+            HssSignature signature1 = (HssSignature) o;
 
             if (lMinus1 != signature1.lMinus1)
             {
@@ -139,7 +138,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             composer.U32Str(lMinus1);
             if (signedPubKey != null)
             {
-                foreach (LMSSignedPubKey sigPub in signedPubKey)
+                foreach (LmsSignedPubKey sigPub in signedPubKey)
                 {
                     composer.Bytes(sigPub);
                 }
diff --git a/crypto/src/pqc/crypto/lms/HSSSigner.cs b/crypto/src/pqc/crypto/lms/HSSSigner.cs
index 4bbdff848..9ef7b57ae 100644
--- a/crypto/src/pqc/crypto/lms/HSSSigner.cs
+++ b/crypto/src/pqc/crypto/lms/HSSSigner.cs
@@ -5,21 +5,21 @@ using Org.BouncyCastle.Crypto;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class HSSSigner 
+    public sealed class HssSigner 
         : IMessageSigner
     {
-        private HSSPrivateKeyParameters privKey;
-        private HSSPublicKeyParameters pubKey;
+        private HssPrivateKeyParameters privKey;
+        private HssPublicKeyParameters pubKey;
 
         public void Init(bool forSigning, ICipherParameters param)
         {
             if (forSigning)
             {
-                this.privKey = (HSSPrivateKeyParameters) param;
+                this.privKey = (HssPrivateKeyParameters) param;
             }
             else
             {
-                this.pubKey = (HSSPublicKeyParameters) param;
+                this.pubKey = (HssPublicKeyParameters) param;
             }
         }
 
@@ -27,7 +27,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         {
             try
             {
-                return HSS.GenerateSignature(privKey, message).GetEncoded();
+                return Hss.GenerateSignature(privKey, message).GetEncoded();
             }
             catch (IOException e)
             {
@@ -39,7 +39,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         {
             try
             {
-                return HSS.VerifySignature(pubKey, HSSSignature.GetInstance(signature, pubKey.L), message);
+                return Hss.VerifySignature(pubKey, HssSignature.GetInstance(signature, pubKey.L), message);
             }
             catch (IOException e)
             {
diff --git a/crypto/src/pqc/crypto/lms/ILMSContextBasedSigner.cs b/crypto/src/pqc/crypto/lms/ILMSContextBasedSigner.cs
index 86144b8e8..94864b471 100644
--- a/crypto/src/pqc/crypto/lms/ILMSContextBasedSigner.cs
+++ b/crypto/src/pqc/crypto/lms/ILMSContextBasedSigner.cs
@@ -1,10 +1,10 @@
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public interface ILMSContextBasedSigner
+    public interface ILmsContextBasedSigner
     {
-        LMSContext GenerateLmsContext();
+        LmsContext GenerateLmsContext();
 
-        byte[] GenerateSignature(LMSContext context);
+        byte[] GenerateSignature(LmsContext context);
 
         long GetUsagesRemaining();
     }
diff --git a/crypto/src/pqc/crypto/lms/ILMSContextBasedVerifier.cs b/crypto/src/pqc/crypto/lms/ILMSContextBasedVerifier.cs
index 76538d052..ffba83ad2 100644
--- a/crypto/src/pqc/crypto/lms/ILMSContextBasedVerifier.cs
+++ b/crypto/src/pqc/crypto/lms/ILMSContextBasedVerifier.cs
@@ -1,9 +1,9 @@
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public interface ILMSContextBasedVerifier
+    public interface ILmsContextBasedVerifier
     {
-        LMSContext GenerateLmsContext(byte[] signature);
+        LmsContext GenerateLmsContext(byte[] signature);
 
-        bool Verify(LMSContext context);
+        bool Verify(LmsContext context);
     }
 }
\ No newline at end of file
diff --git a/crypto/src/pqc/crypto/lms/LMOtsPrivateKey.cs b/crypto/src/pqc/crypto/lms/LMOtsPrivateKey.cs
index 8482c1a53..e9df6fbfd 100644
--- a/crypto/src/pqc/crypto/lms/LMOtsPrivateKey.cs
+++ b/crypto/src/pqc/crypto/lms/LMOtsPrivateKey.cs
@@ -18,22 +18,22 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             m_masterSecret = masterSecret;
         }
 
-        public LMSContext GetSignatureContext(LMSigParameters sigParams, byte[][] path)
+        public LmsContext GetSignatureContext(LMSigParameters sigParams, byte[][] path)
         {
-            byte[] C = new byte[LM_OTS.SEED_LEN];
+            byte[] C = new byte[LMOts.SEED_LEN];
 
             SeedDerive derive = GetDerivationFunction();
-            derive.J = LM_OTS.SEED_RANDOMISER_INDEX; // This value from reference impl.
+            derive.J = LMOts.SEED_RANDOMISER_INDEX; // This value from reference impl.
             derive.DeriveSeed(false, C, 0);
 
             IDigest ctx = DigestUtilities.GetDigest(m_parameters.DigestOid);
 
-            LmsUtils.ByteArray(m_I, ctx);
-            LmsUtils.U32Str(m_q, ctx);
-            LmsUtils.U16Str(LM_OTS.D_MESG, ctx);
-            LmsUtils.ByteArray(C, ctx);
+            LmsUtilities.ByteArray(m_I, ctx);
+            LmsUtilities.U32Str(m_q, ctx);
+            LmsUtilities.U16Str(LMOts.D_MESG, ctx);
+            LmsUtilities.ByteArray(C, ctx);
 
-            return new LMSContext(this, sigParams, ctx, C, path);
+            return new LmsContext(this, sigParams, ctx, C, path);
         }
 
         internal SeedDerive GetDerivationFunction()
diff --git a/crypto/src/pqc/crypto/lms/LMOtsPublicKey.cs b/crypto/src/pqc/crypto/lms/LMOtsPublicKey.cs
index 480cb3dbd..09e8b2951 100644
--- a/crypto/src/pqc/crypto/lms/LMOtsPublicKey.cs
+++ b/crypto/src/pqc/crypto/lms/LMOtsPublicKey.cs
@@ -103,28 +103,28 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 .Build();
         }
 
-        internal LMSContext CreateOtsContext(LMOtsSignature signature)
+        internal LmsContext CreateOtsContext(LMOtsSignature signature)
         {
             IDigest ctx = DigestUtilities.GetDigest(m_parameters.DigestOid);
 
-            LmsUtils.ByteArray(m_I, ctx);
-            LmsUtils.U32Str(m_q, ctx);
-            LmsUtils.U16Str(LM_OTS.D_MESG, ctx);
-            LmsUtils.ByteArray(signature.C, ctx);
+            LmsUtilities.ByteArray(m_I, ctx);
+            LmsUtilities.U32Str(m_q, ctx);
+            LmsUtilities.U16Str(LMOts.D_MESG, ctx);
+            LmsUtilities.ByteArray(signature.C, ctx);
 
-            return new LMSContext(this, signature, ctx);
+            return new LmsContext(this, signature, ctx);
         }
 
-        internal LMSContext CreateOtsContext(LMSSignature signature)
+        internal LmsContext CreateOtsContext(LmsSignature signature)
         {
             IDigest ctx = DigestUtilities.GetDigest(m_parameters.DigestOid);
 
-            LmsUtils.ByteArray(m_I, ctx);
-            LmsUtils.U32Str(m_q, ctx);
-            LmsUtils.U16Str(LM_OTS.D_MESG, ctx);
-            LmsUtils.ByteArray(signature.OtsSignature.C, ctx);
+            LmsUtilities.ByteArray(m_I, ctx);
+            LmsUtilities.U32Str(m_q, ctx);
+            LmsUtilities.U16Str(LMOts.D_MESG, ctx);
+            LmsUtilities.ByteArray(signature.OtsSignature.C, ctx);
 
-            return new LMSContext(this, signature, ctx);
+            return new LmsContext(this, signature, ctx);
         }
     }
 }
diff --git a/crypto/src/pqc/crypto/lms/LMS.cs b/crypto/src/pqc/crypto/lms/LMS.cs
index c2401bd35..3c17b0a1e 100644
--- a/crypto/src/pqc/crypto/lms/LMS.cs
+++ b/crypto/src/pqc/crypto/lms/LMS.cs
@@ -5,12 +5,12 @@ using Org.BouncyCastle.Security;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public static class LMS
+    public static class Lms
     {
         internal static ushort D_LEAF = 0x8282;
         internal static ushort D_INTR = 0x8383;
 
-        public static LMSPrivateKeyParameters GenerateKeys(LMSigParameters parameterSet,
+        public static LmsPrivateKeyParameters GenerateKeys(LMSigParameters parameterSet,
             LMOtsParameters lmOtsParameters, int q, byte[] I, byte[] rootSeed)
         {
             //
@@ -30,10 +30,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
             int twoToH = 1 << parameterSet.H;
 
-            return new LMSPrivateKeyParameters(parameterSet, lmOtsParameters, q, I, twoToH, rootSeed);
+            return new LmsPrivateKeyParameters(parameterSet, lmOtsParameters, q, I, twoToH, rootSeed);
         }
 
-        public static LMSSignature GenerateSign(LMSPrivateKeyParameters privateKey, byte[] message)
+        public static LmsSignature GenerateSign(LmsPrivateKeyParameters privateKey, byte[] message)
         {
             //
             // Get T from the public key.
@@ -42,14 +42,14 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             // byte[][] T = new byte[privateKey.getMaxQ()][];
 
             // Step 2
-            LMSContext context = privateKey.GenerateLmsContext();
+            LmsContext context = privateKey.GenerateLmsContext();
 
             context.BlockUpdate(message, 0, message.Length);
 
             return GenerateSign(context);
         }
 
-        public static LMSSignature GenerateSign(LMSContext context)
+        public static LmsSignature GenerateSign(LmsContext context)
         {
             //
             // Get T from the public key.
@@ -59,36 +59,36 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
             // Step 1.
             LMOtsSignature ots_signature =
-                LM_OTS.LMOtsGenerateSignature(context.PrivateKey, context.GetQ(), context.C);
+                LMOts.LMOtsGenerateSignature(context.PrivateKey, context.GetQ(), context.C);
 
-            return new LMSSignature(context.PrivateKey.Q, ots_signature, context.SigParams, context.Path);
+            return new LmsSignature(context.PrivateKey.Q, ots_signature, context.SigParams, context.Path);
         }
 
-        public static bool VerifySignature(LMSPublicKeyParameters publicKey, LMSSignature S, byte[] message)
+        public static bool VerifySignature(LmsPublicKeyParameters publicKey, LmsSignature S, byte[] message)
         {
-            LMSContext context = publicKey.GenerateOtsContext(S);
+            LmsContext context = publicKey.GenerateOtsContext(S);
 
-            LmsUtils.ByteArray(message, context);
+            LmsUtilities.ByteArray(message, context);
 
             return VerifySignature(publicKey, context);
         }
 
-        public static bool VerifySignature(LMSPublicKeyParameters publicKey, byte[] S, byte[] message)
+        public static bool VerifySignature(LmsPublicKeyParameters publicKey, byte[] S, byte[] message)
         {
-            LMSContext context = publicKey.GenerateLmsContext(S);
+            LmsContext context = publicKey.GenerateLmsContext(S);
 
-            LmsUtils.ByteArray(message, context);
+            LmsUtilities.ByteArray(message, context);
 
             return VerifySignature(publicKey, context);
         }
 
-        public static bool VerifySignature(LMSPublicKeyParameters publicKey, LMSContext context)
+        public static bool VerifySignature(LmsPublicKeyParameters publicKey, LmsContext context)
         {
-            LMSSignature S = (LMSSignature)context.Signature;
+            LmsSignature S = (LmsSignature)context.Signature;
             LMSigParameters lmsParameter = S.SigParameters;
             int h = lmsParameter.H;
             byte[][] path = S.Y;
-            byte[] Kc = LM_OTS.LMOtsValidateSignatureCalculate(context);
+            byte[] Kc = LMOts.LMOtsValidateSignatureCalculate(context);
             // Step 4
             // node_num = 2^h + q
             int node_num = (1 << h) + S.Q;
@@ -99,8 +99,8 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             byte[] tmp = new byte[H.GetDigestSize()];
 
             H.BlockUpdate(I, 0, I.Length);
-            LmsUtils.U32Str(node_num, H);
-            LmsUtils.U16Str(D_LEAF, H);
+            LmsUtilities.U32Str(node_num, H);
+            LmsUtilities.U16Str(D_LEAF, H);
             H.BlockUpdate(Kc, 0, Kc.Length);
             H.DoFinal(tmp, 0);
 
@@ -112,8 +112,8 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 {
                     // is odd
                     H.BlockUpdate(I, 0, I.Length);
-                    LmsUtils.U32Str(node_num / 2, H);
-                    LmsUtils.U16Str(D_INTR, H);
+                    LmsUtilities.U32Str(node_num / 2, H);
+                    LmsUtilities.U16Str(D_INTR, H);
                     H.BlockUpdate(path[i], 0, path[i].Length);
                     H.BlockUpdate(tmp, 0, tmp.Length);
                     H.DoFinal(tmp, 0);
@@ -121,8 +121,8 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 else
                 {
                     H.BlockUpdate(I, 0, I.Length);
-                    LmsUtils.U32Str(node_num / 2, H);
-                    LmsUtils.U16Str(D_INTR, H);
+                    LmsUtilities.U32Str(node_num / 2, H);
+                    LmsUtilities.U16Str(D_INTR, H);
                     H.BlockUpdate(tmp, 0, tmp.Length);
                     H.BlockUpdate(path[i], 0, path[i].Length);
                     H.DoFinal(tmp, 0);
diff --git a/crypto/src/pqc/crypto/lms/LMSContext.cs b/crypto/src/pqc/crypto/lms/LMSContext.cs
index 12975b637..6fcbd9413 100644
--- a/crypto/src/pqc/crypto/lms/LMSContext.cs
+++ b/crypto/src/pqc/crypto/lms/LMSContext.cs
@@ -4,7 +4,7 @@ using Org.BouncyCastle.Crypto;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public sealed class LMSContext
+    public sealed class LmsContext
         : IDigest
     {
         private readonly byte[] m_c;
@@ -14,10 +14,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
         private readonly LMOtsPublicKey m_publicKey;
         private readonly object m_signature;
-        private LMSSignedPubKey[] m_signedPubKeys;
+        private LmsSignedPubKey[] m_signedPubKeys;
         private volatile IDigest m_digest;
 
-        public LMSContext(LMOtsPrivateKey privateKey, LMSigParameters sigParams, IDigest digest, byte[] C,
+        public LmsContext(LMOtsPrivateKey privateKey, LMSigParameters sigParams, IDigest digest, byte[] C,
             byte[][] path)
         {
             m_privateKey = privateKey;
@@ -29,7 +29,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             m_signature = null;
         }
 
-        public LMSContext(LMOtsPublicKey publicKey, object signature, IDigest digest)
+        public LmsContext(LMOtsPublicKey publicKey, object signature, IDigest digest)
         {
             m_publicKey = publicKey;
             m_signature = signature;
@@ -44,7 +44,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
         public byte[] GetQ()
         {
-            byte[] Q = new byte[LM_OTS.MAX_HASH + 2];
+            byte[] Q = new byte[LMOts.MAX_HASH + 2];
             m_digest.DoFinal(Q, 0);
             m_digest = null;
             return Q;
@@ -60,9 +60,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
         public object Signature => m_signature;
 
-        internal LMSSignedPubKey[] SignedPubKeys => m_signedPubKeys;
+        internal LmsSignedPubKey[] SignedPubKeys => m_signedPubKeys;
 
-        internal LMSContext WithSignedPublicKeys(LMSSignedPubKey[] signedPubKeys)
+        internal LmsContext WithSignedPublicKeys(LmsSignedPubKey[] signedPubKeys)
         {
             m_signedPubKeys = signedPubKeys;
             return this;
diff --git a/crypto/src/pqc/crypto/lms/LMSException.cs b/crypto/src/pqc/crypto/lms/LMSException.cs
index c9c286b7f..694a370ed 100644
--- a/crypto/src/pqc/crypto/lms/LMSException.cs
+++ b/crypto/src/pqc/crypto/lms/LMSException.cs
@@ -4,25 +4,25 @@ using System.Runtime.Serialization;
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
     [Serializable]
-    public class LMSException
+    public class LmsException
         : Exception
     {
-		public LMSException()
+		public LmsException()
 			: base()
 		{
 		}
 
-		public LMSException(string message)
+		public LmsException(string message)
 			: base(message)
 		{
 		}
 
-		public LMSException(string message, Exception innerException)
+		public LmsException(string message, Exception innerException)
 			: base(message, innerException)
 		{
 		}
 
-		protected LMSException(SerializationInfo info, StreamingContext context)
+		protected LmsException(SerializationInfo info, StreamingContext context)
 			: base(info, context)
 		{
 		}
diff --git a/crypto/src/pqc/crypto/lms/LMSKeyGenerationParameters.cs b/crypto/src/pqc/crypto/lms/LMSKeyGenerationParameters.cs
index dd932c17d..ed2cb8957 100644
--- a/crypto/src/pqc/crypto/lms/LMSKeyGenerationParameters.cs
+++ b/crypto/src/pqc/crypto/lms/LMSKeyGenerationParameters.cs
@@ -3,10 +3,10 @@ using Org.BouncyCastle.Security;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class LMSKeyGenerationParameters
+    public class LmsKeyGenerationParameters
         : KeyGenerationParameters
     {
-        private readonly LMSParameters m_lmsParameters;
+        private readonly LmsParameters m_lmsParameters;
 
         /**
          * Base constructor - parameters and a source of randomness.
@@ -14,12 +14,12 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
          * @param lmsParameters LMS parameter set to use.
          * @param random   the random byte source.
          */
-        public LMSKeyGenerationParameters(LMSParameters lmsParameters, SecureRandom random)
-            : base(random, LmsUtils.CalculateStrength(lmsParameters)) // TODO: need something for "strength"
+        public LmsKeyGenerationParameters(LmsParameters lmsParameters, SecureRandom random)
+            : base(random, LmsUtilities.CalculateStrength(lmsParameters)) // TODO: need something for "strength"
         {
             m_lmsParameters = lmsParameters;
         }
 
-        public LMSParameters LmsParameters => m_lmsParameters;
+        public LmsParameters LmsParameters => m_lmsParameters;
     }
 }
diff --git a/crypto/src/pqc/crypto/lms/LMSKeyPairGenerator.cs b/crypto/src/pqc/crypto/lms/LMSKeyPairGenerator.cs
index 9147c3fdf..e1afb00d9 100644
--- a/crypto/src/pqc/crypto/lms/LMSKeyPairGenerator.cs
+++ b/crypto/src/pqc/crypto/lms/LMSKeyPairGenerator.cs
@@ -3,14 +3,14 @@ using Org.BouncyCastle.Security;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public sealed class LMSKeyPairGenerator
+    public sealed class LmsKeyPairGenerator
         : IAsymmetricCipherKeyPairGenerator
     {
-        private LMSKeyGenerationParameters m_parameters;
+        private LmsKeyGenerationParameters m_parameters;
 
         public void Init(KeyGenerationParameters parameters)
         {
-            m_parameters = (LMSKeyGenerationParameters)parameters;
+            m_parameters = (LmsKeyGenerationParameters)parameters;
         }
 
         public AsymmetricCipherKeyPair GenerateKeyPair()
@@ -23,7 +23,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             byte[] rootSecret = new byte[32];
             source.NextBytes(rootSecret);
 
-            LMSPrivateKeyParameters privKey = LMS.GenerateKeys(m_parameters.LmsParameters.LMSigParameters,
+            LmsPrivateKeyParameters privKey = Lms.GenerateKeys(m_parameters.LmsParameters.LMSigParameters,
                 m_parameters.LmsParameters.LMOtsParameters, 0, I, rootSecret);
 
             return new AsymmetricCipherKeyPair(privKey.GetPublicKey(), privKey);
diff --git a/crypto/src/pqc/crypto/lms/LMSKeyParameters.cs b/crypto/src/pqc/crypto/lms/LMSKeyParameters.cs
index e4b2df66d..b35ba36c4 100644
--- a/crypto/src/pqc/crypto/lms/LMSKeyParameters.cs
+++ b/crypto/src/pqc/crypto/lms/LMSKeyParameters.cs
@@ -3,10 +3,10 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public abstract class LMSKeyParameters
+    public abstract class LmsKeyParameters
         : AsymmetricKeyParameter, IEncodable
     {
-        protected LMSKeyParameters(bool isPrivateKey)
+        protected LmsKeyParameters(bool isPrivateKey)
             : base(isPrivateKey)
         {
         }
diff --git a/crypto/src/pqc/crypto/lms/LMSParameters.cs b/crypto/src/pqc/crypto/lms/LMSParameters.cs
index adffad2da..49ce2f71a 100644
--- a/crypto/src/pqc/crypto/lms/LMSParameters.cs
+++ b/crypto/src/pqc/crypto/lms/LMSParameters.cs
@@ -1,11 +1,11 @@
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public sealed class LMSParameters
+    public sealed class LmsParameters
     {
         private readonly LMSigParameters m_lmSigParameters;
         private readonly LMOtsParameters m_lmOtsParameters;
 
-        public LMSParameters(LMSigParameters lmSigParameters, LMOtsParameters lmOtsParameters)
+        public LmsParameters(LMSigParameters lmSigParameters, LMOtsParameters lmOtsParameters)
         {
             m_lmSigParameters = lmSigParameters;
             m_lmOtsParameters = lmOtsParameters;
diff --git a/crypto/src/pqc/crypto/lms/LMSPrivateKeyParameters.cs b/crypto/src/pqc/crypto/lms/LMSPrivateKeyParameters.cs
index ff1a9f6fd..25ca81938 100644
--- a/crypto/src/pqc/crypto/lms/LMSPrivateKeyParameters.cs
+++ b/crypto/src/pqc/crypto/lms/LMSPrivateKeyParameters.cs
@@ -9,13 +9,13 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class LMSPrivateKeyParameters
-        : LMSKeyParameters, ILMSContextBasedSigner
+    public class LmsPrivateKeyParameters
+        : LmsKeyParameters, ILmsContextBasedSigner
     {
         private static CacheKey T1 = new CacheKey(1);
         private static CacheKey[] internedKeys = new CacheKey[129];
 
-        static LMSPrivateKeyParameters()
+        static LmsPrivateKeyParameters()
         {
             internedKeys[1] = T1;
             for (int i = 2; i < internedKeys.Length; i++)
@@ -39,10 +39,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         // These are not final because they can be generated.
         // They also do not need to be persisted.
         //
-        private LMSPublicKeyParameters publicKey;
+        private LmsPublicKeyParameters publicKey;
 
 
-        public LMSPrivateKeyParameters(LMSigParameters lmsParameter, LMOtsParameters otsParameters, int q, byte[] I,
+        public LmsPrivateKeyParameters(LMSigParameters lmsParameter, LMOtsParameters otsParameters, int q, byte[] I,
             int maxQ, byte[] masterSecret)
             : base(true)
         {
@@ -57,7 +57,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             this.tDigest = DigestUtilities.GetDigest(lmsParameter.DigestOid);
         }
 
-        private LMSPrivateKeyParameters(LMSPrivateKeyParameters parent, int q, int maxQ)
+        private LmsPrivateKeyParameters(LmsPrivateKeyParameters parent, int q, int maxQ)
             : base(true)
         {
             this.parameters = parent.parameters;
@@ -72,18 +72,18 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             this.publicKey = parent.publicKey;
         }
 
-        public static LMSPrivateKeyParameters GetInstance(byte[] privEnc, byte[] pubEnc)
+        public static LmsPrivateKeyParameters GetInstance(byte[] privEnc, byte[] pubEnc)
         {
-            LMSPrivateKeyParameters pKey = GetInstance(privEnc);
+            LmsPrivateKeyParameters pKey = GetInstance(privEnc);
         
-            pKey.publicKey = LMSPublicKeyParameters.GetInstance(pubEnc);
+            pKey.publicKey = LmsPublicKeyParameters.GetInstance(pubEnc);
 
             return pKey;
         }
 
-        public static LMSPrivateKeyParameters GetInstance(object src)
+        public static LmsPrivateKeyParameters GetInstance(object src)
         {
-            if (src is LMSPrivateKeyParameters lmsPrivateKeyParameters)
+            if (src is LmsPrivateKeyParameters lmsPrivateKeyParameters)
             {
                 return lmsPrivateKeyParameters;
             }
@@ -91,7 +91,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             {
                 int version = BinaryReaders.ReadInt32BigEndian(binaryReader);
                 if (version != 0)
-                    throw new Exception("expected version 0 lms private key");
+                    throw new Exception("unknown version for LMS private key");
 
                 int sigParamType = BinaryReaders.ReadInt32BigEndian(binaryReader);
                 LMSigParameters sigParameter = LMSigParameters.GetParametersByID(sigParamType);
@@ -111,7 +111,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
                 byte[] masterSecret = BinaryReaders.ReadBytesFully(binaryReader, l);
 
-                return new LMSPrivateKeyParameters(sigParameter, otsParameter, q, I, maxQ, masterSecret);
+                return new LmsPrivateKeyParameters(sigParameter, otsParameter, q, I, maxQ, masterSecret);
             }
             else if (src is byte[] bytes)
             {
@@ -166,7 +166,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 q++;
         }
 
-        public LMSContext GenerateLmsContext()
+        public LmsContext GenerateLmsContext()
         {
             // Step 1.
             LMSigParameters lmsParameter = this.GetSigParameters();
@@ -191,11 +191,11 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return otsPk.GetSignatureContext(this.GetSigParameters(), path);
         }
 
-        public byte[] GenerateSignature(LMSContext context)
+        public byte[] GenerateSignature(LmsContext context)
         {
             try
             {
-                return LMS.GenerateSign(context).GetEncoded();
+                return Lms.GenerateSign(context).GetEncoded();
             }
             catch (IOException e)
             {
@@ -225,14 +225,14 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
          * @param usageCount the number of usages the key should have.
          * @return a key based on the current key that can be used usageCount times.
          */
-        public LMSPrivateKeyParameters ExtractKeyShard(int usageCount)
+        public LmsPrivateKeyParameters ExtractKeyShard(int usageCount)
         {
             lock (this)
             {
                 if (q + usageCount >= maxQ)
                     throw new ArgumentException("usageCount exceeds usages remaining");
 
-                LMSPrivateKeyParameters keyParameters = new LMSPrivateKeyParameters(this, q, q + usageCount);
+                LmsPrivateKeyParameters keyParameters = new LmsPrivateKeyParameters(this, q, q + usageCount);
                 q += usageCount;
 
                 return keyParameters;
@@ -264,13 +264,13 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return maxQ - q;
         }
 
-        public virtual LMSPublicKeyParameters GetPublicKey()
+        public virtual LmsPublicKeyParameters GetPublicKey()
         {
             lock (this)
             {
                 if (publicKey == null)
                 {
-                    publicKey = new LMSPublicKeyParameters(parameters, otsParameters, this.FindT(T1), I);
+                    publicKey = new LmsPublicKeyParameters(parameters, otsParameters, this.FindT(T1), I);
                 }
                 return publicKey;
             }
@@ -313,17 +313,17 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
             if (r >= twoToh)
             {
-                LmsUtils.ByteArray(this.GetI(), tDigest);
-                LmsUtils.U32Str(r, tDigest);
-                LmsUtils.U16Str(LMS.D_LEAF, tDigest);
+                LmsUtilities.ByteArray(this.GetI(), tDigest);
+                LmsUtilities.U32Str(r, tDigest);
+                LmsUtilities.U16Str(Lms.D_LEAF, tDigest);
                 //
                 // These can be pre generated at the time of key generation and held within the private key.
                 // However it will cost memory to have them stick around.
                 //
-                byte[] K = LM_OTS.LmsOtsGeneratePublicKey(this.GetOtsParameters(), this.GetI(), (r - twoToh),
+                byte[] K = LMOts.LmsOtsGeneratePublicKey(this.GetOtsParameters(), this.GetI(), (r - twoToh),
                     this.GetMasterSecret());
 
-                LmsUtils.ByteArray(K, tDigest);
+                LmsUtilities.ByteArray(K, tDigest);
                 T = new byte[tDigest.GetDigestSize()];
                 tDigest.DoFinal(T, 0);
                 return T;
@@ -332,11 +332,11 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             byte[] t2r = FindT(2 * r);
             byte[] t2rPlus1 = FindT((2 * r + 1));
 
-            LmsUtils.ByteArray(this.GetI(), tDigest);
-            LmsUtils.U32Str(r, tDigest);
-            LmsUtils.U16Str(LMS.D_INTR, tDigest);
-            LmsUtils.ByteArray(t2r, tDigest);
-            LmsUtils.ByteArray(t2rPlus1, tDigest);
+            LmsUtilities.ByteArray(this.GetI(), tDigest);
+            LmsUtilities.U32Str(r, tDigest);
+            LmsUtilities.U16Str(Lms.D_INTR, tDigest);
+            LmsUtilities.ByteArray(t2r, tDigest);
+            LmsUtilities.ByteArray(t2rPlus1, tDigest);
             T = new byte[tDigest.GetDigestSize()];
             tDigest.DoFinal(T, 0);
 
@@ -354,7 +354,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 return false;
             }
 
-            LMSPrivateKeyParameters that = (LMSPrivateKeyParameters)o;
+            LmsPrivateKeyParameters that = (LmsPrivateKeyParameters)o;
 
             if (q != that.q)
             {
diff --git a/crypto/src/pqc/crypto/lms/LMSPublicKeyParameters.cs b/crypto/src/pqc/crypto/lms/LMSPublicKeyParameters.cs
index 80cf15827..fa12b47c3 100644
--- a/crypto/src/pqc/crypto/lms/LMSPublicKeyParameters.cs
+++ b/crypto/src/pqc/crypto/lms/LMSPublicKeyParameters.cs
@@ -6,15 +6,15 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class LMSPublicKeyParameters
-        : LMSKeyParameters, ILMSContextBasedVerifier
+    public class LmsPublicKeyParameters
+        : LmsKeyParameters, ILmsContextBasedVerifier
     {
         private LMSigParameters parameterSet;
         private LMOtsParameters lmOtsType;
         private byte[] I;
         private byte[] T1;
 
-        public LMSPublicKeyParameters(LMSigParameters parameterSet, LMOtsParameters lmOtsType, byte[] T1, byte[] I)
+        public LmsPublicKeyParameters(LMSigParameters parameterSet, LMOtsParameters lmOtsType, byte[] T1, byte[] I)
             : base(false)
         {
             this.parameterSet = parameterSet;
@@ -23,9 +23,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             this.T1 = Arrays.Clone(T1);
         }
 
-        public static LMSPublicKeyParameters GetInstance(object src)
+        public static LmsPublicKeyParameters GetInstance(object src)
         {
-            if (src is LMSPublicKeyParameters lmsPublicKeyParameters)
+            if (src is LmsPublicKeyParameters lmsPublicKeyParameters)
             {
                 return lmsPublicKeyParameters;
             }
@@ -41,7 +41,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
                 byte[] T1 = BinaryReaders.ReadBytesFully(binaryReader, lmsParameter.M);
 
-                return new LMSPublicKeyParameters(lmsParameter, ostTypeCode, T1, I);
+                return new LmsPublicKeyParameters(lmsParameter, ostTypeCode, T1, I);
             }
             else if (src is byte[] bytes)
              {
@@ -81,9 +81,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             return lmOtsType;
         }
 
-        public LMSParameters GetLmsParameters()
+        public LmsParameters GetLmsParameters()
         {
-            return new LMSParameters(this.GetSigParameters(), this.GetOtsParameters());
+            return new LmsParameters(this.GetSigParameters(), this.GetOtsParameters());
         }
 
         public byte[] GetT1()
@@ -117,7 +117,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 return false;
             }
 
-            LMSPublicKeyParameters publicKey = (LMSPublicKeyParameters)o;
+            LmsPublicKeyParameters publicKey = (LmsPublicKeyParameters)o;
 
             if (!parameterSet.Equals(publicKey.parameterSet))
             {
@@ -153,11 +153,11 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 .Build();
         }
 
-        public LMSContext GenerateLmsContext(byte[] signature)
+        public LmsContext GenerateLmsContext(byte[] signature)
         {
             try
             {
-                return GenerateOtsContext(LMSSignature.GetInstance(signature));
+                return GenerateOtsContext(LmsSignature.GetInstance(signature));
             }
             catch (IOException e)
             {
@@ -165,7 +165,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             }
         }
 
-        internal LMSContext GenerateOtsContext(LMSSignature S)
+        internal LmsContext GenerateOtsContext(LmsSignature S)
         {
             int ots_typecode = GetOtsParameters().ID;
             if (S.OtsSignature.ParamType.ID != ots_typecode)
@@ -178,9 +178,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 .CreateOtsContext(S);
         }
 
-        public bool Verify(LMSContext context)
+        public bool Verify(LmsContext context)
         {
-            return LMS.VerifySignature(this, context);
+            return Lms.VerifySignature(this, context);
         }
     }
 }
diff --git a/crypto/src/pqc/crypto/lms/LMSSignature.cs b/crypto/src/pqc/crypto/lms/LMSSignature.cs
index 3f95ec516..f5d355297 100644
--- a/crypto/src/pqc/crypto/lms/LMSSignature.cs
+++ b/crypto/src/pqc/crypto/lms/LMSSignature.cs
@@ -6,7 +6,7 @@ using Org.BouncyCastle.Utilities.IO;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class LMSSignature
+    public class LmsSignature
         : IEncodable
     {
         private int q;
@@ -14,7 +14,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         private LMSigParameters parameter;
         private byte[][] y;
 
-        public LMSSignature(int q, LMOtsSignature otsSignature, LMSigParameters parameter, byte[][] y)
+        public LmsSignature(int q, LMOtsSignature otsSignature, LMSigParameters parameter, byte[][] y)
         {
             this.q = q;
             this.otsSignature = otsSignature;
@@ -22,9 +22,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             this.y = y;
         }
 
-        public static LMSSignature GetInstance(object src)
+        public static LmsSignature GetInstance(object src)
         {
-            if (src is LMSSignature lmsSignature)
+            if (src is LmsSignature lmsSignature)
             {
                 return lmsSignature;
             }
@@ -44,7 +44,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                     binaryReader.Read(path[h], 0, path[h].Length);
                 }
 
-                return new LMSSignature(q, otsSignature, type, path);
+                return new LmsSignature(q, otsSignature, type, path);
             }
             else if (src is byte[] bytes)
             {
@@ -77,7 +77,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 return false;
             }
 
-            LMSSignature that = (LMSSignature)o;
+            LmsSignature that = (LmsSignature)o;
 
             if (q != that.q)
             {
diff --git a/crypto/src/pqc/crypto/lms/LMSSignedPubKey.cs b/crypto/src/pqc/crypto/lms/LMSSignedPubKey.cs
index 024ee5f4c..5e07c9c93 100644
--- a/crypto/src/pqc/crypto/lms/LMSSignedPubKey.cs
+++ b/crypto/src/pqc/crypto/lms/LMSSignedPubKey.cs
@@ -4,25 +4,25 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class LMSSignedPubKey
+    public class LmsSignedPubKey
         : IEncodable
     {
-        private LMSSignature signature;
-        private LMSPublicKeyParameters publicKey;
+        private LmsSignature signature;
+        private LmsPublicKeyParameters publicKey;
 
-        public LMSSignedPubKey(LMSSignature signature, LMSPublicKeyParameters publicKey)
+        public LmsSignedPubKey(LmsSignature signature, LmsPublicKeyParameters publicKey)
         {
             this.signature = signature;
             this.publicKey = publicKey;
         }
 
 
-        public LMSSignature GetSignature()
+        public LmsSignature GetSignature()
         {
             return signature;
         }
 
-        public LMSPublicKeyParameters GetPublicKey()
+        public LmsPublicKeyParameters GetPublicKey()
         {
             return publicKey;
         }
@@ -38,7 +38,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
                 return false;
             }
 
-            LMSSignedPubKey that = (LMSSignedPubKey)o;
+            LmsSignedPubKey that = (LmsSignedPubKey)o;
 
             if (signature != null ? !signature.Equals(that.signature) : that.signature != null)
             {
diff --git a/crypto/src/pqc/crypto/lms/LMSSigner.cs b/crypto/src/pqc/crypto/lms/LMSSigner.cs
index 05824307a..edbfd7330 100644
--- a/crypto/src/pqc/crypto/lms/LMSSigner.cs
+++ b/crypto/src/pqc/crypto/lms/LMSSigner.cs
@@ -5,21 +5,21 @@ using Org.BouncyCastle.Crypto;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public sealed class LMSSigner
+    public sealed class LmsSigner
         : IMessageSigner
     {
-        private LMSPrivateKeyParameters m_privateKey;
-        private LMSPublicKeyParameters m_publicKey;
+        private LmsPrivateKeyParameters m_privateKey;
+        private LmsPublicKeyParameters m_publicKey;
 
         public void Init(bool forSigning, ICipherParameters param)
         {
             if (forSigning)
             {
-                m_privateKey = (LMSPrivateKeyParameters)param;
+                m_privateKey = (LmsPrivateKeyParameters)param;
             }
             else
             {
-                m_publicKey = (LMSPublicKeyParameters)param;
+                m_publicKey = (LmsPublicKeyParameters)param;
             }
         }
 
@@ -27,7 +27,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         {
             try
             {
-                return LMS.GenerateSign(m_privateKey, message).GetEncoded();
+                return Lms.GenerateSign(m_privateKey, message).GetEncoded();
             }
             catch (IOException e)
             {
@@ -39,7 +39,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         {
             try
             {
-                return LMS.VerifySignature(m_publicKey, LMSSignature.GetInstance(signature), message);
+                return Lms.VerifySignature(m_publicKey, LmsSignature.GetInstance(signature), message);
             }
             catch (IOException e)
             {
diff --git a/crypto/src/pqc/crypto/lms/LM_OTS.cs b/crypto/src/pqc/crypto/lms/LM_OTS.cs
index b9634c652..c3cd3da90 100644
--- a/crypto/src/pqc/crypto/lms/LM_OTS.cs
+++ b/crypto/src/pqc/crypto/lms/LM_OTS.cs
@@ -7,7 +7,7 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class LM_OTS
+    public static class LMOts
     {
         private static ushort D_PBLC = 0x8080;
         private static int ITER_K = 20;
@@ -113,9 +113,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
 
             if (!preHashed)
             {
-                LMSContext qCtx = privateKey.GetSignatureContext(sigParams, path);
+                LmsContext qCtx = privateKey.GetSignatureContext(sigParams, path);
 
-                LmsUtils.ByteArray(message, 0, message.Length, qCtx);
+                LmsUtilities.ByteArray(message, 0, message.Length, qCtx);
 
                 C = qCtx.C;
                 Q = qCtx.GetQ();
@@ -175,7 +175,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             bool prehashed)
         {
             if (!signature.ParamType.Equals(publicKey.Parameters)) // todo check
-                throw new LMSException("public key and signature ots types do not match");
+                throw new LmsException("public key and signature ots types do not match");
 
             return Arrays.AreEqual(LMOtsValidateSignatureCalculate(publicKey, signature, message), publicKey.K);
         }
@@ -183,22 +183,22 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
         public static byte[] LMOtsValidateSignatureCalculate(LMOtsPublicKey publicKey, LMOtsSignature signature, 
             byte[] message)
         {
-            LMSContext ctx = publicKey.CreateOtsContext(signature);
+            LmsContext ctx = publicKey.CreateOtsContext(signature);
 
-            LmsUtils.ByteArray(message, ctx);
+            LmsUtilities.ByteArray(message, ctx);
 
             return LMOtsValidateSignatureCalculate(ctx);
         }
 
-        public static byte[] LMOtsValidateSignatureCalculate(LMSContext context)
+        public static byte[] LMOtsValidateSignatureCalculate(LmsContext context)
         {
             LMOtsPublicKey publicKey = context.PublicKey;
             LMOtsParameters parameter = publicKey.Parameters;
             object sig = context.Signature;
             LMOtsSignature signature;
-            if (sig is LMSSignature)
+            if (sig is LmsSignature)
             {
-                signature = ((LMSSignature)sig).OtsSignature;
+                signature = ((LmsSignature)sig).OtsSignature;
             }
             else
             {
@@ -218,9 +218,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             int q = publicKey.Q;
 
             IDigest finalContext = DigestUtilities.GetDigest(parameter.DigestOid);
-            LmsUtils.ByteArray(I, finalContext);
-            LmsUtils.U32Str(q, finalContext);
-            LmsUtils.U16Str(D_PBLC, finalContext);
+            LmsUtilities.ByteArray(I, finalContext);
+            LmsUtilities.U32Str(q, finalContext);
+            LmsUtilities.U16Str(D_PBLC, finalContext);
 
             byte[] tmp = Composer.Compose()
                 .Bytes(I)
diff --git a/crypto/src/pqc/crypto/lms/LmsUtils.cs b/crypto/src/pqc/crypto/lms/LmsUtils.cs
index 3b08b009d..da3f457d2 100644
--- a/crypto/src/pqc/crypto/lms/LmsUtils.cs
+++ b/crypto/src/pqc/crypto/lms/LmsUtils.cs
@@ -4,7 +4,7 @@ using Org.BouncyCastle.Crypto;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Lms
 {
-    public class LmsUtils
+    public static class LmsUtilities
     {
         public static void U32Str(int n, IDigest d)
         {
@@ -30,7 +30,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms
             digest.BlockUpdate(array, start, len);
         }
 
-        public static int CalculateStrength(LMSParameters lmsParameters)
+        public static int CalculateStrength(LmsParameters lmsParameters)
         {
             if (lmsParameters == null)
                 throw new ArgumentNullException(nameof(lmsParameters));
diff --git a/crypto/src/pqc/crypto/utils/PrivateKeyFactory.cs b/crypto/src/pqc/crypto/utils/PrivateKeyFactory.cs
index 1bcd10934..9d6975742 100644
--- a/crypto/src/pqc/crypto/utils/PrivateKeyFactory.cs
+++ b/crypto/src/pqc/crypto/utils/PrivateKeyFactory.cs
@@ -24,9 +24,8 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Utilities
 {
-    public class PrivateKeyFactory
+    public static class PrivateKeyFactory
     {
-
         /// <summary> Create a private key parameter from a PKCS8 PrivateKeyInfo encoding.</summary>
         /// <param name="privateKeyInfoData"> the PrivateKeyInfo encoding</param>
         /// <returns> a suitable private key parameter</returns>
@@ -45,7 +44,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
             return CreateKey(PrivateKeyInfo.GetInstance(new Asn1InputStream(inStr).ReadObject()));
         }
 
-
         /// <summary> Create a private key parameter from the passed in PKCS8 PrivateKeyInfo object.</summary>
         /// <param name="keyInfo"> the PrivateKeyInfo object containing the key material</param>
         /// <returns> a suitable private key parameter</returns>
@@ -66,14 +64,13 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
                     {
                         byte[] pubEnc = pubKey.GetOctets();
 
-                        return LMSPrivateKeyParameters.GetInstance(Arrays.CopyOfRange(keyEnc, 4, keyEnc.Length),
+                        return LmsPrivateKeyParameters.GetInstance(Arrays.CopyOfRange(keyEnc, 4, keyEnc.Length),
                             Arrays.CopyOfRange(pubEnc, 4, pubEnc.Length));
                     }
 
-                    return LMSPrivateKeyParameters.GetInstance(Arrays.CopyOfRange(keyEnc, 4, keyEnc.Length));
+                    return LmsPrivateKeyParameters.GetInstance(Arrays.CopyOfRange(keyEnc, 4, keyEnc.Length));
                 }
             }
-
             if (algOID.On(BCObjectIdentifiers.pqc_kem_mceliece))
             {
                 CmcePrivateKey cmceKey = CmcePrivateKey.GetInstance(keyInfo.ParsePrivateKey());
@@ -81,7 +78,6 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
 
                 return new CmcePrivateKeyParameters(spParams, cmceKey.Delta, cmceKey.C, cmceKey.G, cmceKey.Alpha, cmceKey.S);
             }
-            
             if (algOID.On(BCObjectIdentifiers.sphincsPlus))
             {
                 byte[] keyEnc = Asn1OctetString.GetInstance(keyInfo.ParsePrivateKey()).GetOctets();
diff --git a/crypto/src/pqc/crypto/utils/PrivateKeyInfoFactory.cs b/crypto/src/pqc/crypto/utils/PrivateKeyInfoFactory.cs
index 3525b79d3..be2807b19 100644
--- a/crypto/src/pqc/crypto/utils/PrivateKeyInfoFactory.cs
+++ b/crypto/src/pqc/crypto/utils/PrivateKeyInfoFactory.cs
@@ -20,13 +20,8 @@ using Org.BouncyCastle.Pqc.Crypto.Hqc;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Utilities
 {
-    public class PrivateKeyInfoFactory
+    public static class PrivateKeyInfoFactory
     {
-        private PrivateKeyInfoFactory()
-        {
-
-        }
-
         /// <summary> Create a PrivateKeyInfo representation of a private key.</summary>
         /// <param name="privateKey"> the key to be encoded into the info object.</param>
         /// <returns> the appropriate PrivateKeyInfo</returns>
@@ -43,22 +38,19 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
         /// <exception cref="ArgumentException"> on an error encoding the key</exception>
         public static PrivateKeyInfo CreatePrivateKeyInfo(AsymmetricKeyParameter privateKey, Asn1Set attributes)
         {
-            if (privateKey is LMSPrivateKeyParameters)
+            if (privateKey is LmsPrivateKeyParameters lmsPrivateKeyParameters)
             {
-                LMSPrivateKeyParameters parameters = (LMSPrivateKeyParameters)privateKey;
-
-                byte[] encoding = Composer.Compose().U32Str(1).Bytes(parameters).Build();
-                byte[] pubEncoding = Composer.Compose().U32Str(1).Bytes(parameters.GetPublicKey()).Build();
+                byte[] encoding = Composer.Compose().U32Str(1).Bytes(lmsPrivateKeyParameters).Build();
+                byte[] pubEncoding = Composer.Compose().U32Str(1).Bytes(lmsPrivateKeyParameters.GetPublicKey()).Build();
 
                 AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdAlgHssLmsHashsig);
                 return new PrivateKeyInfo(algorithmIdentifier, new DerOctetString(encoding), attributes, pubEncoding);
             }
-            if (privateKey is HSSPrivateKeyParameters)
+            if (privateKey is HssPrivateKeyParameters hssPrivateKeyParameters)
             {
-                HSSPrivateKeyParameters parameters = (HSSPrivateKeyParameters)privateKey;
-
-                byte[] encoding = Composer.Compose().U32Str(parameters.L).Bytes(parameters).Build();
-                byte[] pubEncoding = Composer.Compose().U32Str(parameters.L).Bytes(parameters.GetPublicKey().LmsPublicKey).Build();
+                int L = hssPrivateKeyParameters.L;
+                byte[] encoding = Composer.Compose().U32Str(L).Bytes(hssPrivateKeyParameters).Build();
+                byte[] pubEncoding = Composer.Compose().U32Str(L).Bytes(hssPrivateKeyParameters.GetPublicKey().LmsPublicKey).Build();
 
                 AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdAlgHssLmsHashsig);
                 return new PrivateKeyInfo(algorithmIdentifier, new DerOctetString(encoding), attributes, pubEncoding);
diff --git a/crypto/src/pqc/crypto/utils/PublicKeyFactory.cs b/crypto/src/pqc/crypto/utils/PublicKeyFactory.cs
index 1d753c637..08dbaf507 100644
--- a/crypto/src/pqc/crypto/utils/PublicKeyFactory.cs
+++ b/crypto/src/pqc/crypto/utils/PublicKeyFactory.cs
@@ -4,6 +4,7 @@ using System.IO;
 
 using Org.BouncyCastle.Asn1;
 using Org.BouncyCastle.Asn1.BC;
+using Org.BouncyCastle.Asn1.Pkcs;
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Crypto;
 using Org.BouncyCastle.Crypto.Utilities;
@@ -15,6 +16,7 @@ using Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium;
 using Org.BouncyCastle.Pqc.Crypto.Crystals.Kyber;
 using Org.BouncyCastle.Pqc.Crypto.Falcon;
 using Org.BouncyCastle.Pqc.Crypto.Hqc;
+using Org.BouncyCastle.Pqc.Crypto.Lms;
 using Org.BouncyCastle.Pqc.Crypto.Picnic;
 using Org.BouncyCastle.Pqc.Crypto.Saber;
 using Org.BouncyCastle.Pqc.Crypto.Sike;
@@ -23,86 +25,88 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Pqc.Crypto.Utilities
 {
-    public class PublicKeyFactory
+    public static class PublicKeyFactory
     {
-        private static Dictionary<DerObjectIdentifier, SubjectPublicKeyInfoConverter> converters = new Dictionary<DerObjectIdentifier, SubjectPublicKeyInfoConverter>();
-
+        private static Dictionary<DerObjectIdentifier, SubjectPublicKeyInfoConverter> Converters =
+            new Dictionary<DerObjectIdentifier, SubjectPublicKeyInfoConverter>();
 
         static PublicKeyFactory()
         {
-            converters[BCObjectIdentifiers.sphincsPlus] = new SphincsPlusConverter();
-            converters[BCObjectIdentifiers.sphincsPlus_shake_256] = new SphincsPlusConverter();
-            converters[BCObjectIdentifiers.sphincsPlus_sha_256] = new SphincsPlusConverter();
-            converters[BCObjectIdentifiers.sphincsPlus_sha_512] = new SphincsPlusConverter();
+            Converters[PkcsObjectIdentifiers.IdAlgHssLmsHashsig] = new LmsConverter();
+
+            Converters[BCObjectIdentifiers.sphincsPlus] = new SphincsPlusConverter();
+            Converters[BCObjectIdentifiers.sphincsPlus_shake_256] = new SphincsPlusConverter();
+            Converters[BCObjectIdentifiers.sphincsPlus_sha_256] = new SphincsPlusConverter();
+            Converters[BCObjectIdentifiers.sphincsPlus_sha_512] = new SphincsPlusConverter();
             
-            converters[BCObjectIdentifiers.mceliece348864_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece348864f_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece460896_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece460896f_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece6688128_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece6688128f_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece6960119_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece6960119f_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece8192128_r3] = new CmceConverter();
-            converters[BCObjectIdentifiers.mceliece8192128f_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece348864_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece348864f_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece460896_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece460896f_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece6688128_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece6688128f_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece6960119_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece6960119f_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece8192128_r3] = new CmceConverter();
+            Converters[BCObjectIdentifiers.mceliece8192128f_r3] = new CmceConverter();
            
-            converters[BCObjectIdentifiers.lightsaberkem128r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.saberkem128r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.firesaberkem128r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.lightsaberkem192r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.saberkem192r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.firesaberkem192r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.lightsaberkem256r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.saberkem256r3] = new SaberConverter();
-            converters[BCObjectIdentifiers.firesaberkem256r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.lightsaberkem128r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.saberkem128r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.firesaberkem128r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.lightsaberkem192r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.saberkem192r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.firesaberkem192r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.lightsaberkem256r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.saberkem256r3] = new SaberConverter();
+            Converters[BCObjectIdentifiers.firesaberkem256r3] = new SaberConverter();
             
-            converters[BCObjectIdentifiers.picnic] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl1fs] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl1ur] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl3fs] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl3ur] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl5fs] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl5ur] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnic3l1] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnic3l3] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnic3l5] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl1full] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl3full] = new PicnicConverter();
-            converters[BCObjectIdentifiers.picnicl5full] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnic] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl1fs] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl1ur] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl3fs] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl3ur] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl5fs] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl5ur] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnic3l1] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnic3l3] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnic3l5] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl1full] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl3full] = new PicnicConverter();
+            Converters[BCObjectIdentifiers.picnicl5full] = new PicnicConverter();
             
-            converters[BCObjectIdentifiers.sikep434] = new SikeConverter();
-            converters[BCObjectIdentifiers.sikep503] = new SikeConverter();
-            converters[BCObjectIdentifiers.sikep610] = new SikeConverter();
-            converters[BCObjectIdentifiers.sikep751] = new SikeConverter();
-            converters[BCObjectIdentifiers.sikep434_compressed] = new SikeConverter();
-            converters[BCObjectIdentifiers.sikep503_compressed] = new SikeConverter();
-            converters[BCObjectIdentifiers.sikep610_compressed] = new SikeConverter();
-            converters[BCObjectIdentifiers.sikep751_compressed] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep434] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep503] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep610] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep751] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep434_compressed] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep503_compressed] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep610_compressed] = new SikeConverter();
+            Converters[BCObjectIdentifiers.sikep751_compressed] = new SikeConverter();
             
-            converters[BCObjectIdentifiers.dilithium2] = new DilithiumConverter();
-            converters[BCObjectIdentifiers.dilithium3] = new DilithiumConverter();
-            converters[BCObjectIdentifiers.dilithium5] = new DilithiumConverter();
-            converters[BCObjectIdentifiers.dilithium2_aes] = new DilithiumConverter();
-            converters[BCObjectIdentifiers.dilithium3_aes] = new DilithiumConverter();
-            converters[BCObjectIdentifiers.dilithium5_aes] = new DilithiumConverter();
+            Converters[BCObjectIdentifiers.dilithium2] = new DilithiumConverter();
+            Converters[BCObjectIdentifiers.dilithium3] = new DilithiumConverter();
+            Converters[BCObjectIdentifiers.dilithium5] = new DilithiumConverter();
+            Converters[BCObjectIdentifiers.dilithium2_aes] = new DilithiumConverter();
+            Converters[BCObjectIdentifiers.dilithium3_aes] = new DilithiumConverter();
+            Converters[BCObjectIdentifiers.dilithium5_aes] = new DilithiumConverter();
             
-            converters[BCObjectIdentifiers.falcon_512] = new FalconConverter();
-            converters[BCObjectIdentifiers.falcon_1024] = new FalconConverter();
+            Converters[BCObjectIdentifiers.falcon_512] = new FalconConverter();
+            Converters[BCObjectIdentifiers.falcon_1024] = new FalconConverter();
             
-            converters[BCObjectIdentifiers.kyber512] = new KyberConverter();
-            converters[BCObjectIdentifiers.kyber512_aes] = new KyberConverter();
-            converters[BCObjectIdentifiers.kyber768] = new KyberConverter();
-            converters[BCObjectIdentifiers.kyber768_aes] = new KyberConverter();
-            converters[BCObjectIdentifiers.kyber1024] = new KyberConverter();
-            converters[BCObjectIdentifiers.kyber1024_aes] = new KyberConverter();
-
-            converters[BCObjectIdentifiers.bike128] = new BikeConverter();
-            converters[BCObjectIdentifiers.bike192] = new BikeConverter();
-            converters[BCObjectIdentifiers.bike256] = new BikeConverter();
-
-            converters[BCObjectIdentifiers.hqc128] = new HqcConverter();
-            converters[BCObjectIdentifiers.hqc192] = new HqcConverter();
-            converters[BCObjectIdentifiers.hqc256] = new HqcConverter();
+            Converters[BCObjectIdentifiers.kyber512] = new KyberConverter();
+            Converters[BCObjectIdentifiers.kyber512_aes] = new KyberConverter();
+            Converters[BCObjectIdentifiers.kyber768] = new KyberConverter();
+            Converters[BCObjectIdentifiers.kyber768_aes] = new KyberConverter();
+            Converters[BCObjectIdentifiers.kyber1024] = new KyberConverter();
+            Converters[BCObjectIdentifiers.kyber1024_aes] = new KyberConverter();
+
+            Converters[BCObjectIdentifiers.bike128] = new BikeConverter();
+            Converters[BCObjectIdentifiers.bike192] = new BikeConverter();
+            Converters[BCObjectIdentifiers.bike256] = new BikeConverter();
+
+            Converters[BCObjectIdentifiers.hqc128] = new HqcConverter();
+            Converters[BCObjectIdentifiers.hqc192] = new HqcConverter();
+            Converters[BCObjectIdentifiers.hqc256] = new HqcConverter();
         }
 
         /// <summary> Create a public key from a SubjectPublicKeyInfo encoding</summary>
@@ -140,7 +144,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
         public static AsymmetricKeyParameter CreateKey(SubjectPublicKeyInfo keyInfo, object defaultParams)
         {
             AlgorithmIdentifier algId = keyInfo.AlgorithmID;
-            SubjectPublicKeyInfoConverter converter = (SubjectPublicKeyInfoConverter)converters[algId.Algorithm];
+            SubjectPublicKeyInfoConverter converter = (SubjectPublicKeyInfoConverter)Converters[algId.Algorithm];
 
             if (converter != null)
             {
@@ -155,7 +159,30 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
         {
             internal abstract AsymmetricKeyParameter GetPublicKeyParameters(SubjectPublicKeyInfo keyInfo, object defaultParams);
         }
-        
+
+        private class LmsConverter
+        :   SubjectPublicKeyInfoConverter
+        {
+            internal override AsymmetricKeyParameter GetPublicKeyParameters(SubjectPublicKeyInfo keyInfo, object defaultParams)
+            {
+                byte[] keyEnc = Asn1OctetString.GetInstance(keyInfo.ParsePublicKey()).GetOctets();
+
+                if (Pack.BE_To_UInt32(keyEnc, 0) == 1U)
+                {
+                    return LmsPublicKeyParameters.GetInstance(Arrays.CopyOfRange(keyEnc, 4, keyEnc.Length));
+                }
+                else
+                {
+                    // public key with extra tree height
+                    if (keyEnc.Length == 64)
+                    {
+                        keyEnc = Arrays.CopyOfRange(keyEnc, 4, keyEnc.Length);
+                    }
+                    return HssPublicKeyParameters.GetInstance(keyEnc);
+                }
+            }
+        }
+
         private class SphincsPlusConverter
             : SubjectPublicKeyInfoConverter
         {
diff --git a/crypto/src/pqc/crypto/utils/SubjectPublicKeyInfoFactory.cs b/crypto/src/pqc/crypto/utils/SubjectPublicKeyInfoFactory.cs
index 7ef63871f..e44a91a26 100644
--- a/crypto/src/pqc/crypto/utils/SubjectPublicKeyInfoFactory.cs
+++ b/crypto/src/pqc/crypto/utils/SubjectPublicKeyInfoFactory.cs
@@ -1,6 +1,7 @@
 using System;
 
 using Org.BouncyCastle.Asn1;
+using Org.BouncyCastle.Asn1.Pkcs;
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Crypto;
 using Org.BouncyCastle.Math;
@@ -11,6 +12,7 @@ using Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium;
 using Org.BouncyCastle.Pqc.Crypto.Crystals.Kyber;
 using Org.BouncyCastle.Pqc.Crypto.Falcon;
 using Org.BouncyCastle.Pqc.Crypto.Hqc;
+using Org.BouncyCastle.Pqc.Crypto.Lms;
 using Org.BouncyCastle.Pqc.Crypto.Picnic;
 using Org.BouncyCastle.Pqc.Crypto.Saber;
 using Org.BouncyCastle.Pqc.Crypto.Sike;
@@ -23,26 +25,36 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
     /// <summary>
     /// A factory to produce Public Key Info Objects.
     /// </summary>
-    public class SubjectPublicKeyInfoFactory
+    public static class SubjectPublicKeyInfoFactory
     {
-        private SubjectPublicKeyInfoFactory()
-        {
-        }
-
         /// <summary>
         /// Create a Subject Public Key Info object for a given public key.
         /// </summary>
         /// <param name="publicKey">One of ElGammalPublicKeyParameters, DSAPublicKeyParameter, DHPublicKeyParameters, RsaKeyParameters or ECPublicKeyParameters</param>
         /// <returns>A subject public key info object.</returns>
         /// <exception cref="Exception">Throw exception if object provided is not one of the above.</exception>
-        public static SubjectPublicKeyInfo CreateSubjectPublicKeyInfo(
-            AsymmetricKeyParameter publicKey)
+        public static SubjectPublicKeyInfo CreateSubjectPublicKeyInfo(AsymmetricKeyParameter publicKey)
         {
             if (publicKey == null)
                 throw new ArgumentNullException("publicKey");
             if (publicKey.IsPrivate)
                 throw new ArgumentException("Private key passed - public key expected.", "publicKey");
-            
+
+            if (publicKey is LmsPublicKeyParameters lmsPublicKeyParameters)
+            {
+                byte[] encoding = Composer.Compose().U32Str(1).Bytes(lmsPublicKeyParameters).Build();
+
+                AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdAlgHssLmsHashsig);
+                return new SubjectPublicKeyInfo(algorithmIdentifier, new DerOctetString(encoding));
+            }
+            if (publicKey is HssPublicKeyParameters hssPublicKeyParameters)
+            {
+                int L = hssPublicKeyParameters.L;
+                byte[] encoding = Composer.Compose().U32Str(L).Bytes(hssPublicKeyParameters.LmsPublicKey).Build();
+
+                AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdAlgHssLmsHashsig);
+                return new SubjectPublicKeyInfo(algorithmIdentifier, new DerOctetString(encoding));
+            }
             if (publicKey is SphincsPlusPublicKeyParameters)
             {
                 SphincsPlusPublicKeyParameters parameters = (SphincsPlusPublicKeyParameters)publicKey;