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 with proper paddings.

Filter by
Sorted by
Tagged with
2
votes
1answer
92 views

Create a ciphertext that decrypt to different plaintexts with different keys in RSA

(This is inspired by this question 1; have also read this question 2 but it's one-time pad) I would like to know, given two message $m_1$ and $m_2$, as well as public keys $(e,n_1)$ and $(e,n_2)$, ...
2
votes
1answer
3k views

How to create a PEM file for storing an RSA key?

I have an RSA private key $\{d,n\}$ and a public key $\{e,n\}$, where $n$ is the modulus, and I also have the prime factors $p$ and $q$ of $n$. I want to create a PEM file containing this information,...
2
votes
1answer
90 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 ...
1
vote
1answer
38 views

RSA signing - does EMSA-PKCS1-v1_5 padding need to be verified?

I am working with an embedded system that accepts firmware updates only if they are validly signed by a particular 2048-bit RSA private key (the embedded system's bootloader knows the corresponding ...
1
vote
0answers
20 views

How to design a moderated, group for private messages?

I’m trying to figure out how I could create a private group that was P2P yet still allowed someone to moderate members (no public access to messages). I’m assuming standard hybrid encryption (RSA/EC + ...
1
vote
0answers
21 views

Help with next step in the Quadratic Sieve

So I am at the same step as someone from math.stackexchange but he never recieved an answer so I will copy-paste his question here: Say, for N = 90283, I compute bound 𝐵=𝑒(12+𝑜(1))(ln(𝑛)ln(ln𝑛√))...
1
vote
3answers
170 views

Negotiate a secure connection without certificates?

I would like to have a simple experience for a user for setting up a secure connection between two computers against a MITM attack. Something like the following: A number (possibly base64) appears ...
30
votes
4answers
4k views

The GCD strikes back to RSA in 2019 - Good randomness is the only solution?

When someone collects lots of RSA public modulus, the first thing comes to mind is; $$\text{GCD them all}$$ If you calculate the GCD of two different RSA modulus and if the result is not 1 then you ...
1
vote
3answers
970 views

two public keys with same passphrase insecure? | can two hashes be compared?

Suppose someone had generated a 2.048-Bit RSA GPG/PGP key pair and published the public key on the usual key servers. Then he withdraws this key and generates a new one in 4.096-Bit RSA using the same ...
4
votes
2answers
4k views

Openssl & RSA : how many public exponents are possible?

I would like to know if it is possible to set the public exponent we want with "OpenSSL RSA" or if it is really limited to 2 possible exponents: 3 65537 If yes, why ?
8
votes
1answer
789 views

The 9 lives of Bleichenbacher's CAT, it puts another scratch again

Bleichenbacher demonstrated a padding oracle attack against RSA implementations that follow the PKCS #1 v1.5. Through the years, there are various mitigation techniques developed as OAEP and limiting ...
1
vote
1answer
165 views

Large Volumes of Asymmetric Encryption

First of all, I apologize in advance if I use any incorrect terminology. I am just getting my feet wet when it comes to cryptography and there is a lot to learn. For the past 12 months, we have been ...
3
votes
2answers
99 views

Is the RSA cipher alike to the Shift/Caesar cipher?

I'm sort of a beginner on cryptography so this is probably a really elementary question. I only know the historic ciphers and the general background on cryptography as well as it's general meaning. I'...
0
votes
0answers
31 views

Is encrypting data with AES-CTR-128 and keys with RSA-2048 secure?

Here's a question. I have a file that have to be encrypted with strong cipher (I've choosen AES-CTR-128). I'm using MVC 2019 to compile C++ program. Firstly, I create RSA-2048 key pair (public and ...
0
votes
2answers
65 views

RSA p and q size to encipher a block

I have a plaintext about 18 bit size. I have to encipher it using RSA. How large have to be p and q? So M (message to encipher) = 2**18 bit I tried, using a Python coded RSA alghoritm, different sizes ...
0
votes
1answer
74 views

Problem with calculating the correct value for $(p-1)*(q-1)$?

I came to a problem when calculating some values for RSA encryption task. So the data I have is this: $e*d=81$ $C=5$ Now I have to calculate the original message($m$) and I have an issue because I ...
1
vote
2answers
63 views

Secure implementation of public key cryptography

Reading online I've found out that for example the RSA implementation that you usually find on textook is not secure. Where I can find some secure implementation of algorithm such as RSA, ECDH, ECDSA? ...
0
votes
1answer
53 views

RSA: How to compute plaintexts knowing ciphertexts, public key and relation between plaintexts

I'm trying to solve an exercise where you have to compute two plaintexts $p_1$ and $p_2$, knowing the corresponding ciphertexts $c_1$ and $c_2$ and the public key, of which $e=3$, and $n$ is a large ...
1
vote
1answer
86 views

Using RSA public key as private key and vice-versa

I am writing an application that involves checking to see if data has been created by me. I do this by encrypting the data with the private key on my server, and then decrypting it using the public ...
3
votes
2answers
680 views

Is direct RSA encryption of AES keys secure?

I am wondering: If we take this scheme/procedure and each of it seems very secure (to me at least), is it truly secure or is there a vulnerability hidden in the process? This is the scheme: Bob has ...
4
votes
2answers
279 views

Inclusion and Exclusion proofs in RSA accumulators

I am reading about RSA accumulators from this video and few other sources. I had a confusion whether the complete set is needed to construct a proof of inclusion/exclusion in an RSA accumulator or is ...
3
votes
1answer
90 views

RSA Accumulators with auxiliary information or known trapdoor information

In "Universal Accumulators with Efficient Nonmembership Proofs" by Jiangtao Li1, Ninghui Li2, and Rui Xue3 section "How to compute witness with the auxiliary information" the authors write: "The ...
0
votes
0answers
20 views

Nonmembership and membership witness in universal accumulator

I am trying to understand cryptographic accumulator and I dont exactly the definition of universal accumulators.I found a definition with its properties in "Universal Accumulators with Efficient ...
-2
votes
1answer
84 views

RSA - Compute signature

I have a question in (textbook) RSA. Suppose we have two public keys $pk_1=(e_1,N)$ and $pk_2=(e_2,N)$ (with $\gcd(e_1,e_2) = 1$). Assume that there are $\sigma$,$\sigma'$ such that $\sigma$ and $\...
0
votes
1answer
33 views

Not Using RSA In OT1/2 Oblivious Transfer?

I was reading Oblivious Transfer (Wikipedia) and the 1-2 oblivious transfer. I was confused why RSA was needed. Why wouldn't this work?: A:m1, m0 A:x1, x2 -> B B:k, b B:Xb+k -> v -> A A:Xb+k-X1, ...
3
votes
1answer
165 views

RSA: If the least significant bits of the factors are leaked, what advantage is there in factoring N?

For $N=pq$, if the first $x$ least significant bits of both $p$ and $q$ are leaked. what is the advantage in factoring $N$? Does this give an advantage beyond simply lowering the number of bits we ...
3
votes
2answers
77 views

Multiple (RSA) public key encryption how to verify others received the same information? Non-deterministic encryption

I have an RSA system between multiple parties. Alice takes the targets (Bob and Oliver) public keys and encrypts a message using them and sends it to them. All parties know each other's public keys ...
2
votes
1answer
62 views

Which padding is used for sha256WithRSAEncryption (1.2.840.113549.1.1.11), deterministic or random?

Questions Is the only way to know which padding was used is to know the context of how sha256WithRSAEncryption was used (that PS is 0xFF when signing, and random non-zero when encrypting)? Is there ...
1
vote
1answer
110 views

RSA algorithm, relationship of the plaintext $m$ with $p$

I am studying the RSA algorithm. If for example the plaintext $m$ has some relationship with prime $p$, let's say $m$ is multiple of $p$ (where $p$ is the $p$ in $n=p \times q$). Can this give an ...
2
votes
3answers
690 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 ...
0
votes
0answers
28 views

Server stored, encypted messaging app

For my personal research, I have to create a messaging app, but security is only important part of application, security from MITM (man in the middle attack), at device end, and at server level. (note:...
1
vote
1answer
121 views

My RSA decryption doesnt match answer

Break the RSA code whose key is $(n, e) = (8369428283, 1234567)$. Find the deciphering key and then decipher the message under the assumption that the plaintext consists of 7-letter blocks in the ...
109
votes
7answers
64k views

How big an RSA key is considered secure today?

I think 1024 bit RSA keys were considered secure ~5 years ago, but I assume that's not true anymore. Can 2048 or 4096 keys still be relied upon, or have we gained too much computing power in the ...
2
votes
1answer
100 views

Finding a pair of exponents so that $c^a \bmod N = c^b \bmod N$

I am not very familiar with RSA, so this question may appear to be stupid. Suppose that in RSA encryption, we are given $c$ (the ciphertext) and $N$ (the semi-prime modulus), can we find a pair of ...
1
vote
1answer
70 views

Elliptic Curve vs RSA key length comparison

I'm new to ECC. From this website (GlobalSign Elliptic Curve Cryptography) a 256 elliptic curve key pair provides as much security as a 3072 bit RSA key pair. My question is: how do experts come to ...
1
vote
0answers
68 views

How does RSA encrypt a message? Are the message packets chained together?

This question is quite related to this one, but I am looking for more details. I am writing a very basic implementation to demonstrate how RSA works. My current implementation generates key pairs ...
0
votes
0answers
22 views

How to rotate keys for plaintext in DB encrypted by RSA?

I have encrypted plaintext with an RSA public key. It is stored in a database. This public key will be encrypted by another key with a different encryption algorithm. What does key rotation look like ...
18
votes
2answers
2k views

lcm versus phi in RSA

In textbook RSA, the Euler $\varphi$ function $$\varphi(pq) = (p-1)(q-1)$$ is used to define the private exponent $d$. On the other hand, real-world cryptographic specifications require the Carmichael ...
0
votes
1answer
48 views

In RSA encryption, can I calculate d given only m,n,c and e? [duplicate]

Newbie here. Not familiar with cryptography; just interested and reading up about it from time to time. We know that the RSA problem (let's say $c=m^e \bmod N, c^d= m \bmod N$) is about recovering $...
3
votes
2answers
5k views

How to factor an RSA256 public key with YAFU?

(Layman's terms please, I'm just a kid stuck on a puzzle) I'm trying to factor the following RSA256 public key to find the corresponding private key: ...
1
vote
3answers
3k views

Method to calculating e in RSA

For simplicity I choose two small primes for p and q. p=3 q=11 n=33 Φ(n)=20 Now we need ...
2
votes
1answer
39 views

Do I have to know RSA padding scheme in advance when verifying signature with EVP_Verify*?

Is there a way to figure out what RSA padding type was used on signature during verification (when calling EVP_VerifyInit, EVP_VerifyUpdate and EVP_VerifyFinal) or is it a matter of convention which ...
4
votes
2answers
411 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 ...
-1
votes
1answer
49 views

How to calculate base value in modular exponentiation

If you have $a^b \bmod n = c$, and $b,n,$ and $c$ values are given, is it possible to find a value for $a$ within a given range? So is it possible to find $a$ in $a^{2051} \bmod 3149=636$ knowing a ...
2
votes
1answer
53 views

Modification of RSA using two inverses, one for P mod (Q-1) and one for Q mode (P-1), instead of inverse d mod [(p-1)(q-1)], more or less secure?

Lets say I have the following modified RSA scheme We choose two large primes P, Q, with additional restriction that these are relatively prime to (p-1) and (q-1) We choose N = PQ as public key We ...
2
votes
4answers
372 views

Is it more weak to encrypt with the private key RSA?

I have a simple question. Is it more weak to encrypt with the private key against the public key with RSA ? Like is it easier to "crack", "brake", "solve", "decrypt" when I encrypt with the private ...
3
votes
1answer
99 views

Forgery against signature using RSAES-PKCS1-v1_5 padding

I wonder what is the security of RSAES-PKCS1-v1_5 under chosen-plaintext attack, in the context of signature verification. Notations. Let $(N,d)$ be an RSA signing key, and $(N,e)$ the corresponding ...
1
vote
0answers
26 views

Verify XML digital signature

I'm trying to figure out how to verify an XML digital signature. I have received a signed XML response (in string) in following format: ...
1
vote
1answer
75 views

Why aren't Diffie Hellman public keys used for authentication?

So I have been reading about Diffie Hellman and specifically the MitM attacks that it is vulnerable to. I am aware that these are solved currently in ssl for instance by using rsa signatures to ...
2
votes
1answer
81 views

Msieve & Yafu - RSA Exponents and bruteforcing

I am a layman in regards to the math behind RSA (and in general, relatively), and my goal is to bruteforce a large quantity of 512-bit RSA keys. Having searched around, I see that msieve, yafu, and an ...