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
3
votes
1answer
149 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 ...
3
votes
2answers
122 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
0answers
66 views

RSA, factoring with middle known bits of one prime?

It was shown by Coppersmith, that we can factor the RSA modulus with half of the most significant bits of one of the primes. And for the lsb case, assume that we known $p_0,k$, and $p=p_12^k+p_0$. ...
3
votes
1answer
93 views

Does choosing N to be product of safe primes avoid William's p+1 factoring attack on RSA?

In this post, I found that choosing RSA modulus $N$ to be product of safe primes avoids Willam's $p + 1$ factoring attack. Suppose $N = p \cdot q$, where $p$, $q$, $(p-1)/2$ and $(q-1)/2$ are primes. ...
1
vote
0answers
1k views

RSA and One-time Password (OTP) service

What is the expert cryptographic opinion on the following? Assume that there is a web server and a Client on web page who calls an OTP ([One-Time Password]) web service on the server which: creates ...
2
votes
2answers
73 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
2answers
185 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, ...
1
vote
1answer
90 views

Can the RSA accumulator scheme be converted to Elliptic Curve math?

Is it possible to translate the RSA accumulator scheme directly to EC without requiring bilinear pairings? In RSA we have: $A_{n+1} = A_n^c$ st. $\{c \: \textrm{prime} \: | \: c \in [\...
7
votes
1answer
663 views

Anonymous trust/reputation system

Suppose there are 3 persons, Alice, Bob and Peter. They are identified by their pseudonyms (public RSA keys). Alice has a key Alice, Bob has ...
2
votes
1answer
113 views

Establish Trust By Signing Random Seed

I'm trying to get my server to establish trust with a client. Neither is on the Internet, so there are no certificate authorities. The typical way to establish trust in my domain is for a client to "...
0
votes
1answer
73 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 ...
0
votes
1answer
39 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: ...
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 ...
-4
votes
0answers
43 views

Carmichael's function (in RSA) big O notation

What are some ways in which we can compute Carmichael's function and what are the corresponding time complexities in big O notation?? Edit: What are some different Java algorithms that we can use to ...
2
votes
1answer
41 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
51 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 ...
15
votes
5answers
3k views

Is there an intuitive explanation as to why only the private key can decrypt a message encrypted with the public key?

I have just learned about using PGP/GPG for email encryption and one thing bugs me: How is it possible that a message encrypted with somebody's public key can be decrypted only with that person's ...
2
votes
1answer
30 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
vote
1answer
138 views

Why RSA2048 sign of Intel accelerate card is fast?

Intel accelerate card This card executes rsa2048 sign 35K ops(operation/second). My fast version is only 100 ops. I can't find any HSM paper that has same performance level. I am interested in this ...
0
votes
0answers
11 views

is it safe to AES encrypt the RSA private key and storing it in the database [migrated]

i'm building an app that really needs encryption of this type , my question is it safe to store the aes encrypted RSA key in the database ? here is how i encrypt the key : i generate a random 256 ...
0
votes
1answer
47 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
32 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
27 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 ...
-2
votes
1answer
75 views

Differences between Gcd and factoring

please can someone explain to me the difference between the following. Using two different numbers I. E one is the rsa key and the other a number working from 2 upwards to work out the Gcd, until the ...
4
votes
4answers
85 views

Does larger key size mean larger data size in asymmetric encryption?

I'm new to cryptography. I know the larger the key size (like 128-bit vs 1024-bit) the harder the ciphertext is to crack, generally. But assuming everything else being equal, does a larger key size ...
0
votes
1answer
50 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 ...
1
vote
1answer
47 views

Security of ciphersuite and key

Is anyone able to cite resources that can be based on choosing a cipher suite? In my case, for a VPN server (OpenVPN) I chose a set of ciphers: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 It provides 128 ...
0
votes
2answers
72 views

Using RSA encryption with OpenSSL library: secure?

I'm working on a small program (in C) that writes encrypted log files, but there are a lot of articles out there that say you should avoid RSA whenever possible. However, most of these articles also ...
0
votes
1answer
86 views

What does it imply if in RSA pow(m, e, n) is same as the m

So, Let's assume we have n which is made up of 2 strong primes which cannot be factored & e which is textbook value of e ...
-2
votes
3answers
83 views

RSA - What to do when message is greater than N [duplicate]

Exmple: $e=3, n=33$ and $d =7$ and Message is $64$.
1
vote
1answer
75 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?
25
votes
5answers
16k views

Why does RSA need p and q to be prime numbers?

Despite having read What makes RSA secure by using prime numbers?, I seek a clarification because I am still struggling to really grasp the underlying concepts of RSA. Specifically, why can't we ...
3
votes
1answer
798 views

Can a public key be same as private key?

As I understand, we choose the public and private keys to be mutual inverses. However, it is possible that, in a group, there can be numbers which are their own inverses. E.g. Consider p = 7, q = 3. n ...
1
vote
1answer
57 views

Computational Complexity: ECC multiplication vs Modular multiplication

How does performing scalar multiplication on an elliptic curve compare to exponentiation in a multiplicative group modulo a prime? I.e. on a given elliptic curve of size $|t|$, what's the complexity ...
0
votes
1answer
37 views

Factorization of the public value $N$ from the RSA cryptosystem

It is mentioned here that the public value $N=p*q$ of the RSA cryptosystem can be factorized if one of the factors is reused. Thus, if $N_1=p*q_1$ and $N_2=p*q_2$ and only $N_1$ and $N_2$ are known, ...
11
votes
2answers
13k views

Using ECB as RSA encryption mode when encrypted messages are unique?

As I understand, ECB should not be used as encryption mode unless you are encrypting single blocks of data which are always unique and only are encrypted once. I have a collection of ids represented ...
1
vote
0answers
56 views

Fermat's little theorem in RSA with CRT

I have a question about the calculation of RSA decryption with the help of the CRT (Chinese Remainder Theorem). If $c$ is the crytogram, $m$ the message, $d$ the private key and $p, q$ the primes. ...
2
votes
2answers
722 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 ...
0
votes
1answer
105 views

Could a quantum computer recover files from ransomware if the attacker doubly encrypted them with RSA-4096?

How would a quantum computer decrypt a file (or find the keys to such a file) if it were encrypted with standard RSA 4096 encryption, but encrypted two times with different keys? The keys are known by ...
1
vote
3answers
181 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 ...
103
votes
7answers
61k 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 ...
0
votes
1answer
68 views

Can we estimate the amount of entropy required to generate an RSA key?

Of say 4096 bits as is a default GPG master key. I can manage the first one or so almost immediately on Ubuntu. It then runs out of entropy when generating several more RSA keys, and I'm forced ...
-2
votes
1answer
97 views

Are there any flaws in this pseudocode?

I'm developing an algorithm that cracks small RSA keys (And theoretically bigg ones too, though might take some time), and was wondering if anyone you spot any flaws in this python code: ...
4
votes
3answers
810 views

Is it possible that two distinct RSA moduli share both of their prime factors?

I am using an algorithm (can be found here1) that can compute efficiently the GCD of multiple RSA keys. It intended for RSA keys that were generated with low entropy and may have one of their primes ...
3
votes
1answer
1k views

In which public key encryption algorithms are the private and public key not reversible?

The RSA public key encryption system has the characteristic that the public key and the private key can be reversed. That is, information encrypted with the public key can be decrypted with the ...
0
votes
0answers
46 views

Encryption/Decryption on multiple users using RSA?

Supposing I have Alice that is the RA, Bob (who is a user) and Kate (who is also a user). For now I use RSA. Alice sends a message to Bob. Alice also sends a message to Kate. Bob and Kate exchange ...
0
votes
0answers
30 views

Alternate to distributing master key to every user in circle of trust

I am designing an end-to-end encrypted file storage system where only the user should be able to access their own data. The best I could come up with is a system designed around a master key that is ...
9
votes
4answers
6k views

Why do we need Euler's totient function $\varphi(N)$ in RSA?

After we calculated $N = p * q$, we calculate $\varphi(N)$ and use it later to determine $e$ (PR) and $d$ (PU). But why? For decryption and encryption we only use $N$ and don't need $\varphi(N)$. So ...
2
votes
1answer
68 views

Is there an equivalent to an RSA UFO in lattice-based cryptography?

So there's this concept within the realm of RSA cryptography called an RSA UFO. It is an extremely important function in the context of cryptocurrency. When starting up a cryptocurrency the creator(s) ...
1
vote
1answer
76 views

What encryption shoud I use for single char encryption?

I'm very new to encryption and I wanted to know if it is secure or just possible to use encryption on single chars. I did some research, but nothing to clear and i'm a bit confused. The modes I think ...