加密(「保護」)Microsoft配置部分時,您會看到如下所示的XML。它遵循(至少部分)用於XML加密的W3規範。從TripleDES更改Microsoft Config文件加密方法
但是,在下面的XML中,您會看到EncryptedData部分下的EncryptionMethod是「tripledes-cbc」。我們希望能夠將其改爲更安全的替代方案,特別是上述W3規範中指定的AES。
在許多與微軟支持工程師的電話會議中,他們遠遠不瞭解問題,更不用說回答問題。有沒有辦法改變這種加密方法?
我之前忘記提到我們當前設置爲RsaProtectedConfigurationProvider,但只有密鑰似乎用RSA加密,而數據用3DES加密。
<MiscCryptoData configProtectionProvider="someConfigProtectionProvider">
<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyName>Rsa Key</KeyName>
</KeyInfo>
<CipherData>
<CipherValue>asf78ag78asg\...cryptoyadayada...asdf8r=</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
<CipherValue>zxcv6asdf35...largercryptoyadayada...u7i8o9p=</CipherValue>
</CipherData>
</EncryptedData>
</MiscCryptoData>
感謝您的回答。我查看了自定義提供程序,雖然我們可以做到這一點,但我們希望能夠在不使用自定義提供程序的情況下在配置文件中指定替代方案。在這一點上,我只想知道,如果我們使用標準提供程序,EncryptedData部分是否會超過tripledes-cbc。 – GaTechThomas 2011-01-26 01:25:19
.NET的默認安裝中只有兩個提供程序,RsaProtectedConfigurationProvider(您當前使用的那個)和DpapiProtectedConfigurationProvider。後者使用ProtectedData,可以是機器特定的或用戶特定的。 – sisve 2011-01-26 04:24:49