Stack Exchange Network

Stack Exchange network consists of 175 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.

3
votes
1answer
292 views

How long does it take to crack RSA 1024 with a PC?

Using an Intel Core i5 CPU, how long does it take to crack RSA using a key size of 1024 bit (generated using a secure key pair generation function)? Suppose for instance that we have thousands of ...
1
vote
0answers
20 views

How to calculate RSA group signatures

RSA group/ring signatures, how are they calculated?
2
votes
2answers
50 views

Preferred SHA-2 hash algorithm for MGF1 in RSA

Does it make any difference to the security and efficiency if we use SHA-256 or SHA-512 for the Mask Generation Function MGF1 that generates the masking / padding within the OAEP encryption scheme and ...
8
votes
0answers
91 views

Is this paper's technique for factoring RSA 2048 with noisy qubits realistic?

A paper titled How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits has just come out which proposes a technique to factor RSA keys with moduli up to 2048 bits with a design ...
0
votes
0answers
13 views

How would I get the issuer's public key from two RSA-signed certificates? [migrated]

I'm trying to get the issuer's public key from two SSL client certificates signed with a 2048-bit RSA key, SHA-256 hashing and PKCS#1 padding, as I only know the issuer's DN and I wish to verify all ...
16
votes
2answers
32k views

What's the difference between RSA and Diffie-Hellman? [duplicate]

I've been reading on a lot of websites that same thing: RSA is for communication using the public and private key for both the server and client, where Diffie-Hellman is just for exchanging the same ...
1
vote
0answers
50 views

RSA How to find the exponent ($e$) of the Public key with the values $p$ $q$ and an example are given

I'm wondering if it's possible to find the public exponent ($e$) with an example and the (rather small) values of $p$ and $q$ given. Currently the only option I found is bruteforcing this value, but ...
0
votes
1answer
52 views

RSA and possible range of $\phi(n)$

