Hello Lukas Pokorny,
I tried to collect Verbose logs from both Web Application and WCF service (under FIPS mode ON ) and by the logs I get why it was working via WCF service.
Under WCF Service -
CryptoHelper.UseFipsAlgorithmsOnly has value "false" and the logs are like -
2021-06-09 19:49:58.613 Opening log file.
2021-06-09 19:49:58.613 INFO FileLogWriter(1)[19] Info: Assembly: Rebex.Common 2020 R5 for .NET 4.6-4.8
2021-06-09 19:49:58.613 INFO FileLogWriter(1)[19] Info: Platform: Windows 6.2.9200 64-bit; CLR: 4.0.30319.42000
2021-06-09 19:49:58.613 DEBUG FileLogWriter(1)[19] Info: Culture: en; Windows-1252
2021-06-09 19:49:58.629 INFO Ssh(1)[19] Info: Connecting to XXXX:5022 using Ssh.
2021-06-09 19:49:58.645 INFO Ssh(1)[19] Info: Assembly: Rebex.SshShell 2020 R5 for .NET 4.6-4.8
2021-06-09 19:49:58.645 INFO Ssh(1)[19] Info: Platform: Windows 6.2.9200 64-bit; CLR: 4.0.30319.42000
2021-06-09 19:49:58.645 DEBUG Ssh(1)[19] Info: Culture: en; Windows-1252
2021-06-09 19:49:58.660 DEBUG Ssh(1)[19] Proxy: Connecting to XXXX :5022 (no proxy).
2021-06-09 19:49:58.660 DEBUG Ssh(1)[19] Proxy: Connection established.
2021-06-09 19:49:58.676 VERBOSE Ssh(1)[19] SSH: Sending data:
-- Later it connects to SSH server successfully as it does not use fips ------
Under WebApp-
CryptoHelper.UseFipsAlgorithmsOnly has value "true" and I can clearly see this in Verbose logs as well.
2021-06-09 22:05:32.833 Opening log file.
2021-06-09 22:05:32.833 INFO FileLogWriter(1)[28] Info: Assembly: Rebex.Common 2020 R5 for .NET 4.6-4.8
2021-06-09 22:05:32.833 INFO FileLogWriter(1)[28] Info: Platform: Windows 10.0.14393 32-bit (FIPS-only); CLR: 4.0.30319.42000
2021-06-09 22:05:32.833 DEBUG FileLogWriter(1)[28] Info: Culture: en; Windows-1252
2021-06-09 22:05:32.848 INFO Ssh(1)[28] Info: Connecting to XXXX:5022 using Ssh.
2021-06-09 22:05:32.848 INFO Ssh(1)[28] Info: Assembly: Rebex.SshShell 2020 R5 for .NET 4.6-4.8
2021-06-09 22:05:32.848 INFO Ssh(1)[28] Info: Platform: Windows 10.0.14393 32-bit (FIPS-only); CLR: 4.0.30319.42000
2021-06-09 22:05:32.848 DEBUG Ssh(1)[28] Info: Culture: en; Windows-1252
2021-06-09 22:05:32.864 DEBUG Ssh(1)[28] Proxy: Connecting to XXXX:5022 (no proxy).
2021-06-09 22:05:32.864 DEBUG Ssh(1)[28] Proxy: Connection established.
2021-06-09 22:05:32.880 VERBOSE Ssh(1)[28] SSH: Sending data:
---- Later it failed with no common encryption algorithm ----
Now the questions are -
1.Why CryptoHelper.UseFipsAlgorithmsOnly is not set to true ( as it derives value from Windows FIPS mode which is ON ) in WCF service but in WebApp ?
2. As per this (
https://csrc.nist.gov/csrc/media/projects/cryptographic-module-validation-program/documents/security-policies/140sp2356.pdf ) PDF doc AES in CTR mode is FIPS compliant then why Rebex component is not allowing it under FIPS ?
Environment details - Win server 2016, .NET framework 4.8
Thank you in advance for your help !