Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
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 ...
0
votes
2answers
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 ...
0
votes
1answer
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: ...
3
votes
1answer
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 ...
2
votes
1answer
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. ...
0
votes
0answers
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 ...
2
votes
0answers
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 ...
1
vote
2answers
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 ...
0
votes
1answer
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 ...
1
vote
1answer
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 ...
2
votes
1answer
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 ...
3
votes
1answer
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 ...
2
votes
2answers
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/...
0
votes
0answers
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 ...
-1
votes
1answer
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 ...
1
vote
1answer
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 ...
2
votes
2answers
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$: ...
2
votes
2answers
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 ...
5
votes
1answer
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 ...
0
votes
2answers
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 ...
6
votes
2answers
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 ...
0
votes
2answers
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 =...
1
vote
1answer
169 views

Is there a truly safe signing algorithm?

After reading this question, I'm pretty shaken up. A determined attacker with $100 in loose change can crack any RSA key in a couple of hours. After believing that these algorithms would take millions ...
0
votes
1answer
276 views

RSA certificate needed in CVC format

I had a client requirement asking me to provide an existing base64 encoded certificate in a CVC format. Could someone point me in the right direction here to understand what this format is? How can I ...
8
votes
0answers
116 views

Bleichenbacher RSA1024 signature forgery, closed-form solution

Hal Finney's writeup (Bleichenbacher's RSA signature forgery based on implementation error) shows a formula for RSA3072. I tried to replicate the attack for RSA1024 and failed, since the first term of ...
0
votes
3answers
202 views

Allow everyone to decrypt a message, but don't allow anyone to encrypt it

I would like to create a software that will be installed on multiple clients. I would like to broadcast an encrypted message to all of those clients. Each client should be able to decrypt the message ...
0
votes
1answer
82 views

Is there a feasible way to generate an RSA key manually the same way as it is for an ECC one?

In elliptic curves, a private key is just a random number, and one relatively small compared to other crypto systems (256 bits for ECC vs 4096 bits for RSA for example). Suppose I don't trust ...
1
vote
2answers
187 views

Benefits of signing RSA-encrypted data?

I recently came across this (PDF) journal article, which describes what it calls "A New Design Of A Hybrid Encryption Algorithm" (which I must say, doesn't sound very novel, even in 2014!): An AES ...
2
votes
0answers
109 views

What kind of RSA padding mode is it?

1: I have a HTTPS server and I added hooks in RSA decryption procedure to dump error RSA input(client key exchange). 2: I get some RSA input that I couldn't check padding successfully(It's usual) and ...
-1
votes
2answers
175 views

Rsa encryption security

What tool is used to measure the security of rsa encryption? If no, is there any tool to measure rsa encryption in terms of security. Or any idea how to measure security of rsa encryption?
0
votes
0answers
151 views

Question about RSA least significant bit oracle attack

According to this question, you can attack RSA by knowing the parity of arbitrary plaintexts. However, the question has a puzzling statement: If an attacker intercepts an encrypted plaintext $C = ...
0
votes
4answers
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?
-3
votes
1answer
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 = ...
2
votes
2answers
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 ...
3
votes
0answers
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 ...
1
vote
0answers
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 ...
1
vote
1answer
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 ...
1
vote
2answers
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 ...
5
votes
2answers
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 ...
0
votes
2answers
198 views

RSA public key and private key calculation: multiple answer

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

Can an attacker predict value of $d$ if attacker already used $n$ for encryption? [duplicate]

In RSA we have value of n and e which is known to sender. If the sender keep maintaining a database of possible n's he can easy calculate $\phi(n)$ because he already know $p$ and $q$ then. $d$ is $e^{...
1
vote
0answers
63 views

Can RSA be used as a one-time pad for authentication?

In the case of Smart Contracts, there are self-destruct functions for the contract which can only be run by the contract owner. In many cases attackers have found a way to take over the contract ...
4
votes
1answer
997 views

Why does gcd(m,N) have to be 1 in RSA?

In the RSA algorithm, if an attacker wants to get $d$, the attacker does this simply by encrypting random messages $m < N$. If the attacker finds a message $m_1$ that the attacker can not encrypt ...
2
votes
2answers
1k views

Why is RSA private exponent much larger than RSA public exponent?

RSA private exponent is much larger than RSA public exponent. For example, for a 2048 bit RSA private key, the private exponent can have more than 2000 bits. But the public exponent is usually 65537 (...
-4
votes
1answer
553 views

Where is RSA applied in real life?

For instance, I know that the BlackBerry uses a form of ECC built-in for data protection. But would like to know if either the iPhone or Android smartphones, for instance, use a form of RSA? If RSA ...
1
vote
2answers
466 views

Attack RSA knowing the public key and brute forcing all possible message

Alice want to send a message $m$ to Bob, and encrypt it with Bob public key $K_B$. $A \rightarrow B : \{m\}K_B$ Lets assume I have intercepted $\{m\}K_B$, I know $K_B$ and I know that $m \in D$ (...
2
votes
1answer
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?
1
vote
2answers
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 &...
0
votes
0answers
80 views

Can Pollard's Rho factor 167-bit RSA within a day on a single-core of a personal computer?

I am working on an assignment for school, for which I have to implement a factoring heuristic. The program must be able to factor a 167-bit modulus within a week. However, I have set my personal goal ...
0
votes
1answer
61 views

Why is the payload size is restricted when using RSA

Doing some research about cryptography, I've read many times that, when using RSA 1024 and PKCS#1, the size of the payload cannot be bigger than 117 bytes. This payload cannot be bigger than the ...