If $n = p_1 p_2$ for primes $p_1 \ne p_2$, $\phi(n)$ is $\phi(p_1)\cdot\phi(p_2)$. Does that mean that the possible range of $\phi(n)$ is somewhat narrow, that $(p_1-1) \cdot (p_2-1)$ (that is, $\phi(...
6
votes
1answer
7k views

Should I be using PKCS1 v1.5 or PSS for RSA signatures?

I am implementing an application where a user needs to sign some data that they have created, store it in an untrusted place, then later retrieve that data and verify it is still authentic before ...
2
votes
1answer
38 views

Generate a per data shared secret vs per session

I have read about SSL that they persist the shared-secret for the entire session. However, someone in stackoverflow suggested a way of generating a shared secret for each data to send and then send ...
0
votes
1answer
52 views

Why is lcm(n) used now instead of $\varphi(n)$ in RSA? [duplicate]

I know that lcm(n) or Carmichael's totient function $\lambda(n)$ is now used instead of $\varphi(n)$ or Euler's totient function to generate the public key in RSA encryption? Why is this so? Are there ...
1
vote
1answer
70 views

Prime numbers in RSA encryption [duplicate]

I'm studying how the selection of prime numbers in RSA encryption may affect the security of the encryption in regards to the public key. Essentially, are there any specific types of prime numbers ...
-1
votes
2answers
1k views

How exactly are GPG keys (and prime numbers inside of GPG) mathematically related?

I know that the keys are somehow mathematically related, and I know that they're somehow generated via prime numbers, but how exactly are they related? I realize that it'd probably be best for me to ...
0
votes
2answers
88 views

How does AWS Secret key and access key work

Those keys are too short to be public/private RSA keys. What are they? How does it use them to authenticate the client? My guess is: AWS access key ID is a form of unique user/account identifier AWS ...
1
vote
1answer
48 views

Value of $\varphi(n)$ and $\lambda(n)$

Is it true that $\varphi(n)$ is generally larger than $\lambda(n)$ for the same $n$? If so, can anyone give me a proof?
0
votes
1answer
63 views

Do Carmichael's and Euler's totient functions in RSA generate the same keys?

Starting with the same primes $p$ and $q$ to generate $n=pq$, will Carmichael's totient function and Euler's totient function give the same public key ($e,n$) and private key ($d,n$) in RSA encryption?...
0
votes
0answers
19 views

Time complexity of Carmichael's totient function [duplicate]

I'm studying the efficiency of Euler's totient function and Carmichael's totient function used in RSA encryption. I do understand that Euler's totient function has several different time complexities ...
0
votes
1answer
64 views

Will publishing two or more public keys of the same RSA private key cause a security risk?

I want to make an end-to-end messaging platform where everyone is identified with a unique random private key. Everyone uses other peers' public keys to identify and send encrypted messages and verify ...
1
vote
2answers
476 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 ...
0
votes
2answers
883 views

How does RSA public and private key structure look like?

So I was reading this wiki about the RSA algorithm and I read this article to understand it better. My goal was to create a simple program that would generate private and public keys. I got to the ...
16
votes
2answers
11k views

Using the same RSA keypair to sign and encrypt

The RSA signature operation is basically the same as encrypting with the private key. In particular, both operations use the same kind of keys. Is it safe to use the same RSA keypair both for ...
4
votes
4answers
2k views

Choosing which is public vs private key

When I calculate two RSA keys, what if anything, would make any difference which I call the public vs which I call the private key?
1
vote
1answer
740 views

Main purpose for Carmichael's Function in RSA

I'm trying to understand the RSA cryptosystem, these are the steps: Generate two large different prime numbers $p$ and $q$. Calculate modulus $n$ ($n=pq$) Calculate: $λ(n) = \operatorname{lcm}(λ(p), ...
1
vote
1answer
61 views

Picking 'e' for RSA encryption

What is the reason behind picking either $3$ or $2^{16}+1$ for generating the public key in RSA?
4
votes
2answers
734 views

Is RSA inspired by Diffie Hellman?

I read a bit of A Method for Obtaining Digital Signatures and Public-Key Cryptosystems that introduced RSA in 1977, and, while learning the steps in RSA a few days ago, I noticed that they are similar ...
1
vote
1answer
48 views

Probabilistic padding to avoid Håstad’s Broadcast Attack

Can someone explain why probabilistic padding like OAEP is particularly useful for avoiding Håstad’s Broadcast Attack? I don't really get the reason why.
0
votes
0answers
20 views

PDP schemes parameter generation

For the PDP scheme, I need to generate the following parameter: g is a generator of Q (Q is the set of quadratic residues modulo N (N = pq is the RSA modulus) What algorithm can be used to generate ...
0
votes
0answers
6 views

Can we write both encrypted text and plain text to the same file? [migrated]

We have a requirement from customer to write payment transaction information to a text file. Of many lines of data per transaction, only one line contains cardholder information, which needs ...
14
votes
2answers
6k views

RSA with modulus product of many primes

I would like to ask what happens if we build an RSA system with modulus a product of more than 2 primes, for example let $n=p_{1}p_{2}...p_{L}$. I know only the classical RSA system with $n=pq$ with $...
0
votes
1answer
61 views

How to calculate e if we know n,p,q,m,c? [duplicate]

If we know n, p, q, and we have an encrypt oracle, which means we can input any plaintext and we'll get its ciphertext, and here p is smooth, which means the factors of p-1 are very small, is that ...
3
votes
1answer
116 views

Is OAEP needed when encrypting a session (random) key using RSA?

My question is two parts: when encrypting a session key which is used to encrypt bulk data using a block cipher for example, is padding with OAEP really needed [i'm assuming the key is generated ...
4
votes
3answers
540 views

Why does OpenSSL differentiate between PSS and non-PSS for private key generation?

RSA-PSS private keys The following command will generate an RSA-PSS private key: ...
2
votes
1answer
83 views

man-in-the-middle attack on text-book RSA PKE

I am attempting to solve the following problem: I know the following: 3 messages are being sent between Alice and Bob, all messages are encrypted with the known public key $(d,N)$: Alice sends ...
1
vote
0answers
25 views

How to get the key data from the pkcs#8 format? [closed]

Being newbie to crypto, I understood that RSA keys are shared are pairs $(e,n)$ or $(d,n)$. But when I was given a doc with keys, they were in PKCS#8 format. How to get the keys out of this format?
15
votes
2answers
7k views

Which attacks are possible against raw/textbook RSA?

The PKCS#1 standard defines multiple padding schemes for signature generation/verification (EMSA-PSS and EMSA-PKCS1-v1_5), and encryption/decryption (EME-OAEP and the less safe EME-PKCS1-v1_5). ...
0
votes
1answer
36 views

How to prevent Public Key from being replaced entirely?

I am using RSA to sign my license file using Microsoft CNG API. I am signing the license file and sending the file with the <...
1
vote
2answers
531 views

Guidelines for cryptographic key generation

I was wondering whether you know can point me to some general (basic) principles/guidelines one should follow for generating cryptographic keys? I have looked at NIST 800-133, but was hoping for some ...
0
votes
1answer
26 views

I have created values for rsa encryption but it dosent always work [duplicate]

i am suing the values as follows: (p, q, n, phi(n), e, d) = (1033, 5039, 5205287, 5199216, 65537, 3784241) yes i have made sure e and phi(n) are coprime for example if i were to encrypt the value ...
0
votes
0answers
9 views

Get modulus of ssh-rsa public key? [migrated]

I'm trying to verify a JWT on client side with Auth0's library idtoken-verifier and am getting thrown an error when checking modulus and exponent of my public key (https://github.com/auth0/idtoken-...
1
vote
2answers
96 views

How do I calculate e, d and N based on raw and encrypted message in RSA?

I've got raw and encrypted message, which contains only numbers. For example: Message: 32016550980634121428089400169, encrypted: 35682226122303060179704449482 I'...
3
votes
1answer
66 views

Why is the strength of an Elliptic Curve Cryptography (ECC) half the size of the prime field size?

I've looked around and couldn't find a direct answer. As a general rule, I've read from various sources (here here, and here) that the strength of an elliptical curve key is half of the size of the ...
0
votes
0answers
28 views

Difference between JWE encryption algorithm RSAES-PKCS1-v1_5 and RSAES OAEP [duplicate]

In the specifications of JWE (RFC7516) they specify the values for (asymmetrically) encrypting the symmetric key. In RFC7518 in section 4.1 they list the options, of which two are relevant for my case ...
0
votes
1answer
57 views

How you find the unpadded short plaintext using RSA?

I am currently trying to understand how you find the unpadded short plaintext when you are using RSA. Please help with explaining the process and so I can understand this topic more.
-3
votes
0answers
66 views

finding private key for RSA

for RSA $N=pq$, $c = m^e \bmod N$ if $m^{12345}= 1 \bmod N$ is given, how to find RSA private key $d$ and message $m$. Note: $N,d,\phi$ are unknown. $e$ is publicly available. I think we can take $...
2
votes
1answer
283 views

How to choose the integer m in the general number field sieve (GNFS)?

Given an integer you want to factor $N$, GNFS starts by selecting a monic irreducible polynomial $f \in \mathbb{Z}[X]$ and an integer $m$ such that $f(m) \equiv 0 \text{ mod } N$. In practice, if $m$ ...
0
votes
1answer
376 views

Using One Time Pad and RSA compared to using only One-time Pad

Here I implemented One Time Pad first for only one time and then I used RSA algorithm to encrypt the message. For RSA algorithm, I pick p = 2143 and q = 3257 value which does not share any common ...
3
votes
2answers
1k views

How can a message encrypted with the public key be decrypted with the private key?

I've been reading about encryption and have a basic understanding of the concept. What I don't understand, however, is how a calculation with one key can result in a number that, through calculation ...
0
votes
0answers
17 views

is there any good implementation to the RSA in arduino ? c language [migrated]

I need a good implementation to the RSA algorithm that works on Arduino mega with key size 1024. the code will run on Arduino ide. the project idea simply is an android app send an encrypted message ...
12
votes
3answers
13k views

Is RSASSA-PKCS1-v1_5 a good signature scheme for new systems?

Is RSASSA-PKCS1-v1_5 a good signature scheme to recommend that people use in new systems? Is it believed to be secure and represent the state-of-the-art in RSA-based signatures? I understand that ...