Questions tagged [encryption-asymmetric]

A type of encryption which uses one key to encrypt a message and another to decrypt the message.

In asymmetric encryption, also referred as public-key cryptography, there are two related keys--a key pair. A public key is made freely available to anyone who might want to send you a message. A second, private key is kept secret, so that only you know it.

594 questions
7
votes
5 answers

Asymmetric Encryption

I have an exam tomorrow in Advanced Development, but I am stuck on the topic of Encryption. I have read up on it at http://support.microsoft.com/kb/246071. However I am still confused. If a message is encrypted using Asymmetric Encryption, using the…
ClarkeyBoy
  • 4,934
  • 12
  • 49
  • 64
7
votes
1 answer

"Bad Version of provider." while loading the Public key with RSACryptoServiceProvider

I am creating RSA key pair using AsymmetricKeyAlgorithmProvider (Windows.Security.Cryptography.Core) and exporting the keys as shown below: AsymmetricKeyAlgorithmProvider rsaGenKeys =…
tavier
  • 1,744
  • 4
  • 24
  • 53
7
votes
2 answers

Create .pem file for public key RSA encryption C# .net

I want to create .pem file for the public key generated by this method public static Tuple CreateKeyPair() { CspParameters cspParams = new CspParameters { ProviderType = 1 /* PROV_RSA_FULL */ }; …
7
votes
3 answers

RSA and AES encryption

I am looking at the feasibility for using Chrome apps for the front end of some applications I am working on. (As an aside, if anyone has any thoughts on this - put it in the comments) I would be using chrome.socket and would want the connections…
7
votes
4 answers

rsacryptoserviceprovider using x509 certificates c#

i am using a certificate generated by makecert which has both private and public key. The java side uses this public key to encrypt the data and .net decrypts it back. I am trying to decrypt Java's encrypted 64 bit encoded string and getting bad…
bkhanal
  • 1,400
  • 3
  • 16
  • 24
7
votes
2 answers

Questions about the NaCL crypto library

I was looking for libraries to implement an encryption system and was interested in using the NaCl: Networking and Cryptography library specifically the box function. Obviously, it uses symmetric encryption XSalsa20, Curve25519 for public-private…
6
votes
2 answers

IllegalBlockSizeException "null" in RSA decryption on Android

I'm currently working on an Android client of my encryption software, but I kept getting IllegalBlockSizeException, and e.getMessage() always returns null Here's the code I used to find the problem try { KeyPairGenerator generator =…
6
votes
2 answers

How to encrypt large file with RSA?

Code https://play.golang.org/p/CUEqjsJq5c Error: panic: crypto/rsa: message too long for RSA public key size goroutine 1 [running]: panic(0x4a6d80, 0xc420010420) /usr/local/go/src/runtime/panic.go:500 +0x1a1 main.main() /tmp/sample.go:28…
6
votes
0 answers

Android RSA key length

I would like to generate and store securely a 4096 bit RSA key pair on an Android device running API 18+ (4.3). The documentation states the AndroidKeyStore supports 4096 bit keys on API 18. However there is no method/way for setting the key length…
6
votes
2 answers

How to use ed25519 to encrypt/decrypt data?

Currently I am investigating https://github.com/orlp/ed25519 , and it has example for signing but how to use it for encrypting/decrypting data? Thanks
Mickey Shine
  • 12,187
  • 25
  • 96
  • 148
6
votes
2 answers

Opening an RSA private key from Ruby

I think I know how to create custom encrypted RSA keys, but how can I read one encrypted like ssh-keygen does? I know I can do this: OpenSSL::PKey::RSA.new(File.read('private_key')) But then OpenSSL asks me for the passphrase... How can I pass it…
Ivan
  • 97,549
  • 17
  • 50
  • 58
5
votes
1 answer

Should one use Cryptographic message syntax (CMS) for this task?

I've the task to transfer small binary messages (1 or 2 kb long) between a desktop application and mobile devices. The messages should be encrypted asymmetrically (RSA for instance). From what I've learned one should use a hybrid cryptosystem for…
5
votes
1 answer

Generate Public key from Private Key using WebCrypto API

I'm using Web Crypto API and am generating RSA Keypair using generateKey function. Because of some bugs in my code, I have deleted public key for some users. I'm wondering if there is any way to generate public key out of private key? I know that…
5
votes
3 answers

PHP RSA encryption using private key and PKCS1

I need to encrypt a string using RSA, PKCS1, a private key and PHP. I could not find even a terminal command which can be used with exec(). Does anyone knows how to do it? Thanks!
Udinesio
  • 61
  • 1
  • 1
  • 3
5
votes
4 answers

Storing public and private keys in a Database or keystore

I am making a web service that will store public and private keys for each record in a database table. The keys are made using Java, but I am unsure weather to create a keystore or place the keys inside fields in the databbase directly. What option…
jax
  • 37,735
  • 57
  • 182
  • 278