Uh oh!
There was an error while loading. Please reload this page.
Support ETM (Encrypt-then-MAC) variants for HMAC - #1316
Conversation
scott-xu
commented
Feb 12, 2024
Would you mind giving a try for this PR? |
Rob-Hague
commented
Feb 12, 2024
Nice. Testing should be straightforward: diff --git a/test/Renci.SshNet.IntegrationTests/HmacTests.cs b/test/Renci.SshNet.IntegrationTests/HmacTests.cs
index 993e5ec98..e5057248c 100644
--- a/test/Renci.SshNet.IntegrationTests/HmacTests.cs+++ b/test/Renci.SshNet.IntegrationTests/HmacTests.cs@@ -58,6 +58,24 @@ public void HmacSha2_512()
DoTest(MessageAuthenticationCodeAlgorithm.HmacSha2_512);
}
+ [TestMethod]+ public void HmacSha1Etm()+ {+ DoTest(MessageAuthenticationCodeAlgorithm.HmacSha1Etm);+ }++ [TestMethod]+ public void HmacSha2_256_Etm()+ {+ DoTest(MessageAuthenticationCodeAlgorithm.HmacSha2_256_Etm);+ }++ [TestMethod]+ public void HmacSha2_512_Etm()+ {+ DoTest(MessageAuthenticationCodeAlgorithm.HmacSha2_512_Etm);+ }+
private void DoTest(MessageAuthenticationCodeAlgorithm macAlgorithm)
{
_remoteSshdConfig.ClearMessageAuthenticationCodeAlgorithms() |
Uh oh!
There was an error while loading. Please reload this page.
scott-xu
commented
Feb 12, 2024
Do we want to support |
Rob-Hague
commented
Feb 13, 2024
I think we might as well, while we still have |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Rob-Hague
commented
Feb 13, 2024
Looks good to me otherwise |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…96_Etm Explicitly specify etm even if false
WojciechNagorski
commented
Feb 14, 2024
If it weren't a breaking change, I would approve it. I need some time to think it over and check it out. @Rob-Hague any idea? |
Rob-Hague
commented
Feb 14, 2024
Yes I think we should go with the bool property on HashInfo and change |
scott-xu
commented
Feb 14, 2024
Sorry I don't understand why you against The Shouldn't we focus on the implementation details of ETM? That's the main purpose of this PR. |
scott-xu
commented
Feb 14, 2024
-- @zybexXL |
Rob-Hague
commented
Feb 14, 2024
I think we've made it pretty clear that it's an unnecessary breaking change
Breaking HashInfo does not need to happen. It is much closer to the common API that people use. You said you had already gone in this direction in an earlier iteration. I've not seen any reason to stray from that.
I've checked the details. They look good. |
scott-xu
commented
Feb 14, 2024
I've already explained why I abandoned the first iteration. I don't think |
scott-xu
commented
Feb 16, 2024
To get the ball roll, someone has to compromise. Let me update the PR. |
Should fix#875 and fix#1050 and fix#837 and fix#1092
References:
Written by hand without testing by now.