Questions tagged [rsacryptoserviceprovider]

The RSACryptoServiceProvider object performs asymmetric encryption and decryption using the implementation of the RSA algorithm provided by the cryptographic service provider (CSP).

216 questions
1
vote
3 answers

The SYSTEM account cannot access the certificate store

Why the SYSTEM account is not able to access the user's certificate store? At the same time the SYSTEM account is able to read the certificate (through the CSP dll) from the smart card and put it in the certificate store (CSP is being used by…
user1090249
1
vote
1 answer

create RsaCryptoserviceProvider again

I'm working with RSACryptoServiceProvider and I looked at examples on some book and on the Internet. In all the examples, a new instance of the type is being created in every method it is being used. Is it not recommended to create only one…
timyrik20
  • 77
  • 2
  • 5
1
vote
1 answer

C# - Use a Third Parties Public Key To Encrypt Data Sent to Third Party

I have been given a task to encrypt data that will be stored in our database and sent to one of our customers. I figured the best way to do this is to use asymetric encryption so that once we have encrypted it with our customer's public key nobody…
idflyfish
  • 11
  • 2
1
vote
1 answer

Is there any way to register my own csp in iOS

I would like to create my own CSP (cryptographic service provider) with non standart cryptographic algorithms (like GOST etc) Is there any way for me to register it in ios, so the other applications may use my csp through standart ios security…
duck_ok
  • 61
  • 1
  • 5
1
vote
1 answer

how to access private key from eToken with jsp

It's my first time to here, so please forgive me at first time if I make mistake. I am new to RSA(Cryptography), My requirement is, accessing private key from eToken for decryption and store decrypted data in a file. I want to ask here that where to…
1
vote
0 answers

sign the message token using digital certificate private key (pxf file) in C#

Requirement: I am developing a service that calls an API which has a parameter named token. Token message needs to be signed using digital certificate .pfx file. The digital signature algorithm will be SHA256withRSA, then convert the signed token…
user1254261
  • 142
  • 2
  • 3
  • 12
1
vote
1 answer

How to decrypt an OpenPGP RSA Encrypted text file in C#?

I am hoping that this question can be met with some guidance for someone who is beginning to work with encryption/decryption in C#. There are existing examples on the web regarding this, but I am truthfully struggling to put it all into practice…
mherr
  • 348
  • 1
  • 7
  • 25
1
vote
0 answers

RSACryptoServiceProvider error

I encountered this error when I deployed the application in the production server, but in my local machine it is much working well.The error generates from this line (rsa.FromXmlString(xmlKey); in SignAndSecureData function). Anyone who encountered…
user335160
  • 1,364
  • 6
  • 32
  • 67
1
vote
1 answer

Move RSA Key Container from Server A to Server B

My project required key recovery features where the system admin can upload RSA Key container to restore it in the event for disaster recovery Current implementation is when admin upload the backup RSA Key container file, the app will move it to RSA…
1
vote
0 answers

Where to use RSAPKCS1KeyExchangeFormatter and RSACryptoServiceProvider?

We can encrypt AES key using RSAPKCS1KeyExchangeFormatter.CreateKeyExchange and RSACryptoServiceProvider.encrypt methods. Approach 1: RSAPKCS1KeyExchangeFormatter keyFormatter = new RSAPKCS1KeyExchangeFormatter(_publicKey); byte[] keyEncrypted =…
Boss
  • 445
  • 2
  • 8
  • 24
1
vote
1 answer

Bob and Alice asymmetric encryption and decryption implementation

I'm trying to build Bob and Alice asymmetric encryption and decryption implementation using RSACryptoServiceProvider for that I have console app Bob (can consider as the sender) console app Alice (can consider as the receiver) console app Bob can…
Kelum
  • 1,745
  • 5
  • 24
  • 45
1
vote
0 answers

The encrypted Web.config in ASP.NET MVC via aspnet_regiis.exe is throwing error

I am using aspnet_regiis.exe to encrypt my Web.config in ASP.NET MVC application. Following is the command which I have used for encryption: aspnet_regiis.exe -pef "appSettings" "Path" My Web.config appSettings section is encrypted…
1
vote
1 answer

Why is PublicKey.Key of CertificateRequest isn't in the same provider as the private key?

I create a certificate request using this: CertificateRequest req = new CertificateRequest( "cn=test", Key, HashAlgorithmName.SHA256, …
mshwf
  • 7,009
  • 12
  • 59
  • 133
1
vote
1 answer

Decrypt file using RSACryptoServiceProvider in powershell

I encrypted a file with a private key on a debian machine with the command : openssl rsautl -encrypt -inkey private.pem -in test.txt -out test.txt.ssl I also converted my public key from pem to xml with the python script here :…
Rig0L
  • 35
  • 1
  • 5
1
vote
1 answer

Unable to decrypt connection string using RSA private key in .Net Core

I was able to encrypt the connection string using RSA public key with Encoding.UTF8 and RSACryptoServiceProvider(). But while I tried to decrpyt it I am facing "System.InvalidOperationException: There is an error in XML document (1, 2). --->…
Onera
  • 687
  • 3
  • 14
  • 34