如何在c#中使用密钥大小小于384位的RSA?

时间:2015-04-10 12:54:55

标签: c# cryptography rsa

对于性能测试问题,我需要使用RSA,密钥大小范围为64位~2048位 我在c#中使用了RSACryptoServiceProvider类,但它说最小密钥大小是384位 我知道这是由于安全问题,但有一种方法可以使用上面的Key Sizes Ranges ..

这是我正在使用的简单代码

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;

namespace RSA
{
    class RSA_CryptoSystem
    {
        static public RSAParameters Get_RSA_Paramters(int Key_Length)
        {
            RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(Key_Length);
            return RSA.ExportParameters(true);
        }
    }
}   

0 个答案:

没有答案