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
0answers
44 views

Factoring RSA weak modulus

Given a public key for RSA, I have extracted the modulus which looks like this : ...
-1
votes
0answers
32 views

RSA modular multiplicative inverse, calculation of 'd' doesn't look fool proof. Can any one with experience in RSA, explain me about this [duplicate]

In RSA, for calculating $d$, we have the $\lambda(n), e$ and we calculate $d$ such that $e d \equiv 1 \pmod{\lambda(n)}$. As per the Wikipedia example is given for RSA - the value of $e$ is 17, $\...
2
votes
1answer
81 views

Looking to verify my understanding of RSA math

I want to explain RSA to a programming audience with no cryptography background and I want to be sure my explanation is correct. The goal is to help them understand how RSA works under the hood. You ...
4
votes
2answers
108 views

Is it hypocritical to use AES-256 and RSA 2048 in the same application?

I see a common claim that AES-256 is the gold standard and is good future proofing, often in the same wind as "just use 2048-bit keys for RSA". Security documents seem to recommend both AES-256 and ...
0
votes
0answers
6 views

Attempt to encrypt plain text with RSA public key throws error “unable to load Public Key” [migrated]

I received an RSA public key from a colleague by way of a pem file: ...
1
vote
1answer
57 views

Inverse of an element in a RSA group

Consider a RSA group $Z_N$ for $N=pq$, where $p,q$ are large prime numbers. Under strong RSA assumption, can an adversary efficiently compute the inverse of a random element $z$ from $Z_N$ without ...
1
vote
1answer
57 views

$m^b = z^b \pmod{n}$ - single solution $m = z$?

If i have the following equation: $$m^b = z^b \pmod{n}$$ Where all numbers are taken from the multiplicative group $\mathbb{Z}_n^*$. Suppose I know the values $z$ and $b$. Can I state that $z = m$, ...
1
vote
0answers
67 views

Finding generator element for multiplicative group of order $n$ - feasible?

Given a multiplicative group of order $n$, how hard is it to find a generator element (such that all other elements can be expressed as powers of that generator)? What would be the complexity?
0
votes
1answer
37 views

Using the same RSA key for verifying a website and digital signature

We have the (same) RSA key for verifying a website and for digital signature. A user would send a nonce encrypted using the public key, the websites returns the nonce by decrypting it using the ...
0
votes
0answers
54 views

Is RSA in decline across the board?

From what I gather from the internet (source), the recommended practice for 2019 and beyond is to avoid RSA and use ECDH and ECDSA. Is this the general case?
0
votes
0answers
23 views

To get 128-bit security for RSA, the modulus should be 4096 bits. How was that determined? [duplicate]

My understanding of security level is that for a crypto scheme to have n-bit security means it would take $2^n$ operations to break it. For something like AES with a 128-bit key, it's straight-...
3
votes
2answers
317 views

Encrypting between nodes that have RSA keys: Diffie-Hellman or random secret key?

I have two peers with RSA keys; they want to encrypt a non-trivially sized message between them, so I want a random AES symmetric secret key, which is encrypted with Bob's public RSA key, and sent ...
0
votes
1answer
71 views

Storing passwords in a publicly available database

I have a public database where users need to store configuration files. The file can contain passwords. Everyone can read config files but only the server can read passwords in them. In the browser, ...
0
votes
1answer
37 views

How can I verify certificate signature algorithm in TLS 1.3 using PSS?

I've read this post but I'm still unable to understand some things. I'm trying to verify that the signature algorithm used in the certificate matches the proposed list from the client. (As it's ...
0
votes
0answers
35 views

Digital Signature using RSA [closed]

In digital signature using the RSA would it be possible if the receiver will be the one to generate the public and private key instead of the Sender?
2
votes
1answer
37 views

How to identify RSASSA-PSS from rsaEncryption OID?

Following the RFC 8446 it states that: RSASSA-PSS RSAE algorithms: Indicates a signature algorithm using RSASSA-PSS [RFC8017] with mask generation function 1. The digest used in ...
6
votes
1answer
118 views

Distinguishing generators of RSA primes and moduli

We are trying to distinguish two RSA prime generators: Prime generator 1 draw uniformly at random an integer $p$ with $2^{1023.5}<p<2^{1024}$, until it is prime output $p$. Prime generator 2 ...
2
votes
1answer
51 views

Find hash and signature algorithms used in an X.509 certificate signed with RSASSA-PSS

