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
20
votes
2 answers

Bouncy Castle PGP Decryption Issue

I've had a application using Bouncy Castle for PGP decryption which has run without any issues for the past 8 months or so, and the past 2 days all of a sudden an issue has come up where the GetDataStream method is throwing an exception: Exception…
mservidio
  • 12,817
  • 9
  • 58
  • 84
18
votes
1 answer

HTTPS uses Asymmetric or Symmetric encryption?

I have searched all this morning but I've found websites where it is said that data is sent through an asymmetric encryption using the TLS protocol Then I found the contrary Please can you tell me which is true? Thanks And does anyone know a guide…
18
votes
2 answers

Public key encryption with RSACryptoServiceProvider

I have been over an article at CodeProject a for a while that explains how to encrypt and decrypt using the RSA provider: RSA Private Key Encryption While the old version from 2009 was buggy, the new 2012 version (with System.Numerics.BigInteger…
John
  • 3,591
  • 8
  • 44
  • 72
17
votes
3 answers

how do I encrypt data in R?

I am adding a sentry handler to the R logging package. currently django-sentry validates the client (the application sending log records) based on a shared key which travels in clear text in a secured channel. I was wondering if it was possible to…
mariotomo
  • 9,438
  • 8
  • 47
  • 66
16
votes
1 answer

Are KeyStore entries lost when the application is uninstalled?

I am generating an Asymmetric key pair in the Android key store as below: I have used the public key for symmetric key wrapping and storing the wrapped key to a file. When I try to unwrap symmetric key using the private key, I am able to do so…
Hithendra Nath
  • 173
  • 2
  • 10
16
votes
2 answers

Any tutorials on public key encryption in java?

I've been able find information on symmetric encryption and hashing but I've been having quite a bit of trouble finding much information on any sort of public key encryption for java. What I'd like to do is make a very simple proof of concept…
Eugene M
  • 47,557
  • 14
  • 38
  • 44
16
votes
7 answers

What is the performance difference of pki to symmetric encryption?

We are looking to do some heavy security requirements on our project, and we need to do a lot of encryption that is highly performant. I think that I know that PKI is much slower and more complex than symmetric encryption, but I can't find the…
15
votes
2 answers

Encryption between desktop app and server - C# to PHP

I have an app which is designed in C#. In simple terms the app sends data and image to my web server which takes all the $_POST data and processes it. I will confess i do not understand how the security end of things work. I will employ someone with…
user1547410
  • 863
  • 7
  • 27
  • 58
14
votes
3 answers

How can I encrypt with a RSA private key in python?

Is it possible to encrypt a message with a private key in python using pycryptodome or any other library? I know that you are not supposed to encrypt with the private key and decrypt with the public key, but my purpose is to encrypt with the private…
14
votes
1 answer

How to encrypt and decrypt plain text with a RSA keys in Go?

I am trying to write a utility program which encrypts and decrypts plain text files using a RSA key pair. The RSA keys were generated with ssh-keygen and are stored in .ssh, as usual. I am having trouble understanding how to do that with the Go…
Kiril
  • 2,091
  • 7
  • 33
  • 43
13
votes
1 answer

ASP.NET Core 3.1 JWT signature invalid when using AddJwtBearer()

Problem: AddJwtBearer() is failing, but verifying the token manually works. I'm trying to generate and verify a JWT with an asymmetric RSA algo. I can generate the JWT just fine using this demo…
Millard
  • 436
  • 5
  • 11
13
votes
3 answers

C/C++ encrypt/decrypt with public key

I'm looking for two functions conceptually similar to these: // returns the encrypted text string encrypt( string public_key, string pass_phrase, string text ); // returns the original text string decrypt( string private_key, string pass_phrase,…
peoro
  • 25,562
  • 20
  • 98
  • 150
13
votes
3 answers

Java asymmetric encryption: preferred way to store public/private keys

This code generates a pair of public/private keys: KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); keyGen.initialize(1024); KeyPair keypair = keyGen.genKeyPair(); PrivateKey privateKey = keypair.getPrivate(); PublicKey publicKey =…
Guido
  • 46,642
  • 28
  • 120
  • 174
12
votes
3 answers

Deterministic RSA encryption in Java

This is my first question on this site, and I only have a basic mathematical understanding of RSA, so please bear with me! :) I'm writing a Java web application for my final year project at university. It's a web-based implementation of…
Chris B
  • 709
  • 2
  • 14
  • 32
11
votes
3 answers

EncryptedXml DecryptDocument method error after .Net framework update

I have an old function written in 2013 that decrypt xml that was encrypted by another program. The code is realy simple public static void Decrypt(XmlDocument Doc) { // Check the arguments. if (Doc == null) …
1
2
3
39 40