加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

.net – 从TripleDES更改Microsoft配置文件加密方法

发布时间:2020-12-13 20:39:57 所属栏目:Windows 来源:网络整理
导读:加密(“保护”)Microsoft配置部分时,您会看到类似于下面的XML的内容.它遵循(至少部分)XML加密的W3规范. 但是,在下面的XML中,您将看到EncryptedData部分下的EncryptionMethod是“tripledes-cbc”.我们希望能够将其更改为更安全的替代方案,特别是AES,这也是前
加密(“保护”)Microsoft配置部分时,您会看到类似于下面的XML的内容.它遵循(至少部分)XML加密的W3规范.

但是,在下面的XML中,您将看到EncryptedData部分下的EncryptionMethod是“tripledes-cbc”.我们希望能够将其更改为更安全的替代方案,特别是AES,这也是前面提到的W3规范中规定的.

在与微软支持工程师的许多电话会议中,他们无法理解这个问题,更不用说回答它了.有没有办法改变这种加密方法?

我之前忘了提到我们当前设置为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>
我刚刚用反射器检查了 RsaProtectedConfigurationProvider,我发现没有什么可以做的,可以将tripledes-cbc更改为其他任何东西.

因此,如果要使用AES加密,则必须编写自己的ProtectedConfigurationProvider.您可能希望使用Reflector为您提供良好的开端.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读