【问题标题】:System.Security.Cryptography.BCryptHashAlgorithm. The specified cryptographic algorithm is not supported on this platformSystem.Security.Cryptography.BCryptHash算法。此平台不支持指定的加密算法
【发布时间】:2015-06-07 02:40:25
【问题描述】:

我已将 IdenTrust 的认证安装到我和客户的系统中。但是,只有我的可以正常运行。

我的本​​地计算机:Window 8、IIS 7.5、.Net v4
我们客户的系统:Windows server 2003、IIS 6、.NET v4。

认证:
版本:V3
签名算法:sha1RSA
签名有算法:sha1

问题:
1. MSDN 说以下操作系统支持该类:Window 7、Windows Vista SP1 或更高版本、Windows XP SP3、Windows Server 2008 (R2)。这是客户系统无法正常运行的问题吗?
2. 我客户的系统运行了很多产品,所以在不久的将来升级几乎是不可能的。有什么办法可以解决吗?

请给我一些建议。我对这方面了解不多。

这里是异常的详细信息。

2015-04-01 20:09:48,296 [5] INFO - TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Attempting to assign values from the properties file.
2015-04-01 20:09:48,296 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Calling method to retrieve private key.
2015-04-01 20:09:48,296 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Attempting to locate the private key.
2015-04-01 20:09:48,374 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Acquired private key...beginning direct authentication.
2015-04-01 20:09:48,390 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Beginning direct authentication...
2015-04-01 20:09:48,390 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Authenticator service instance created.
2015-04-01 20:09:48,390 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Calling service and requesting challenge...
2015-04-01 20:09:48,906 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Challenge received.
2015-04-01 20:09:48,906 [5] INFO - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Signing challenge...
2015-04-01 20:09:48,906 [5] ERROR - OTPAuthenticator :: directUserPKIAuth :: Failed to successfully create session.  Direct authentication failed.
The specified cryptographic algorithm is not supported on this platform.System.PlatformNotSupportedException: The specified cryptographic algorithm is not supported on this platform.
    at System.Security.Cryptography.BCryptHashAlgorithm..ctor(CngAlgorithm algorithm, String implementation)
    at System.Security.Cryptography.SHA1Cng..ctor()
    at TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator.directUserPKIAuth(String systemId, AsymmetricAlgorithm privateKey)
2015-04-01 20:09:48,921 [5] FATAL - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Exception encountered when attempting to authenticate.
Failed to successfully create session.  Direct authentication failed.  The specified cryptographic algorithm is not supported on this platform.System.PlatformNotSupportedException: The specified cryptographic algorithm is not supported on this platform.
    at System.Security.Cryptography.BCryptHashAlgorithm..ctor(CngAlgorithm algorithm, String implementation)
    at System.Security.Cryptography.SHA1Cng..ctor()
    at TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator.directUserPKIAuth(String systemId, AsymmetricAlgorithm privateKey)TwoFactorAuthentication.com.identrust.otp.authentication.Exceptions.ChallengeFailedException: Failed to successfully create session.  Direct authentication failed.  The specified cryptographic algorithm is not supported on this platform.System.PlatformNotSupportedException: The specified cryptographic algorithm is not supported on this platform.
    at System.Security.Cryptography.BCryptHashAlgorithm..ctor(CngAlgorithm algorithm, String implementation)
    at System.Security.Cryptography.SHA1Cng..ctor()
    at TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator.directUserPKIAuth(String systemId, AsymmetricAlgorithm privateKey)
    at TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator.directUserPKIAuth(String systemId, AsymmetricAlgorithm privateKey)
    at TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator.authenticateTwoFactorOTP(String uid, String pwd, String otp)
2015-04-01 20:09:48,921 [5] ERROR - OTPAuthenticator :: TwoFactorAuthentication.com.identrust.otp.authentication.OTPAuthenticator :: Overall result of two-factor authentication (OTP/Pwd):  FAILED.

非常感谢。

【问题讨论】:

    标签: algorithm digital-signature windows-server-2003 sha1


    【解决方案1】:

    Microsoft 在 Windows Vista 和 Windows Server 2008 中引入了一个名为 CNG (Cryptography API: Next Generation) 的新加密 API。

    您尝试使用的软件正在使用使用 CNG 实现的 .NET SHA1Cng 类。因此它不能在 Windows Server 2003 上运行。

    鉴于extended support ends for Windows Server 2003 于 2015 年 7 月 14 日发布,建议您计划升级您的操作系统,尤其是当您将其用于安全关键目的时。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-02
      • 2013-12-09
      • 2016-11-03
      • 1970-01-01
      • 2018-08-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多