I'm trying to understand the new PSS scheme, but having trouble figuring out how to parse it properly. When receiving a certificate with OID of RSASSA-PSS, how can I know which hash and signing ...
0
votes
1answer
49 views

What is multi-prime RSA (RSA-MP)?

I found some related question but no real explanation of what it is and when and why to use it. What are the benefits and downsides and is it recommended?
2
votes
1answer
51 views

Is padding of the digest needed in SHA256 with RSA-2048 scheme?

For a signing scheme involving generating a $256$ bit digest using SHA256 followed by RSA with $2048$ bit modulus, the signature would always be 256 bit without padding even though sigantures of up to ...
0
votes
1answer
54 views

How do you get $d$ in textbook RSA

So people say to choose $d$ such that $e*d=1(mod((p-1)*(q-1)))$. However, $1\%$ anything always equals $1$. Maybe I am not understanding it correctly, but the only way to get $e \cdot d=1$ is just by ...
0
votes
1answer
52 views

How does Euler's Theorem show that $(m^e)^d ≡ m \bmod n$

In this thread Henrick Hellström says that when $ed \equiv 1\ (mod\ \phi(n))$ then $(m^e)^d \equiv m\ (mod\ n)$. So I thought this is how Euler's theorem is related to RSA. But at least I thought that ...
2
votes
2answers
87 views

Security of RSA for padding $\texttt{0x00|message|random_bytes}$

I've read this and this but I'm not understanding why padding a message with a simple random is not secure. For example, consider a 256 bytes modulus. We can agree that the first byte from the ...
1
vote
0answers
44 views

In RSA, what is $P[x \notin \mathbb{Z}_N^*]$

In the RSA problem one tries to avoid to pick a message $x \in \mathbb{Z}_N$. Thus, one may ask the question: Given $x$ uniformly distributed over $\mathbb{Z}_N$ what is the probability that $x \...
1
vote
2answers
199 views

Can an RSA (private) modulus contain (hex) zeroes?

Consider a public modulus that is supposedly 4096 bits. But since it contains two hex pairs of zeroes, i.e. ...:00:...:00... such that the bit length of the decimal value instead becomes 4093 bits, is ...
3
votes
2answers
74 views

Are relatively prime numbers used in RSA

We know that the Totient function is multiplicative. Which means that when $p$ and $q$ are relatively prime, then $\varphi(p q)$ is equal to $\varphi(p) \varphi(q)$. My question is, are only prime ...
0
votes
0answers
30 views

Does public key encryption support a large message size? [duplicate]

I'm somewhat new to encryption. I see that the actual RSA sizes are 1024 and 2048? Can those key sizes support data blocks of 128 MB?
1
vote
0answers
68 views

What is the probability of $\gcd(e,\varphi(n))=1$, where $e$ is an odd number and $\varphi(n)$ is an even number with $ e<\varphi(n)$?

This is needed because I use a random function to generate the encryption key in RSA setting to generate random numbers and check if $\gcd$ is $1$.
4
votes
1answer
108 views

How to generate $k$ random numbers that add upto a number $d$ and are coprime with respect to $p-1$

This is something that is needed while generating additive shares ($D_i$) for decryption key (represented by $d$) where each additive share must be coprime with respect to $p-1$ i.e $\gcd(D_i , p-1) =...
0
votes
0answers
14 views

Python, Encript a message with two different public keys. (Crypto.PublicKey ) [migrated]

as a title I would like to use python to encrypt a message with two different private keys. In this situation I am using a module called Crypto.PublicKey . In the following code, I can do the ...
2
votes
1answer
69 views

Converting Ciphertext to a Number in RSA

I've been looking into RSA and the attacks against weak implementations of it, such as when $e$ is small and there's no padding. On Wikipedia, the following attack is outlined for small $e$ values: ...
12
votes
2answers
656 views

What motivated the creation of RSA and ECDH?

Recently I've been learning about cryptography and so far I am loving it. However, there are some things I do not comprehend. As far as I know, RSA was published in 1979 while New Directions on ...
0
votes
1answer
77 views

In RSA, given $n=100$ and $e=13$ ,Encrypt and Decrypt the plain Text “SECRET”

Is this question valid as $n=100$ is not a product of two primes, but can be expressed as $100=2^2 5^2$, if valid is there any criteria for choosing $d$ and other values?
0
votes
0answers
31 views

RSA: security of LSB in The Generic Model of Computation

