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
6
votes
1 answer

parse and read a public key in java

I have a requirement to read a public key using java and parse it, to check its validity, exponent, modulus or whether its valid or not. I tried the below code, and having issues. Can you please help me finding a solution for this problem? public…
Sirish
  • 917
  • 3
  • 14
  • 25
6
votes
4 answers

Create an X509Certicate from a DER decoded String

I have a X509Certificate and I write/print it to a file as follows. (I'm not writing encoded bytes, because I want to read the content of the certicate) X509Certificate cer = generateCertificate(); // cer is DER encoded writeToFile( cer.toString()…
Fahim
  • 723
  • 1
  • 7
  • 11
6
votes
1 answer

Decrypt the encrypted file content?

I am having a problem decrypting a file using RSA public key decryption. My process is to receive the xml file, encrypt the content, and write it back to the same file. Another function decrypts the content. My source code is: public void…
Bathakarai
  • 1,517
  • 6
  • 23
  • 39
6
votes
2 answers

Authentication with public keys and cx_Oracle using Python

I've Googled a bit but I haven't found any substantial results. Is it possible to use key-based authentication to connect to an Oracle server using Python? My objective is to be able to automate some reporting I'm doing with Python without having to…
Nitzle
  • 2,417
  • 2
  • 22
  • 23
5
votes
1 answer

How does SSL support in PHP PDO (MySQL) work?

I'm familiar with the public/private key negotiation implemented in HTTPS, which is why I am confused by the following driver options that are apparently available (though not officially documented) for PDO's MySQL…
tjbp
  • 3,427
  • 3
  • 24
  • 35
5
votes
4 answers

Where to store the sensitive data in vb.net securely

I have a vb.net application that uses my gmail smtp server settings and my password to send me the users feedback through the email, (I don't want to show my email to the users) The problem is I want to store these data securely in the vb.net…
Michael harris
  • 966
  • 2
  • 14
  • 25
5
votes
2 answers

Change encryption key without exposing plaintext

We're designing a database system to store encrypted strings of information, with encryption and decryption performed client side using public-key cryptography. If the key was ever changed though, this would necessitate reencrypting all the records…
5
votes
3 answers

PyECC Example - Python Elliptic Curve Cryptography

I am working with PyECC - it is the only elliptic curve cryptography module for python that I can find. I was wondering if anyone had an example of how to use the module? I'll try reading the source, but I couldn't find anything on Stack Overflow on…
5
votes
1 answer

Big-O for public key encryption

I have been searching for a few days now, but I cannot find a big-O notation algorithm for encrypting, decrypting, or attempting to break an encrypted file (brute force) making use of public key encryption. I am attempting to determine the big-O…
Porthos3
  • 381
  • 5
  • 19
5
votes
9 answers

How to encrypt a .jar file

I'm working in a project where we need to encrypt the .jar file so no one can access to the .class files which inside the jar file.... is there any java coding which can help me to encrypt the .jar file ?
S Gaber
  • 1,536
  • 7
  • 24
  • 43
5
votes
1 answer

Implementation of ECC in C

I would like to implement «my own hybrid encryption engine» using the asymmetric elliptic curve cryptography instead of other algorithms as RSA or ElGamal. Assuming that I want to use curves that provide greater security, which ones should I employ?…
user827321
5
votes
1 answer

How does a server verify a JWT? Where does the Public Key come from?

I am looking at the examples of JWT tokens in Node.js, and the verify function. My question is, where does this publicKey come from in verify(token, publicKey)? What is the flow? The client (one of my users) has a client library installed on their…
Lance
  • 75,200
  • 93
  • 289
  • 503
5
votes
2 answers

exchange of public key as a serialized object

How to exchange the public key to the client place. i have encrypted a document(text file) using RSA algorithm by using private key and then stored the public key as an java.security.Key object in a file using serialization.I want to know about the…
Lalchand
  • 7,627
  • 26
  • 67
  • 79
5
votes
1 answer

React Native app data storage to Google drive and iCloud

I am trying to store my app data on Google Drive and iCloud based on user device.I don't want to use Async Storage ,redux state neither I want to store data on my server cloud i.e. AWS. Basically I like the way how WhatsApp takes data backup on…
5
votes
2 answers

Does Azure's Key Vault support PGP key encryption?

I would appreciate clarification and advice on the following: i am working on secure file transfer using SFTP protocol. We use PGP public/private key pair for file encryption and decryption . for a time being we keep our public/private key in local…
geekHarry
  • 53
  • 1
  • 4