All Questions
17 questions
2
votes
1
answer
8k
views
Encryption in Java with RSA/ECB/OAEPWithSHA-256AndMGF1Padding could not be decrypted in .NET
We have a requirement where in Java does the encryption and .NET does the decryption. The issue is with Asymmetric decryption in .NET, the algorithm, mode and padding used in Java while encryption is "...
0
votes
0
answers
178
views
PyCrypto Signature Verfication failing with other languages
I have been trying to do signature generation to send the encrypted message to server. But server is not able to verify the signature. Similarly, I am not able to verify the signature sent by server.
...
0
votes
1
answer
1k
views
RSACryptoServiceProvider decrypting with ECB and MGF1 padding
I'm using RSACryptoServiceProvider from System.Security.Cryptography package. I need to decrypt some input coming from Android application using my private key. It's encrypting it in Java code with ...
2
votes
1
answer
3k
views
.net RSA sign data error with PSS padding
I have a question re. the use of Crypto in .net as follows. I have a .pem file which I am able to parse to a private key and would like to sign some data bytes. The code I'm using is below:
byte[] ...
0
votes
0
answers
1k
views
RSACryptoServiceProvider.EncryptValue returns NotSupportedException
I have a .NET 4.5 MVC application and I'm trying to user RSACryptoServiceProvider to encrypt some messages. However, when I try to use EncryptValue() I get a NotSupportedException. This is my code:
...
2
votes
1
answer
3k
views
.NET RSACryptoServiceProvider encrypt with 4096 private key, how to decrypt it on Android
I am encrypting the message in .NET with RSACryptoServiceProvider with private key. (PKCS#1 v1.5)
When I try to decrypt in .NET with the following code that uses public key everything works fine:
...
1
vote
1
answer
1k
views
Import RSACryptoServiceProvider without persistence
According to this answer - every time an RSACryptoServiceProvider is created it is persisted unless explicitly told not to.
What about ImportCspBlob? I have a private key as a byte[], So I use:
...
2
votes
1
answer
1k
views
Why does RSACryptoServiceProvider.VerifyHash have a “hash algorithm identifier” parameter?
Since RSACryptoServiceProvider.VerifyHash verifies an already hashed message - why does it need to know which hash algorithm was used?
When asking about the SignHash method , it was suggested that ...
1
vote
1
answer
766
views
Why does RSACryptoServiceProvider.SignHash have a "hash algorithm identifier" parameter? [duplicate]
Since RSACryptoServiceProvider.SignHash signs an already hashed message - why does it need to know which hash algorithm was used?
1
vote
0
answers
438
views
Thread safety and RSACryptoServiceProvider returned by X509Certificate2.PublicKey
RSACryptoServiceProvider is documented as potentially not thread safe. Unfortunately, it uses internal call for EncryptKey so I can not analyse the code to verify it. So is it known whether it is ...
3
votes
0
answers
761
views
Decrypting the signature created by RSACryptoServiceProvider.SignData() to get the hash
I'm trying to retrieve the hash created with the RSACryptoServiceProvider class' SignData and SignHash methods. I need this to be able to store encrypted hashes that must be retrieved later because ...
8
votes
3
answers
340
views
.Net: Will my RSA keys still function after August 2012?
I just read this article RSA keys under 1024 bits are blocked, and in my .NET software I make extensive use of 384bit keys. Will my program still be able to generate/store/read keys from the ...
3
votes
2
answers
5k
views
RSACryptoServiceProvider(RSACryptoServiceProvider) constructor crashing in .NET 3.5 for certain key names
If you look at the code below it is doing nothing but creating a new instance of an RSACryptoServiceProvider.
The key container name is initialized from a property that creates a name based on various ...
3
votes
2
answers
2k
views
PyCrypto Sign Message and Verify Signature in .NET RSACryptoServiceProvider
I'm trying to create a signature verification system that uses my website which runs on the Google API with PyCrypto Engine.
The program that generates signature is quite simple:
from Crypto....
13
votes
1
answer
4k
views
Why is RSACryptoServiceProvider.Encrypt() output not stable?
Until today I was living under the impression that RSA encryption using RSA is deterministic. After all, how should signature verification work if it wasn't?
To my big suprise, .NETs ...
36
votes
3
answers
43k
views
Best way to initiate RSACryptoServiceProvider from x509Certificate2?
What is the best way to initate a new RSACryptoServiceProvider object from an X509Certificate2 I pulled out of a key store? The certificate is associated with both public (for encryption) and private (...
8
votes
2
answers
4k
views
Attempt to set permissions on a KeyContainer in C# is having no effect
I'm using the following code in an attempt to programatically allow the NetworkService account to have access to a key:
var RSA = new RSACryptoServiceProvider(
new CspParameters() {
...