Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<NoWarn>CA1031, CA1801, CA1724</NoWarn>
<PackageId>GeneXus.SecurityApi.Cryptography</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SecurityAPICommons\SecurityAPICommons.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ private IStreamCipher getCipherEngine(SymmetricStreamAlgorithm algorithm)
case SymmetricStreamAlgorithm.ISAAC:
engine = new IsaacEngine();
break;
case SymmetricStreamAlgorithm.VMPC:
engine = new VmpcEngine();
break;
default:
this.GetError().setError("SS005", "Cipher " + algorithm + " not recognised.");
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, VMPC
NONE, RC4, HC128, HC256, CHACHA20, SALSA20, XSALSA20, ISAAC
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
}

Expand Down Expand Up @@ -56,8 +56,6 @@ public static SymmetricStreamAlgorithm getSymmetricStreamAlgorithm(String symmet
return SymmetricStreamAlgorithm.XSALSA20;
case "ISAAC":
return SymmetricStreamAlgorithm.ISAAC;
case "VMPC":
return SymmetricStreamAlgorithm.VMPC;
default:
error.setError("SSA01", "Unrecognized SymmetricStreamAlgorithm");
return SymmetricStreamAlgorithm.NONE;
Expand Down Expand Up @@ -88,8 +86,6 @@ public static String valueOf(SymmetricStreamAlgorithm symmetrcStreamAlgorithm, E
return "XSALSA20";
case SymmetricStreamAlgorithm.ISAAC:
return "ISAAC";
case SymmetricStreamAlgorithm.VMPC:
return "VMPC";
default:
error.setError("SSA02", "Unrecognized SymmetricStreamAlgorithm");
return "Unrecognized algorithm";
Expand Down Expand Up @@ -133,11 +129,6 @@ public static int[] getKeySize(SymmetricStreamAlgorithm algorithm, Error error)
keySize[1] = 32;
keySize[2] = 8192;
break;
case SymmetricStreamAlgorithm.VMPC:
keySize[0] = 0;
keySize[1] = 8;
keySize[2] = 6144;
break;
default:
error.setError("SSA03", "Unrecognized SymmetricStreamAlgorithm");
break;
Expand All @@ -164,7 +155,6 @@ internal static bool usesIV(SymmetricStreamAlgorithm algorithm, Error error)
case SymmetricStreamAlgorithm.SALSA20:
case SymmetricStreamAlgorithm.CHACHA20:
case SymmetricStreamAlgorithm.XSALSA20:
case SymmetricStreamAlgorithm.VMPC:
return true;
default:
error.setError("SSA04", "Unrecognized SymmetricStreamAlgorithm");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
<None Include="App.Release.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.5.1" />
<PackageReference Include="Microsoft.IdentityModel.Logging" Version="6.5.1" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.5.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.5.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
<NoWarn>CA1031</NoWarn>
<PackageId>GeneXus.SecurityApi.XmlSignature</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SecurityAPICommons\SecurityAPICommons.csproj" />
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Security" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
<PackageReference Include="System.Security.Cryptography.Cng" Version="4.7.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.3.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using SecurityAPITest.SecurityAPICommons.commons;
using SecurityAPITest.SecurityAPICommons.commons;
using NUnit.Framework;
using SecurityAPICommons.Config;
using SecurityAPICommons.Keys;
Expand Down Expand Up @@ -118,28 +118,6 @@ public void TestISAAC()
testBulkAlgorithms("ISAAC", key8192, "");
}

[Test]
public void TestVMPC()
{
// key 8 o 6144, nonce 1...6144 bits
testBulkAlgorithms("VMPC", key8, IV64);
testBulkAlgorithms("VMPC", key8, IV128);
testBulkAlgorithms("VMPC", key8, IV192);
testBulkAlgorithms("VMPC", key8, IV256);
testBulkAlgorithms("VMPC", key8, IV512);
testBulkAlgorithms("VMPC", key8, IV1024);
testBulkAlgorithms("VMPC", key8, IV6144);

testBulkAlgorithms("VMPC", key6144, IV64);
testBulkAlgorithms("VMPC", key6144, IV128);
testBulkAlgorithms("VMPC", key6144, IV192);
testBulkAlgorithms("VMPC", key6144, IV256);
testBulkAlgorithms("VMPC", key6144, IV512);
testBulkAlgorithms("VMPC", key6144, IV1024);
testBulkAlgorithms("VMPC", key6144, IV6144);

}

private void testBulkAlgorithms(string algorithm, string key, string IV)
{
for (int i = 0; i < encodings.Length; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
<None Update="dummycerts\RSA_sha256_2048\sha256e_cert.p12">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="dummycerts\RSA_sha256_2048\sha256_pubckey.pem">
<None Update="dummycerts\RSA_sha256_2048\sha256_pubkey.pem">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="dummycerts\RSA_sha256_2048\sha256_cert.crt">
Expand Down