# Questions tagged [rsa]

an asymmetric (e.g. public-key) cryptosystem, based on modular exponentiation with big exponents and modulus. RSA can be used both for signature and encryption.

1,702 questions
107 views

### RSA - Calculating d

I'm trying to calculate d, given p=163, q=311, e=101, n=50693, φ(n)=50220 The below is my current effort - how do I calculate d from this? I'm struggling with this part - can someone point me in the ...
230 views

### Why is RSA preferred over Diffie-Hellman if they're both used to establish shared key?

I've read that the RSA algorithm is preferred over Diffie-Hellman key exchange as it makes key management easier. In the context of online banking, before the RSA algorithm they would have to maintain ...
424 views

### What is the verification algorithm for verifying RSA signatures?

I am not able to find much information how how to verify RSA signatures. I have three values. Message = "Launch a missile." public key: ...
113 views

### RSA Timing Attack and Prevention through blinding

I am kind of confused regarding timing attacks on RSA. I do understand that the attack exploits the fact that the modular exponentiation (square and multiply) has key dependent branching. That is, if ...
142 views

### Why is the number of qubits used in Shor's factoring algorithm so high?

When preparing the initial state of the algorithm to factor $n$ he computes $q = 2^l$ such that $n^2 \leq q < 2n^2$. The first register then contains $l$ qubits. Why does this need to be so high. ...
117 views

### Rsa factoring best method and time

I am going to participate in a local challenge where you have to guess the two prime numbers(p and q), they give you a 8 bits number, 16 bits number..., 128 bits number... , 512,1024,2048... and wins ...
44 views

### Asymmetric encryption property required in an authentication protocol

We want to choose an asymmetric encryption scheme for use as follows: A device holds its private key, with the corresponding public key known and trusted by all. The device also holds a small $b$-bit ...
597 views

### Are ECDSA keys and RSA keys interchangeable?

Is it possible to use an ES512 key pair for RS512 signatures? Is it possible to use an RS512 key pair for ES512 signatures? I've also posted an issue in the NodeJS jwa package. I created a key pair ...
69 views

### What is the correct use of RSA

I study cryptography as a hobby and I made a high school work (essay-like) about cryptography. When I was defending my work in front of a committee, one of the teachers confronted me about my ...
36 views

### RSA - Compare two values for encryption exponent, both are relatively prime and $e < λ(n)$

So we have $q = 311$, $p = 163$, $e = 101$, I found $d = 39281$ using Euclidean Algorithm and checked by encrypting and decrypting a message. Next it is asking if $e = 101$ was a good choice or would ...
799 views

### What's the point of OAEP?

I can't seem to wrap my head around what benefit OAEP provides (specifically with RSA). Lets consider really small numbers for a moment. If the random source in the padding algorithm gave a random ...
131 views

### RSA-CCA security of $m || H(m)$ as input to modular exponentiation

If we encrypt a message $m$ as $m || H(m)$ using textbook RSA encryption algorithm, $H$ is random oracle modeled. In this case the message can be recovered. Is this encryption CCA secure? If so how ...
199 views

### Doing RSA-KEM with RSA-OAEP

I am fiddling around with the JS Web Crypto API and creating a hybrid encryption system that uses a symmetric key to encrypt form data with AES256-CBC and and a public/private key-pair to wrap/...
47 views

### Manually encrypt using RSA X509 in .NET

I don't want to utilize RSaCryptoProvider available in .NET to encrypt data. I would like to encrypt data using the RSA keys, allowing me to send a message to Alice using his public-signature and ...
117 views

### RSA Security -textbook question

One of the attacks on plain RSA involves a sender who encrypts two related messages using the same public key. Formulate an appropriate definition of security ruling out such attacks.And show that any ...
58 views

### Is it possible to determine public key if you know private key?

Is it possible to determine public key if we know private key? Employees has RFID card and RFID is a private key for employee. I want to encrypt some user's (employee's) data with employee's public ...
267 views

### RSA: Is possible get p and q from this d and n?

