The RSACryptoServiceProvider object performs asymmetric encryption and decryption using the implementation of the RSA algorithm provided by the cryptographic service provider (CSP).
Questions tagged [rsacryptoserviceprovider]
216 questions
0
votes
1 answer
How to validate public key xml file?
I have created a public key using RSACryptoServiceProvider in c#.
Later in my program I want to store it's content in database. How can I make sure that the file is a true public key.
Note: I have checked it's structure against xsd. but I need…
0
votes
0 answers
Public key decyption using RSACryptoServiceProvider
is there a way to DECRYPT data using the public key that is get from the RSACryptoServiceProvider, via its ToXmlString(false) method?
If i ran the code below, i get an "Error occured while decoding OAEP padding."
If i use the private key for…

KiLa
- 133
- 2
- 7
0
votes
1 answer
Get public and private key of an encrypted app.config
I have written a program to encrypt and decrypt appdata in an app.config file. The program is working correctly so I could encrypt app.config like this

Nayana Priyankara
- 1,392
- 1
- 18
- 26
0
votes
0 answers
implementing the 1 out of 2 oblivious transfer protocol in c#
Implementation of 1-2 oblivious transfer protocol for RSA requires a calculation of
]1
(source: rogercortesi.com)
and
(source: rogercortesi.com)
, then the results would be byte[] arrays. How would one perform the addition and the modulo…

Cobe
- 161
- 15
0
votes
0 answers
RSA Crypto Service Container Private Key goes out of sync
In a client/server model
We have a RSACryptoServiceProvider key created using a well known "container name" at the startup code, and set a rule on it to Allow Generic Read, and persist the public key into a database. The clients connecting to the…

kernelman
- 41
- 2
- 15
0
votes
0 answers
ASP app cannot open RSA key container (NTE_BAD_KEYSET error)
Having difficulty making CryptAcquireContext work for a .NET app. I've created the key, but it's throwing error NTE_BAD_KEYSET.
The documentation suggests that the trouble is with permissions, but I'm not quite sure who to give permission to. So far…

christok
- 1,087
- 2
- 12
- 29
0
votes
1 answer
RSA KEY Encryption/Decryption Problem
I tried
C:\dev>aspnet_regiis -pc "NetFrameworkConfigurationKey" -exp
Creating RSA Key container...
The RSA key container could not be opened.
Failed!
and
C:\dev>aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"
Adding ACL for…

BKarms
- 61
- 1
- 1
- 2
0
votes
2 answers
Window CryptoAPI: Can I choose the public exponent when generating an RSA key pair?
Using the Windows CryptoAPI, is there any way to specify which public exponent to use when generating a new key-pair (ie. 3 instead of 65537)?
As a bonus question: how would I access this functionality using .NET RSACryptoServiceProvider?
EDIT: My…

Rasmus Faber
- 48,631
- 24
- 141
- 189
0
votes
1 answer
RSACryptoServiceProvider SignHash equivalent in php / openssl?
my understanding is openssl_sign does the same as RSACryptoServiceProvider.SignData
is there a openssl (or php) command the does the same as RSACryptoServiceProvider.SignHash?

davidkierz
- 13
- 4
0
votes
1 answer
Can the data at UseMachineKeyStore be backed up and recovered?
I have the following code:
const int PROVIDER_RSA_FULL = 1;
const string CONTAINER_NAME = "Example";
CspParameters cspParams;
cspParams = new CspParameters(PROVIDER_RSA_FULL);
cspParams.KeyContainerName = CONTAINER_NAME;
cspParams.Flags =…

Christopher Done
- 5,886
- 4
- 35
- 38
0
votes
1 answer
Problems to import RSA key in other computer
I am creating a little tool for encrypt and decrypt using a pair keys (public and private keys).
I export public and private key on my computer and I can encrypt and decrypt files without problems. I have problem when I try decrypt files in other…

Virkof
- 1
0
votes
1 answer
Issue validating ASHWID (HardwareToken) in the cloud
I'm trying to validate HardwareToken issued by HardwareIdentification.GetPackageSpecificToken with an azure (.net 4.5) service. I followed the official guidance. But i'm stuck in the very last checking. I can't figure why the signature checking is…

Cyprien Autexier
- 1,948
- 16
- 20
0
votes
2 answers
Public key extraction from a certificate in C#
How to get private key from a x509 v.3 certificate and store it in a RSACryptoServiceProvider class?

test_user
- 11
- 7
0
votes
1 answer
Veryifying RSA signature using openssl_public_decrypt failing for .NET signed string
I am attempting to use X509Certificate2 and RSACryptoServiceProvider together with PHP OpenSSL commands to implement two-way mutual security.
It all seems to be fine sending a message from PHP to C#, RSACryptoServiceProvider on the .NET server can…

theringostarrs
- 11,940
- 14
- 50
- 63
0
votes
1 answer
How to load file privakey file types is pem
I load private (private.pem)
my code is:
FileReader fileReader = new FileReader(new File(private.pem));
PEMReader r = new PEMReader(fileReader, new DefaultPasswordFinder("mypass".toCharArray()));
try {
KeyPair kp = (KeyPair)…

cldo
- 1,735
- 6
- 21
- 26