Import RSA key from bouncycastle sometimes throws “Bad Data”
问题 Sometimes, (frequently enough to be a serious problem between .NET and bouncy castle), a key generated by bouncycastle won't import into the dotnet RSA crypto provider. It only throws "Données Incorrectes" ; no more details. ("Bad data"). I cannot debug the problem since the guilty function implementation seems to be hidden in the CLR (Utils._ImportKey() ; reference source RSACryptoServiceProvider.cs:297). I tried changing the "provider" but without success. There is the same problem here..