In this paper Maurer and Aggarwal showed that in generic model of computation breaking RSA is equivalent to factoring. It is also known that the LSB of an encrypted message is as hard as breaking RSA.(...
0
votes
1answer
64 views

Understanding Public key and Private key

I try to understand the private and the public key concept, and need some validation about my statements: If I encrypt a message with public key, I can only decrypt with private key. If I encrypt a ...
6
votes
5answers
1k views

What is the point of digital signatures if confidentiality is violated?

Lets say we use RSA as the signature method. Alice wants to send a message to Bob and uses RSA signing. For that she signs her message with her private key. But everybody could now have access to her ...
0
votes
0answers
25 views

Why Textbook RSA is not enough secure? [duplicate]

As I know, when there are very large prime numbers, it is so hard to factor the n to find primes and I do not get why it is not secure enough?
9
votes
2answers
1k views

How does PKCS 1.5 solve the insecureness of Textbook RSA?

As we know, Textbook RSA is not enough safe to use because of the following issues; Guessable plaintext problem Small $e$ issue I want to know how PKCS 1.5 solved these problems.
1
vote
2answers
66 views

Why is a smaller value preferred for the public key in RSA?

For my practice implementation of the RSA cryptosystem I use a random value generation function such the value of public key e holds: The public exponent $e$ and the modulus $n$ should be $e<\phi(...
0
votes
0answers
18 views

How to decrypt plain text x using man in the middle attack

Suppose Alice want to share a plain text $x = 5$ to Bob; using RSA, DHKE, and El-Gamal. My question is if Man-in-the-middle attack is applied then weather oscar can compute/decrypt plain text in all ...
-2
votes
0answers
50 views

how $C =M^e \bmod N$ can be written as $C = M \cdot k \bmod N$ in RSA algorithm?

how $C =M^e \bmod N$ can be written as $C = M \cdot k \bmod N$ in RSA algorithm? how $M =c^d \bmod N$ can be written as $M = c.k^{-1} \bmod N$ in RSA algorithm?
2
votes
1answer
48 views

How to generate a certificate/PEM from specific plain text keys?

Is there a way to generate a certificate with a pre-stablished public/private plaint text keys? Explaning: I generated some keys on a web site for development propurses, but now one of the parties ...
3
votes
1answer
72 views

How to calculate Public Key exponent if I have p, q, Dp, Dq, QInv? [duplicate]

I have a private key components p, q, Dp, Dq, and QInv. I need to calculate the public key modulus and exponent. Modulus was super simple p*q, but exponent I can't figure out. Have searched all the ...
3
votes
1answer
1k views

RSA: Is it possible to recover the plaintext given that we have the ciphertext and the public key?

The $N$ and ciphertext are huge number that is more than 600 digits long. I'm trying to find the prime factors of $N$ in order to get $p$ and $q$. Using $p$ and $q$ I can get $\phi(n)$. And using $...
0
votes
0answers
24 views

RSA-based encryption scheme and random oracle

I don't really get how this problem should be solved. My main issue is with the random oracle generally, a short explanation of ROs and how they are used in such proofs maybe with this example will ...
1
vote
2answers
84 views

Why does adding PKCS#1 v1.5 padding make RSA encryption non-deterministic?

I'm quite a beginner to cryptography, but have been implementing some encryption according to a specification over the last few weeks using the PyCrypto library. I've discovered that when encrypting ...
1
vote
0answers
61 views

CCA attack on RSA padded with random oracle

I'm trying to do the ex 11.15 of the Katz-Lindell book. Consider the RSA-based encryption scheme in which a user encrypts a message $m ∈ $ {$0, 1$}$^l$ with respect to the public key $(N, e)$ by ...
3
votes
1answer
85 views

Generating RSA signature, by manipulating shorter message signatures?

Given a server that can return me RSA sign for any plaintext shorter or equal length of the given plaintext (excluding the given plaintext), how can I fraud/get the sign of the given? $$sign = M^{d} \...
0
votes
1answer
123 views

What's the best block cipher mode of operation for RSA?

I know that you should never use RSA with any block cipher mode of operation, but theoretically, what's the best block cipher mode (safest) we can use with RSA encryption - without adding any kind of ...
0
votes
0answers
47 views

Verifying valid public key and finding private key? [duplicate]

A naive user of RSA has announced the public key $n = 2903239, e = 5$. Eve has worked out that $n = 1237×2347$. Verify that the public key is valid and explain why the private key is $d = 2319725$. [...