The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

RSA given p,q,n,c1,c2,e1,e2

I am given the p,q,n,c1,c2,e1,e2 values for an RSA key, along with an encrypted message. Here are those values: ...
0
votes
0answers
29 views

What Chaining Mode to use with RSA? (CNG's BCrypt)

I'm trying to make my first RSA encryption/decryption using CNG. In 1 part of the example they add pick a chaining mode, I don't know if this is mandatory and when I tried to google about it I found ...
0
votes
1answer
27 views

Combine signature with encryption

I have some embedded device for which I want to sign and encrypt firmware files. Firmware updates are generated by me and may be installed by the customer. The encryption is supposed to protect the ...
1
vote
1answer
85 views

Why does RSA need two prime numbers?

I'm having a hard time understanding the purpose of having two primes $p,q$ for RSA to work. To illustrate my point, imagine only one prime ($p$) is used. Alice, the encryptor, can take the public ...
0
votes
0answers
26 views

There are 3 factors in RSA [duplicate]

A Variant RSA. $n$ has 3 factors $p,q,r$. $\gcd(e,\phi(n))=1$, can decrypt it like normal RSA,or should use chinese remainder theory to decrypt it?
2
votes
1answer
198 views

Decrypting Multi-Prime RSA with e, N, and factors of N given

I was wondering if there was any way to compute the private key $d$ when knowing only $e$ and $N$, and being able to factor $N$ as 4 prime numbers $p, q, r$ and $s$. I've been searching for days and I ...
0
votes
0answers
5 views

Sign Verify problem by provider in JCA [migrated]

I'm trying to sign and verify my data with SHA256withRSA,MD2withRSA,SHA1withRSA,SHA512withRSA modes. My provider supports all of them but, just MD2 mode works for my code. Other ones does not work, ...
-1
votes
0answers
57 views

In RSA, how do you find d with a very large e?

If I had N and E, how would I be able to find D? The catch here is E is extremely large -> like 310 digits. I think this set of numbers is vunerable because E should be relatively small. How can I ...
0
votes
1answer
31 views

RSA PKCS#1 v.15 Signature verification computational complexity explanation? [duplicate]

I've been experimenting with MBEDTLS on an ARM-M4 (but this question is not platform-specific) and am confused/surprised regarding the computational complexity (execution time) of ...
4
votes
1answer
182 views

When is factoring semi-primes thought to be hard?

In Lattice Cryptography, problems like LWE or SIS have relatively easy to specify distributions that are thought to be average case hard. I'm curious what specific distributions on semi-primes $(p,q)$ ...
0
votes
1answer
62 views

Using an integer ring with RSA

I'm new to RSA and instead of using RSA to encrypt a symmetric encryption key to encrypt data with (although it might help to understand) I would like to use an integer ring with RSA. My question is ...
0
votes
4answers
241 views

Why is RSA secure if I can solve the equations for it using a math solver?

To factorize N = p * q with p < q e (p-2) mod 9 = 0, there are a set of equations. These equations can be put into any popular math solver, in order to gain access to the primes p and q. For ...
3
votes
2answers
113 views

Why is RSA encryption performed in mod n, but computation of inverse in $\bmod \varphi(n)$

I am studying the principles of RSA and have come across some unintuitive statements. Lets revisit the RSA algorithm: RSA Key Generation Output: public key: $k_{pub} = (n,e)$ and private key: $k_{pr}...
2
votes
2answers
340 views

What is the efficiency of the new Crown Sterling semiprime factoring method?

In their press release a company called Crown Sterling describes they are working a paper that includes four different geometric and arithmetic methods for public key (semiprime) factorization and ...
3
votes
1answer
95 views

Providing forward secrecy with RSA

Forward secrecy with RSA is asked here: Is perfect-forward secrecy achieved with RSA? and fgrieu gave an answer based on creating temporary RSA keys and signing them. And, in the end, he mentions ...
1
vote
1answer
81 views

Calculate d for RSA

I'm trying to calculate $d$. I have the following parameters given: $p = 239$ $q = 181$ $n = p \times q = 43259$ $\phi(n) = (p - 1) \times (q - 1) = 42840$ $e = 11$ For calculating $d$ I use the ...
0
votes
1answer
40 views

Optimising shor's algorithm [closed]

So I've run into this challenge where I was given the guess $g$, and the power $p$ of Shor's algorithm. All I have to do now is $g^{p/2} - 1$ and then GCD the result with n. But the problem is ...
0
votes
0answers
12 views

Why does mbedtls_rsa_rsaes_pkcs1_v15_encrypt() to make wrong encryption? [migrated]

I use mbedtls library for my small crypto application. mbedtls API has this function: ...
1
vote
0answers
43 views

RSA congruence (n is not given) [closed]

it might be a silly question but i need help please given RSA system , where $n=pq , p\ and \ q \ are \ primes $ , $ v_0,v_1,v_2, v_3 \ are \ known $ $p^p \equiv v_0 \mod q$ $q^q \equiv v_1 ...
1
vote
2answers
49 views

RSA-CRT exponent reduction

In the implementation of RSA-CRT, the exponent d is reduced mod p-1 ($d_p = d \bmod {(p-1)}$). The only proof I've found for that, is the following (considering $d = k\varphi(p) + d \bmod {\varphi(p)}$...
1
vote
2answers
76 views

Hybrid cryptosystem

I'm using RSA (4096) and AES GCM (256) to exchange messages between A and B. A random key for AES is generated, the plain message is encrypted with AES, and the random AES key is encrypted with Bs ...
1
vote
0answers
32 views

RSA Modulus doesn't match the primes [closed]

I generated a 2048-bit RSA key with ssh-keygen. When running: openssl rsa -in key -noout -text The result is: ...
2
votes
1answer
67 views

Does RSA key transmit with OAEP insecure?

In the Key encapsulation article of Wikipedia, the RSA-KEM is described shortly, as follows; Generate a random element $1<m<n$ then drive your symmetric key by $M=\text{KDF}(m)$ Then compute ...
2
votes
1answer
95 views

What is Reverse Trapdoor Function?

In wikipedia on Digital_signature: but rather, the message to be signed is first hashed to produce a short digest, that is then padded to larger width comparable to N, then signed with the ...
0
votes
1answer
69 views

What is a method for hiding RSA prime values from .exe De-Compiling?

I've just been looking into RSA encryption with C++ and am wanting to make a program that can en/decrypt files of my own custom file extension. Obviously I need to choose two primes numbers (for my p ...
0
votes
1answer
78 views

Is modulus a prime number important for non-symmetric cryptology?

From this link Generation of a cyclic group of prime order we know how to generate a prime order group. This illustrates why a prime order group is important. But why is modulus a prime number ...
1
vote
0answers
29 views

Private evaluation public quick verification VDF

Does anyone know of any VDF, that can be calculated by someone holding some private key in t sequential steps and is quickly verifiable in exponentially reduced step by anyone using some public key ...
0
votes
0answers
26 views

Relationship between special RSA modulus and quadratic residue in CL (Camenisch-Lysyanskaya) signature

I'm studying the CL(Camenisch-Lysyanskaya) signature (A signature scheme with efficient protocol proposed by Camenisch-Lysyanskaya). However, I cannot understand ...
1
vote
0answers
38 views

Manually (mathematically) signing and verifiying a file using RSA [Solved] [closed]

It is only recently that I entered cyber security field.. and one of the main foundations is nothing but Cryptography. Something which always fascinated me was the 'Chain of Trust' which is holding on ...
0
votes
1answer
79 views

Why does RSASSA-PSS produce different signature each time even if I use same salt and same message?

I understand that RSASSA-PSS is not deterministic. But I see that in message encoding, MGF and SHA functions are deterministic. So even if I keep default salt length, it produces different signature. ...
1
vote
1answer
37 views

Size of Key Material of TLS_DHE_RSA_WITH_AES_256_CBC_SHA

What is the size of key material required for generating MAC keys, encryption keys and IV when use TLS_DHE_RSA_WITH_AES_256_CBC_SHA ? How to calculate it?
2
votes
1answer
49 views

Can Paillier ,RSA or any other schemes be used for universal re-encryption like elGamal?

ElGamal, RSA, and Paillier cryptosystem have homomorphic property, and can be used fro re-encryption purposes. I want to use the encryption to re-encrypt ciphertext(as in proxy re-encryption but ...
4
votes
1answer
434 views

Potential Coppersmith's attack on RSA

Sorry if I don't express myself well in English. The solutions $h$ and $k$ of $$[(h+1)^2]*[(2*h+2)^2/2-1]=X* M$$ and $$[(k+1)^2]*[(2*k+2)^2/2-1]=Y*M$$ are such that each $M$ number divisible by $...
1
vote
1answer
50 views

RSA-FDH Signature Scheme EUF-CMA

I am aware of attacks whereby an attacker is able to forge a message IF the hash of the original message is the same hash as their current message. The question is, is it still possible for RSA-FDH to ...
0
votes
1answer
48 views

How re-encryption can be done through RSA

Both RSA and Elgamal have homomorphic properties. So both can re-encrypt the ciphertext. Re-encryption with Elgamal works as seen here. How does re-encryption work using RSA? What modification / ...
0
votes
0answers
39 views

1-out-of-2 Oblivious Transfer Security

Just started reading Oblivious Transfer. I am searching for a proof of security based on RSA implementation but I can't find anything simple to understand. Can someone direct/show me to an easy to ...
3
votes
2answers
155 views

Why does square root $\pmod n$ find $p$ and $q$ (as $n = p \cdot q$)?

Let $n = p*q$, with $p \neq q$ and $x^2=1 \pmod n$, $x+1 \neq 0 \pmod n, x-1 \neq 0 \pmod n$ (So x is a non-trivial square root mod n.) I don't see how $\gcd(x+1,n) \in \{p,q\}$ follows. I ...
3
votes
2answers
109 views

Attack on security model for RSA-FDH

I recently read in Cryptography textbooks and online videos that compared to Textbook RSA which is insecure against Chosen Plaintext Attacks (CPA) and Chosen Ciphertext Attacks (CCA), RSA-FDH is ...
3
votes
1answer
171 views

Decrypting arbitrary numbers with RSA

I want to construct a hash-chain where I want to share millions of small AES-128 keys with Bob over a period of time. Bob should not be able to predict the future keys if he knows the past keys. I ...
0
votes
1answer
91 views

How to decide whether to use digital signature (RSA) or HMAC

I found multiple posts regarding the differences between HMAC and RSA. Why should I prefer one or the other? These are some examples: HMAC SHA256 vs RSA SHA256 - which one to use What are the ...
1
vote
1answer
26 views

Signing a binary hash vs character representation of the same hash

I have a hash that I want to sign, with the hexadecimal representation: hash_bin=0x11223344 (length 4 bytes). The same hash also has a character representation hash_text=”11223344”, which is the ...
0
votes
1answer
43 views

Validating JWT works with small changes to public key, why?

I was trying to verify the following JWT on JWT.io with the following public key: ...
3
votes
2answers
202 views

Is this toy RSA demonstration flawed?

I want to present the basics of how RSA works to an audience of beginners in cryptography. The problem is that I am lightyears from being an expert. After reading about how RSA works in wikipedia, ...
2
votes
1answer
49 views

Understanding need for PKI

For simplicity let's say I only have RSA and AES on my hands and I want Alice to talk with Bob over a secure channel. With secure I am implying no MITM and Alice and Bob know they are talking to each ...
0
votes
1answer
53 views

Security of RSA public key depending on how it's computed [duplicate]

I understand that the public key in RSA encryption may be computed using Euler's totient function or Carmichael's totient function. I'm now trying to figure out how the choice of totient function ...
2
votes
1answer
92 views

Recommended key size for DKIM

What is the recommended key length for DKIM? I'm currently thinking about a 1024-bit key vs. a 2048-bit one. From the crypto point of view for RSA, 2048 or 4096 bits is clearly recommended--no ...
0
votes
1answer
50 views

Make AES CBC more secure by destroying each block? [duplicate]

Assume AES in CBC mode is used to encrypt an arbitrary file. The key and the IV are generated out of secure random data and are both different for each file and of proper length and strength. Then the ...
1
vote
0answers
33 views

Is there any rules for choosing the two primes that's used in generating RSA keys? [duplicate]

So I want to ask is there any rules for choosing the two primes that's used to generaten in RSA? I mean clearly you can't choose 2 and another super big number, so ...
1
vote
0answers
28 views

Precise Definition of 1-out-of-2 Oblivious Transfer

What's the precise definition for 1-out-of-2 OT? and what's the best way to show that it can't be achieved under unconditionally secure setting? I am reading about it and just couldn't get my head ...
0
votes
1answer
54 views

How to calculate M when the attacker know e and w [closed]

Alice has a pair of RSA keys, the public key is $(n,e)$, the clear text message $M$ and the ciphertext $C=M^e \pmod n$. We suppose that Bob wants to encrypt two successive messages and send them to ...