We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94d66bc commit 8d4852aCopy full SHA for 8d4852a
README.md
@@ -56,4 +56,13 @@ using (RSACryptoServiceProvider clientRSA = new RSACryptoServiceProvider())
56
byte[] key1 = serverDiffie.GetVerifiedSharedPart(clientPublic);
57
byte[] key2 = clientDiffie.GetVerifiedSharedPart(serverPublic);
58
}
59
+```
60
+### Timing Side Channel Attack Prevention
61
+```csharp
62
+byte[] array1 = new byte[120];
63
+byte[] array2 = new byte[120];
64
+array[50] = 67;
65
+
66
+// This comparison will take constant time, no matter where the diff is (if any).
67
+bool equal = ComparisonUtils.ConstTimeArrayEqual(array1, array2);
68
```
0 commit comments