# Tagged Questions

An asymmetric cipher is an encryption scheme using a pair of keys, one to encrypt and a second to decrypt a message. A special class of asymmetric ciphers are public-key ciphers, in which the encrypting key need not be kept secret to ensure a private communication.

2k views

### Cryptographic Protocol using NaCl

Why? I wanted to add some security and privacy to a chat-type server for playing various games (with a few things that are done on the server to limit cheating). Going by the "Don't implement ...
423 views

### RSA reencryption scheme

Is there such an algorithm that would allow to upgrade the encryption of a RSA-encrypted message without revealing the plaintext to the untrusted user? Basically, such an algorithm would probably be ...
110 views

### Why gcd(r,(p-1)/r) needs to be 1 in benaloh cryptosystem

I recently discovered the benaloh cryptosystem. I am working with the system as it is discribed in the following link: https://en.wikipedia.org/wiki/Benaloh_cryptosystem However I need some help in ...
353 views

### Measure ECC key size

I have implemented a ECC key generation scheme successfully. Now I need to find ECC key sizes of each generating key pairs. I assumed that ECC key size is the size of the ECC private Key. So I would ...
695 views

### How exactly are GPG keys mathematically related, and prime numbers inside of GPG general

Before anyone suggest it, I've yet to pick up "Applied Cryptography" I'm planning on picking it up the next time I visit amazon. I know that the keys are somehow mathematically related, and I know ...
497 views

### Is it safe to reuse a symmetric key when using asymmetric encryption?

I've written a C# Library that I hope will be used for security purposes in a commercial application. The application will communicate through the internet and not on an internal network. I am using ...
877 views

### Why is public key cryptography (RSA) used in sites like Google or Facebook?

The RSA algorithm is used for encryption (plain text to cipher text) and decryption (cipher text to plain text) of data. What is the need for using public keys in these sites; why is data is encrypted ...
65 views

### Why is Diffie-Hellman used instead of just RSA in key-exchange (TLS, IKE)?

Why should a key exchange protocol (such as in TLS or IKE) use Diffie Hellman? Why not just use RSA? For example: Alice picks a random session key, signs it, encrypts it with Bob's public key, and ...
583 views

### Why is hybrid encryption more effective than other encryption scheme?

Currently I am learning about Hybrid Encryption but I was not able to find any good study material. Below is my understanding: One of the reason why we use ...
2k views

### Why are RSA ciphertexts different for the same plaintext?

I am using SpongyCastle for a project in android. I have used RSA to encrypt the data and then decrypt it in another activity, the keys are stored in the shared preferences. I discovered a thing I ...
151 views

### how to let other people respond to emails only decrypt-able with my private key

First of all I have to say it's a homework question but since I have no one to consult with, I ended up here :) Suppose a case in which you are the manager of a company and all employees encrypt ...
197 views

### Is there a metric (term) for work required to decrypt a public key?

Any public key decryption can be decrypted given enough time and computing power. Is there a metric or term for this? Something like it would require on average 2^43 1024 bit hashes to find private ...
126 views

### Do we need symmetric cryptosystems?

One question I had to answer in my crypto exam today was: Do we need symmetric cryptosystems? As it stands, that's probably a debatable question, so I'd like to reformulate this as: Are ...
643 views

### Does keeping a public key private or using multiple encryption help?

I recently had a discussion with a friend of mine about cryptography. As we are both no experts, I thought that I could better resolve are dispute here. My friend said that when he used public key ...
557 views

### Safety of DSA key parameters sharing

I'm looking for a solution to use in a context where I need to be able to generate new asymmetric key pairs quickly (using a widely recognized algorithm, and EC-DSA is not applicable). It sounds like ...
88 views

### Is this a proper key-exchange implementation?

I've been trying to implement Diffie Hellman key exchange so far from my own understandings (I know I could just stick with SSL/TLS, but I want to understand it in depth more), so I created this basic ...
95 views

843 views

### Computing p and q from private key

We are given n (public modulus) where n=pq and e (encryption exponent). Then I was able to crack the private key d, using Wieners attack. So now, I have (n,e,d). My question is, is there a way to ...
771 views

### RSA smaller number work-out-by-hand not working - I think I made a mistake

I tried out the paper/pencil explanation @ http://sergematovic.tripod.com/rsa1.html, and it seemed to make sense just fine until I came to decryption. Here is what I worked out: Key Creation: Choose ...
167 views

### Camellia cipher - is it a symmetric or asymmetric cipher?

I read a wiki page about Camellia cipher and know that it is a block cipher that can use 128-bit, 192-bit or 256-bit keys. But I cant find any information about if its a symmetric cipher (uses one key ...
261 views

### Public Keys on Social Media

Is there any problem with using social media (i.e. Facebook) as a directory of public keys? For example, couldn't Alice put a note containing $(g^a \bmod p, g, p)$ on her Facebook page so she could ...
831 views

### How does OAEP improve the security of RSA?

The heart of OAEP algorithm used for RSA encryption are the cryptographic hash functions $H$ and $G$. Does everybody (so also an adversary) know these functions? If YES: How does it help the ...
126 views

### When is each key used when encrypting an email using OpenPGP?

When you send an email using PGP to encrypt emails, is the recipients public key used to encrypt the email, or is your private key used? Are they both used? At what points do each of the four keys ...
94 views

### Securely generating auth tokens

(Disclaimer: I'm an experienced server-side Java programmer, but with little crypto experience.) Objective: I've got a login server which, given a login+password pair, should issue a unique auth ...
547 views

### Prevent replay attack without storage

I am designing a set of low-power sensing motes. Each mote will communicate to a central base over RF. I want the mote to be able to authenticate itself with the base, and send its data without being ...
97 views

### Using related pair of cryptographic keys to open/seal plaintext

I am using curve25519xsalsa20poly1305/fn.seal from sodiumoxide crate written in Rust language which is a wrapper over libsodium ...
341 views

### Attack for RSA 1024 bit with Low Public Exponent

I am facing a challenge at university. Our teacher give us the challenge to try to break an RSA 1024 bit. We have public modulus N and public exponent e (0x03), we don't know the padding. We have a ...
214 views

### RSA private key d knowing e,n

I need to find RSA private key $(d, N)$ knowing $(e, N)$. It's "own" RSA implementation. As i know $p$ is random 70 bit number, then $q$ is $p-2^{10} < q < p+2^{10}$ $d$ is max 16 bit long with ...
163 views

### How do we guarantee plaintext is coprime in RSA?

The specifications for RSA state: $P^{\phi(N)} \equiv 1 ~mod~N$ if and only if $P$ and $N$ are coprime. Here $P$ is the plaintext and $N$ is the product of two suitable primes $x_1, x_2$. My question ...
137 views

### what are multi-primes and how are they different from semiprimes?

I came to know of semiprimes recently. The simplest explanation of semiprimes is you take any two prime numbers and you multiply them, say 3*11 = 33 in which case 33 would be a semiprime. The numbers ...
193 views

### Feasibility of finding public key when private key is known

We all know that in a public key cryptosystem, given a public key it is extremely hard to compute private key from it. Is it the same case in reverse? Given a private key, how easy is it to compute ...
801 views

### How to select $g$ in Paillier Cryptosystem

For my cryptography class project in university I have selected Paillier Cryptosystem as a course project http://en.wikipedia.org/wiki/Paillier_cryptosystem#...
205 views

### Do any one-key-of-many cryptographic schemes exist?

I'm pretty sure I understand how public/private key cryptography works. Anybody can encrypt a message using a well-known public key, but only the person who holds the private key can decrypt it. My ...