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.

8
votes
0answers
73 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 ...
0
votes
0answers
47 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
60 views
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(...
2
votes
2answers
45 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 ...
2
votes
1answer
37 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
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?
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 ...
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 ...
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?...
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?
0
votes
0answers
19 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 ...
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
1answer
59 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 ...
4
votes
3answers
538 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: ...
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?
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 <...
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-...
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 ...
1
vote
2answers
94 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'...
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 ...
-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 $...
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 ...
1
vote
2answers
82 views

RSA padding: risk of using constants

Assume I want to make my RSA secure because I heard that textbook RSA, especially in conjunction with low exponents, is very risky. I decide to limit my message length to 100 and subsequently ...
4
votes
3answers
264 views

Can Shor's algorithm factor multi-prime numbers?

I know that Shor's algorithm can factor semi-primes ($N = p \times q \space, \{p, \space q \in \Bbb{P} \space \vert \space p, \space q \gt 0 \} $). Assuming that all prime numbers are so large that ...
0
votes
1answer
71 views

RSA calculate public exponent

Suppose I have two messages $m_1$ and $m_2$ as well as $c_1$ and $n$. It's standard RSA so $c_1 = m_1^e \ mod \ n$, $c_2 = m_2^e \ mod \ n$. Further assume the only information we have about e is that ...
2
votes
1answer
68 views

Discrete logarithm with exponentiation oracle

Suppose $(n, d)$ is an RSA private keypair. We know the public key only (wlog suppose it's $(n, 2^{16}+1)$ and we are given oracle $E$, decryption oracle for $(n, d)$. Is there any efficient algorithm ...
26
votes
3answers
302 views

Why does BitLocker not use RSA?

If understand correctly from this post and the Wikipedia page for BitLocker and TPM, by default, BitLocker uses symmetric cryptography like AES. However, TPM is capable of performing RSA encryption. ...
1
vote
0answers
82 views

RSA low exponent with padded plain-text

Considering a case, when modulus is large and hard to factor, exponent e=3 and there is a cipher-text which is created by padding plain-text with ...
2
votes
2answers
308 views

RSA find public exponent

Suppose I have an encryption oracle which can encrypt $m^e \mod n$ for any $m$. I know $n$ and I know $\varphi(n)$. However the public exponent $e$ is secret. Is it possible to figure out it's value ...
0
votes
1answer
72 views

Euler's totient function and Carmichael's totient function in RSA [duplicate]

I'm a high school student taking IB and I'm doing my EE on Maths, more specifically on the effectiveness of Euler's totient function and Carmichael's totient function in RSA. Am I right in thinking ...
0
votes
2answers
48 views

cryptographically signed streaming data

On a high level the question is: how does one cryptographically sign streaming data? Here is the context: a number of people are continuously streaming data to me the data is public and does not ...
-2
votes
1answer
91 views

RSA: why does $m^{ed}$ equal the original message?

Trapdoor functions are defined as that a secret key reverses the function. It seems to me more that it causes a cycle to repeat, similar to how $n^k \bmod k$, when $k$ is a prime number, equals $n$, ...
1
vote
2answers
93 views

How to implement correctly an Integrated Encryption Scheme?

I am developing a REST client (from an Android Point Of Sale) where I'm given a public RSA 2048-bit key and I need to encrypt transaction information. Since that single block cannot be encrypted (and ...
2
votes
2answers
90 views

Compute discrete logarithm mod $n=p \times q$ knowing factorisation

I read in a document that for a given $n = p\times q$ ($p$, $q$ primes), if you know $p$ and $q$ then you can easily solve the discrete logarithm problem, i.e. for fixed $a,b$, you can find $x$ such ...
1
vote
1answer
50 views

Forging RSA1024 signature with e=3 where hash is right justified

I am trying to understand (in the frame of exponent 3) how to calculate a "forgery" in the case where the desired result is: xxxxxxxxxxx[...]xxxxxxxxxxxxxxxxxxxxHHHHHHHHHHH[...]HHHHHHHH where HH = a ...
1
vote
0answers
61 views

Overcome MD5-RSA Signature verification

I asked this question already at the Information Security SO site, but my research on how to overcome this problem ended always on the crypto site. That's why I will try to find some help here :) I ...
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.
1
vote
0answers
98 views

RSA encryption extremely large public exponent

I'm trying to do learn a bit about RSA by doing CTF's and now I am doing one problem probably more than 7 hours so I would really appreciate a hint here from an expert. I have an encrypted message $c$...
0
votes
1answer
249 views

Can not use big prime number for pair of key of RSA Algorithm [closed]

I'm new to cryptography. I have a binary image with 64x64 pixel in size. I perform an encryption to the image using RSA Algorithm. I wanna ask something bothering me, why can I not use big prime ...
0
votes
0answers
50 views

RSA Signature Forgery - Low Public Exponent + Improper Padding Validation? [duplicate]

Consider the following custom crypto: We have a signed message M1 with corresponding signature S. We have the 1024-bit modulus <...
0
votes
0answers
42 views

Signature Generation with RSA PKCS#1 v.15

I am trying to validate my RSA implementation for digital signatures with the test vectors provided by NIST. For now, I am focusing on the tests for signature generation (SigGen15) with the PKCS#1 v....
3
votes
2answers
967 views

RSA: Danger of using p to create q

Assume my prime generation is as follows: Pick a number $p$ between 1000 and 9999. $p=abcd$. Make sure $p$ is prime Construct $q$ such by taking the last 2 digits of $p$ and the first 2 digits of $p$,...
0
votes
2answers
107 views

What is the difference between RSASSA-PSS signing and RSA-PSS signing?

I read the RFC 8017 and understood the pkcsv1.5 and pss padding techniques. I understood that in RSASSA-PSS signing scheme the signature will be appended at the end of M. In some websites I read both ...
0
votes
1answer
43 views

Book request about elliptic curves, RSA and DSA

I understand that this question can be hardly downvoted, but so be it if someone gives me really useful references :) I wanna learn difference (deeply) between RSA, DSA, and ECC, especially I am ...