Skip to content

Commit

Permalink
Delete CH128 stream cipher algorithm (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrampone authored May 22, 2024
1 parent 0e1e7f9 commit b0f5a5d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ private IStreamCipher getCipherEngine(SymmetricStreamAlgorithm algorithm)
case SymmetricStreamAlgorithm.RC4:
engine = new RC4Engine();
break;
case SymmetricStreamAlgorithm.HC128:
engine = new HC128Engine();
break;
case SymmetricStreamAlgorithm.HC256:
engine = new HC256Engine();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace GeneXusCryptography.SymmetricUtils
public enum SymmetricStreamAlgorithm
{
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
NONE, RC4, HC128, HC256, CHACHA20, SALSA20, XSALSA20, ISAAC
NONE, RC4, HC256, CHACHA20, SALSA20, XSALSA20, ISAAC
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
}

Expand Down Expand Up @@ -44,8 +44,6 @@ public static SymmetricStreamAlgorithm getSymmetricStreamAlgorithm(String symmet
{
case "RC4":
return SymmetricStreamAlgorithm.RC4;
case "HC128":
return SymmetricStreamAlgorithm.HC128;
case "HC256":
return SymmetricStreamAlgorithm.HC256;
case "CHACHA20":
Expand Down Expand Up @@ -74,8 +72,6 @@ public static String valueOf(SymmetricStreamAlgorithm symmetrcStreamAlgorithm, E
{
case SymmetricStreamAlgorithm.RC4:
return "RC4";
case SymmetricStreamAlgorithm.HC128:
return "HC128";
case SymmetricStreamAlgorithm.HC256:
return "HC256";
case SymmetricStreamAlgorithm.CHACHA20:
Expand Down Expand Up @@ -109,10 +105,6 @@ public static int[] getKeySize(SymmetricStreamAlgorithm algorithm, Error error)
keySize[1] = 40;
keySize[2] = 2048;
break;
case SymmetricStreamAlgorithm.HC128:
keySize[0] = 1;
keySize[1] = 128;
break;
case SymmetricStreamAlgorithm.HC256:
case SymmetricStreamAlgorithm.XSALSA20:
keySize[0] = 1;
Expand Down Expand Up @@ -148,7 +140,6 @@ internal static bool usesIV(SymmetricStreamAlgorithm algorithm, Error error)
switch (algorithm)
{
case SymmetricStreamAlgorithm.RC4:
case SymmetricStreamAlgorithm.HC128:
case SymmetricStreamAlgorithm.ISAAC:
return false;
case SymmetricStreamAlgorithm.HC256:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ public void TestRC4()
testBulkAlgorithms("RC4", key1024, "");
}

/* [Test]
public void TestHC128()
{
// HC128 key 128 bits, no nonce
testBulkAlgorithms("HC128", key128, IV128);
}*/

[Test]
public void TestHC256()
{
Expand Down

0 comments on commit b0f5a5d

Please sign in to comment.