Questions tagged [public-key-encryption]

An cryptographic scheme which uses two mathematically related keys; a public and a private key where a message encrypted with public key can only be decrypted with the private key and vice-versa.

The most important element of public key encryption is that the public and private keys are related in such a way that only the public key can be used to encrypt a message and only the matching private key can be used to decrypt it. In addition, it is practically impossible to derive the private key with only the knowledge of the public key. Public-key systems such as PGP, SSL and many others benefit from this mathematically well-defined behavior of public key encryption. It is important to note that public key encryption is mostly called asymmetric encryption because it uses two keys instead of one key as opposed to symmetric encryption.

1918 questions
0
votes
1 answer

Is there any encryption mechanism in Angular 6 that will give the same encrypted output everytime?

I am trying to register a customer with his mobile number. I am storing the mobile number as encrypted mobile number and also I am maintaining a session to store this encrypted mobile number. Once I come out of the application and try to log in with…
Prathish
  • 61
  • 3
  • 10
0
votes
1 answer

Client side public key encryption

We are building a mobile app that has the following functions Capture user information (text, audio) while not connected to the internet Store the information on the device, encrypted using a server-side public key When internet connectivity is…
ubi
  • 4,041
  • 3
  • 33
  • 50
0
votes
1 answer

Encryption error after upgrading mule from 3.8 to 3.9

Have anyone got below error, Please help. java.lang.RuntimeException: org.mule.security.encryption.MuleEncryptionException: Could not encrypt the data This never got while using mule version 3.8, but started getting after upgrading to mule 3.9.
0
votes
2 answers

How to test/debug Decrypting Encrypted Assertion using OpenSAML 2 and Java?

I am trying to write a Java app together with OpenSAML2 (2.6.6) to decrypt an encrypted assertion, but I am getting: [main] ERROR org.opensaml.xml.encryption.Decrypter - Failed to decrypt EncryptedKey, valid decryption key could not be…
user555303
  • 1,146
  • 3
  • 20
  • 44
0
votes
1 answer

Why does SSL architecture have two distinct functions?

On a high level, it seems to me that SSL has two distinct functions: To bind a domain name to a specific organization To send out a public key for encryption These functions seem very different to me. What is missing from my understanding of the…
0
votes
0 answers

how to encrypt a JSON payload using RSA with XML public key and then encode it into hex in node.js

encrypt a JSON payload using RSA with public xml key and encode it into hex in node.js tried with node-rsa
0
votes
0 answers

How to do the shortcut function in ECC when N (Private Key) is Known

When N or private key is known, we don't have to iterate through all the process just to get the final location given the two initial points. How is that shortcut function implemented given the equation, two initial points and N? For…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
0
votes
1 answer

RSA/ECB/PKCS1Padding decryption in PHP 7.2

I've been trying to get this to work since this morning, but I'm stuck at this thing for hours now. This is my Public Key : https://pastebin.com/EBszJhSi I have a string that I need to encrypt. String = "Hello" This is my code below... function…
John
  • 13
  • 2
  • 6
0
votes
1 answer

Trying to convert private and public keys to String format

import java.security.*; public class MyKeyGenerator { private KeyPairGenerator keyGen; private KeyPair pair; private PrivateKey privateKey; private PublicKey publicKey; private Context context; public…
aloy
  • 53
  • 6
0
votes
0 answers

Public Key Encryption - Using Java

I'm trying to write a asymmetric key encryption using Java (without open source libraries like Apache CXF). I'm able to do with Apache CXF, but without open source library - I hit the error "given final block not properly padded". I need help with…
pcs
  • 73
  • 1
  • 3
0
votes
1 answer

Encryption using RSA with given public key in Android

import android.util.Log; import org.bouncycastle.bcpg.ArmoredOutputStream; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.openpgp.PGPCompressedDataGenerator; import…
0
votes
0 answers

Extra data manipulation with end to end encryption

Would it be possible to store some data as tables in a system, where users talk with each other through a server using end to end encryption. Figuratively, let's say end points A and B talk to each other through a server using end to end encryption.…
Ahmet Eroğlu
  • 594
  • 1
  • 7
  • 23
0
votes
1 answer

How do I convert a SSH2 PUBLIC KEY (rsa-key file) to PEM? (Base-64 encoded public key of X.509 certificate)

I have a private/public key that was generated by Putty in the following format: SSH2 PUBLIC KEY rsa-key However, I am trying to get it to work with Docebo API using the JWT Grant Type, which requires a different format (according to this…
Michelle
  • 113
  • 4
  • 13
0
votes
1 answer

Libsodium and Perfect Forward Secrecy

I'm thinking of creating a mobile app that uses Libsodium's crypto_box_easyfor encrypting and decrypting chat messages. However, after reading a lot on the net, I found that one of the major flaws of public-private-key algorithms is that recorded…
0
votes
1 answer

RSA public key generated in Java is not valid in php

I'm creating a RSA key pair in Java and want to use it in PHP. Java code is as follows: public static boolean keyGen() throws NoSuchAlgorithmException, IOException, OperatorCreationException, InvalidKeySpecException { KeyPairGenerator kpGen =…
user8081170