Skip to content

Commit a27d80a

Browse files
committed
time channeling attacks are a real thing LOL, delete the garbage. Contribute to RustCrypto more by looking through source :)
1 parent d61d427 commit a27d80a

20 files changed

Lines changed: 71 additions & 211 deletions

cas-dotnet-sdk/Asymmetric/RSAWrapper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using CasDotnetSdk.Asymmetric.Linux;
22
using CasDotnetSdk.Asymmetric.Types;
33
using CasDotnetSdk.Asymmetric.Windows;
4-
using CasDotnetSdk.Fodies;
4+
55
using CasDotnetSdk.Helpers;
66
using CASHelpers;
77
using System;
@@ -27,7 +27,7 @@ public RSAWrapper()
2727
/// <returns></returns>
2828
/// <exception cref="Exception"></exception>
2929
///
30-
[BenchmarkSender]
30+
3131
public byte[] Sign(string privateKey, byte[] dataToSign)
3232
{
3333
if (!RSAValidator.ValidateRsaPemKey(privateKey))
@@ -61,7 +61,7 @@ public byte[] Sign(string privateKey, byte[] dataToSign)
6161
/// <returns></returns>
6262
/// <exception cref="Exception"></exception>
6363
///
64-
[BenchmarkSender]
64+
6565
public bool Verify(string publicKey, byte[] dataToVerify, byte[] signature)
6666
{
6767
if (!RSAValidator.ValidateRsaPemKey(publicKey))
@@ -91,7 +91,7 @@ public bool Verify(string publicKey, byte[] dataToVerify, byte[] signature)
9191
/// <param name="keySize"></param>
9292
/// <returns></returns>
9393
/// <exception cref="Exception"></exception>
94-
[BenchmarkSender]
94+
9595
public RsaKeyPairResult GetKeyPair(int keySize)
9696
{
9797
if (keySize != 1024 && keySize != 2048 && keySize != 4096)

cas-dotnet-sdk/CASConfiguration.cs

Lines changed: 0 additions & 80 deletions
This file was deleted.

cas-dotnet-sdk/Compression/ZSTDWrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using CasDotnetSdk.Compression.Linux;
22
using CasDotnetSdk.Compression.Types;
33
using CasDotnetSdk.Compression.Windows;
4-
using CasDotnetSdk.Fodies;
4+
55
using CasDotnetSdk.Helpers;
66
using System;
77
using System.Runtime.InteropServices;
@@ -24,7 +24,7 @@ public ZSTDWrapper()
2424
/// <param name="level"></param>
2525
/// <returns></returns>
2626
///
27-
[BenchmarkSender]
27+
2828
public byte[] Compress(byte[] data, int level)
2929
{
3030
if (data == null || data.Length == 0)
@@ -55,7 +55,7 @@ public byte[] Compress(byte[] data, int level)
5555
/// <param name="data"></param>
5656
/// <returns></returns>
5757
///
58-
[BenchmarkSender]
58+
5959
public byte[] Decompress(byte[] data)
6060
{
6161
if (data == null || data.Length == 0)

cas-dotnet-sdk/DigitalSignature/SHA256DigitalSignatureWrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using CasDotnetSdk.DigitalSignature.Linux;
22
using CasDotnetSdk.DigitalSignature.Types;
33
using CasDotnetSdk.DigitalSignature.Windows;
4-
using CasDotnetSdk.Fodies;
4+
55
using CasDotnetSdk.Helpers;
66
using CASHelpers;
77
using System;
@@ -26,7 +26,7 @@ public SHA256DigitalSignatureWrapper()
2626
/// <returns></returns>
2727
/// <exception cref="Exception"></exception>
2828
///
29-
[BenchmarkSender]
29+
3030
public SHARSADigitalSignatureResult CreateRsa(int rsaKeySize, byte[] dataToSign)
3131
{
3232
if (rsaKeySize != 1024 && rsaKeySize != 2048 && rsaKeySize != 4096)
@@ -67,7 +67,7 @@ public SHARSADigitalSignatureResult CreateRsa(int rsaKeySize, byte[] dataToSign)
6767
/// <returns></returns>
6868
/// <exception cref="Exception"></exception>
6969
///
70-
[BenchmarkSender]
70+
7171

7272
public bool VerifyRsa(string publicKey, byte[] dataToVerify, byte[] signature)
7373
{

cas-dotnet-sdk/DigitalSignature/SHA512DigitalSignatureWrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using CasDotnetSdk.DigitalSignature.Linux;
22
using CasDotnetSdk.DigitalSignature.Types;
33
using CasDotnetSdk.DigitalSignature.Windows;
4-
using CasDotnetSdk.Fodies;
4+
55
using CasDotnetSdk.Helpers;
66
using CASHelpers;
77
using System;
@@ -28,7 +28,7 @@ public SHA512DigitalSignatureWrapper()
2828
/// <returns></returns>
2929
/// <exception cref="Exception"></exception>
3030
///
31-
[BenchmarkSender]
31+
3232
public SHARSADigitalSignatureResult CreateRsa(int rsaKeySize, byte[] dataToSign)
3333
{
3434
if (rsaKeySize != 1024 && rsaKeySize != 2048 && rsaKeySize != 4096)
@@ -69,7 +69,7 @@ public SHARSADigitalSignatureResult CreateRsa(int rsaKeySize, byte[] dataToSign)
6969
/// <returns></returns>
7070
/// <exception cref="Exception"></exception>
7171
///
72-
[BenchmarkSender]
72+
7373
public bool VerifyRsa(string publicKey, byte[] dataToVerify, byte[] signature)
7474
{
7575
if (!RSAValidator.ValidateRsaPemKey(publicKey))

cas-dotnet-sdk/Fodies/BenchmarkSenderAttribute.cs

Lines changed: 0 additions & 52 deletions
This file was deleted.

cas-dotnet-sdk/FodyWeavers.xml

Lines changed: 0 additions & 3 deletions
This file was deleted.

cas-dotnet-sdk/Hashers/Blake2Wrapper.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CasDotnetSdk.Fodies;
1+

22
using CasDotnetSdk.Hashers.Linux;
33
using CasDotnetSdk.Hashers.Types;
44
using CasDotnetSdk.Hashers.Windows;
@@ -26,7 +26,7 @@ public Blake2Wrapper()
2626
/// <returns></returns>
2727
/// <exception cref="Exception"></exception>
2828
///
29-
[BenchmarkSender]
29+
3030
public byte[] Hash512(byte[] toHash)
3131
{
3232
if (toHash == null || toHash.Length == 0)
@@ -55,7 +55,7 @@ public byte[] Hash512(byte[] toHash)
5555
/// <returns></returns>
5656
/// <exception cref="Exception"></exception>
5757
///
58-
[BenchmarkSender]
58+
5959
public bool Verify512(byte[] hashedData, byte[] toCompare)
6060
{
6161
if (hashedData == null || hashedData.Length == 0)
@@ -83,7 +83,7 @@ public bool Verify512(byte[] hashedData, byte[] toCompare)
8383
/// <returns></returns>
8484
/// <exception cref="Exception"></exception>
8585
///
86-
[BenchmarkSender]
86+
8787
public byte[] Hash256(byte[] toHash)
8888
{
8989
if (toHash == null || toHash.Length == 0)
@@ -110,7 +110,7 @@ public byte[] Hash256(byte[] toHash)
110110
/// <returns></returns>
111111
/// <exception cref="Exception"></exception>
112112
///
113-
[BenchmarkSender]
113+
114114
public bool Verify256(byte[] hashedData, byte[] toCompare)
115115
{
116116
if (hashedData == null || hashedData.Length == 0)

cas-dotnet-sdk/Hashers/HmacWrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CasDotnetSdk.Fodies;
1+

22
using CasDotnetSdk.Hashers.Linux;
33
using CasDotnetSdk.Hashers.Types;
44
using CasDotnetSdk.Hashers.Windows;
@@ -28,7 +28,7 @@ public HmacWrapper()
2828
/// <returns></returns>
2929
/// <exception cref="Exception"></exception>
3030
///
31-
[BenchmarkSender]
31+
3232
public byte[] HmacSignBytes(byte[] key, byte[] message)
3333
{
3434
if (key == null || key.Length == 0)
@@ -60,7 +60,7 @@ public byte[] HmacSignBytes(byte[] key, byte[] message)
6060
/// <returns></returns>
6161
/// <exception cref="Exception"></exception>
6262
///
63-
[BenchmarkSender]
63+
6464
public bool HmacVerifyBytes(byte[] key, byte[] message, byte[] signature)
6565
{
6666
if (key == null || key.Length == 0)

cas-dotnet-sdk/Hashers/SHAWrapper.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CasDotnetSdk.Fodies;
1+

22
using CasDotnetSdk.Hashers.Linux;
33
using CasDotnetSdk.Hashers.Types;
44
using CasDotnetSdk.Hashers.Windows;
@@ -25,7 +25,7 @@ public SHAWrapper()
2525
/// <returns></returns>
2626
/// <exception cref="Exception"></exception>
2727
///
28-
[BenchmarkSender]
28+
2929
public byte[] Hash512(byte[] dataToHash)
3030
{
3131
if (dataToHash == null)
@@ -55,7 +55,7 @@ public byte[] Hash512(byte[] dataToHash)
5555
/// <returns></returns>
5656
/// <exception cref="Exception"></exception>
5757
///
58-
[BenchmarkSender]
58+
5959
public byte[] Hash256(byte[] dataToHash)
6060
{
6161
if (dataToHash == null)
@@ -86,7 +86,7 @@ public byte[] Hash256(byte[] dataToHash)
8686
/// <returns></returns>
8787
/// <exception cref="Exception"></exception>
8888
///
89-
[BenchmarkSender]
89+
9090
public bool Verify512(byte[] dataToVerify, byte[] hashedData)
9191
{
9292
if (dataToVerify == null || dataToVerify.Length == 0)
@@ -114,7 +114,7 @@ public bool Verify512(byte[] dataToVerify, byte[] hashedData)
114114
/// <returns></returns>
115115
/// <exception cref="Exception"></exception>
116116
///
117-
[BenchmarkSender]
117+
118118
public bool Verify256(byte[] dataToVerify, byte[] hashedData)
119119
{
120120
if (dataToVerify == null || dataToVerify.Length == 0)

0 commit comments

Comments
 (0)