Hybrid cryptosystem implementation in .net. Error Specified key is not a valid size for this algorithm

后端 未结 1 1315
死守一世寂寞
死守一世寂寞 2020-12-22 09:39

I am trying to implement hybrid cryptosystem as mentioned in https://en.wikipedia.org/wiki/Hybrid_cryptosystem

At the moment I have implemented following algorithm

相关标签:
1条回答
  • 2020-12-22 09:59

    You are trying to encrypt using the (insecure) DES algorithm with an RSA public key. That's always going to fail, DESCryptoServiceProvider doesn't accept RSA keys. You'd need an RSACryptoServiceProvider for that.

    You may want to consider using a specific library that already implements hybrid cryptography (PGP, CMS or one of the proprietary protocols). The way you are going at it your solution may run in the end, but it will not be secure.

    0 讨论(0)
提交回复
热议问题