I have this algorithm and Im searching p and q: $n=p^2 * q$ $l=(p-1)*(q-1) / \gcd (p-1,q-1)$ $d\equiv l^{-1} \pmod n$ And the values are: For $n$: ...
432 views

### Recovering 3 private keys if Eve knows that the keys are shared prime numbers and knows their public keys, How would this be done?

okay so here is the original question: Alice Bob and Carl are generating public keys for RSA, but they are lazy and decide to share some of the work of generating prime numbers. They find 3 large ...
283 views

### RSA factorization knowing N, e=65537 and g=d*(p-17)

Having known the values for $N$ a large number, $e = 65537$ and another large number $g = d \cdot (p-17)$, how can I use that info to find out $p$ and $q$? I guess that have something to do with ...
94 views

### Why aren't 4096-bit RSA PGP key blocks $\lceil\frac{4096}{6}\rceil=683$ base64 characters long?

If a 4096-bit RSA PGP key is considered sufficiently long for most purposes, why are so many key blocks around 3000 base64 characters in length? Why aren't $\lceil\frac{4096}{6}\rceil=683$ base64 ...
481 views

### What's the difference between rsa_pss_pss_* and rsa_pss_rsae_* schemes?

I'm trying to understand the difference between rsa_pss_pss_ and rsa_pss_rsae_. The picture shows the extension of TLS1.3's ...
102 views

### Why is prime factorisation computationally intensive compared to normal factorisation?

Why do we use prime factors in asymmetric algorithms compared to other factors? For example: lets say we use two prime numbers p = 53 and q = 59 our public key in RSA algorithm would be p * q =...
169 views

242 views

### Finding the prime factors of $n'$ given the previous $n$ and its prime factors $p$ and $q$

Say I have a very large number $n$ = $pq$ where $p$ and $q$ are prime. A new number $n'$ is generated by increasing these prime factors. How can I find this new number's prime factors?
124 views

### How to attack RSA with 13 primes

Could give me method to attack RSA when N decomposes into multiple primes And this is the topic N = ...
297 views

### Computational complexity of RSA

What's the computational complexity or RSA? One can assume it's O(prime length^2) it you consider multiplication by column, but speed tests slightly differ on slow operations with private key and ...
60 views

### X.509 strong authentication protocols

Is there also a protocol definition in X.509? In "Handbook of Applied Cryptography" by A. Menezes there is a reference to X.509 strong authentication protocol, nevertheless, I could not find the ...
47 views

### Decrypting a someone else's ciphertext

We have a scenario where two people A,B have the same modulus $N$ but different exponents $e_1, e_2$ respectively for RSA encryption. They have decryption exponents $d_1, d_2$ respectively. Suppose ...
67 views

### Does public-key + hashing create a security vulnerability?

The title says it all really...let's say I have a packet of data that one of my applications needs to store encrypted with a public key (RSA, say, with the private key kept elsewhere). Let's say the ...
980 views

### Why is a Diffie-Hellman key exchange required when RSA is already being used for key exchange in TLS?

Specifically with TLS, What is RSA used for during key exchange? What is Diffie-Hellman used for? Since RSA already provides authenticity and confidentiality, why is Diffie-Hellman used during the ...
366 views

### Can AES-CBC be safely used in combination with RSA, or must it be CBC-MAC?

The plan is to encrypt files using an AES-256 in CBC mode secret key. The secret key itself will be encrypted with a RSA 2048-bit public key. Is using AES-CBC sufficiently secure if used in ...
198 views

### RSA public key and private key calculation: multiple answer

Given N = 91 public key (11, 91) Plaintext (88) ...
56 views

50 views

### Decode RSA given e,p and q_inv ( with respect to p)

Suppose I was given e, p and q_inv. Where q_inv = 1 mod (p). How would one go about computing N to decode the ciphertext?
185 views

### RSA Question- max number of ascii characters encrypted at one time

I'm a student new to cryptography and have a fairly straight forward RSA question that I'm struggling to wrap my head around. "Alice's RSA public key [N:e] is stored in binary as a 16bit integer &...