Skip to main content

# 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.

2,800 questions
Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

### Threshold signature scheme for centralized group broadcast

I am looking for a threshold signature scheme (or similar proposals are happily accepted) that suits the following scenario: One Base Station is transmitting signed broadcast message to all members in ...
• 101
8 votes
1 answer
3k views

### Are RSA signatures distinguishable from random data?

In the spirit of Are curve secp256k1 ECDSA signatures distinguishable from random data? Are RSA signatures distinguishable from random data? What if you don't know the message? What if you have many ...
• 189
0 votes
1 answer
235 views

### Encrypting large files using RSA and AES-256-CBC-HMAC-SHA256

I developed an application that stores large files. Those files are stored in plain text. Now the project owner wants those files be encrypted on storage, he wants confidentiality, integrity, and ...
• 101
0 votes
1 answer
132 views

### Is there a benefit in cryptography to return 0 in square and mutliply algorithm when a modulo is 0?

When a modulo is 0, the result of squaring or multiplying modulo will always be 0 as well. Therefore the loop could break and return 0. It can be a mean to compute faster the result of square and ...
0 votes
1 answer
104 views

### Looking for a modifiable signature!

I am a graduate student and have encountered some problems in my research. When I generate a signature on the data block of the file, and the signature is composed of the user's private key, the data ...
0 votes
1 answer
51 views

• 142k
2 votes
2 answers
307 views

### RSA: Is padding necessary for key exchange?

When RSA is strictly used to exchange random shared secrets, is the padding scheme important for security or can it be omitted entirely? The party in possession of an RSA public key will generate ...
0 votes
1 answer
148 views

### Is a prime shifting method for RSA modulus generation safe?

I have a prime number, $p$, with $n$ bits. To generate a new prime number, $q$, I shift the bits of $p$ from left to right by a certain length. For example, if $p$ is represented as ...
• 497
2 votes
1 answer
104 views

### 1-out-of-2 Oblivious Transfer with RSA

I'm trying to implement a simple 1-out-of-2 Oblivious Transfer with RSA. I was checking the code and tried to work it step by step. The 2 messages by Alice, let's say, are $m_0 = 7$ and $m_1 = 9$. Bob'...
• 21
3 votes
2 answers
562 views

### RSA perfect square phi

So I've been learning about RSA for quite a while (mainly by playing around in CTF competitions) and I came across an interesting problem. The other day I was looking to create a challenge in which I ...
0 votes
2 answers
108 views

### Cannot get RSA encrypt and decrypt to work in hardware and online calculator

I am attempting to get a hardware implementation of RSA working but I am having trouble with encryption and decryption. First, I ran these commands to generate the keys: openssl genrsa -out private-...
2 votes
2 answers
812 views

### In RFC 2313 (PKCS1/RSA) said you could recreate the Private key from 'n' and 'd', which later versions removed. Why?

RFC 2313 has this specific callout: ...
• 123
0 votes
1 answer
149 views

### Possible to encrypt message without knowing recipient public key?

Assume Bob is sender and Alice is future recipient. In ideal situation Bob know Alice public key, and encrypt message with it. But what if Bob don't know Alice public key (he only will know Alice ...
0 votes
1 answer
95 views

0 votes
2 answers
381 views

### Are Safe and Sophie Germain primes evenly distributed?

Do Safe and Sophie Germain primes maintain a relatively stable distribution as numbers get larger, or do they become rarified beyond a predictable value? This is important in one area of triangular ...
3 votes
3 answers
437 views

...
• 59
0 votes
0 answers
81 views

### Textbook RSA on random numbers mod a smaller prime

I have a protocol where I have a random one-time number message $m \in \mathbb{Z}_p$, where $p$ is a 256 bit prime from an Elliptic Curve (EDIT: The order of an elliptic curve prime order group). I ...
• 313
2 votes
1 answer
264 views

### Is there an algebra group (or ring) in which computing the inverse element is hard without some trapdoor information?

Specifically, I want an algebra group $G$ (or ring $R$) features: Given elements $g,h\in G$ (or $R$ ), computing $g\cdot h \in G$ (or $R$ ) is easy. Given an element $g \in G$ (or $R$ ), finding the ...
• 392
0 votes
0 answers
652 views

### How to create RSASSA-PSS keys using openssl?

I am trying to understand the RSASSA-PSS and process of generating keys with rsassaPss. I am using below ...
• 109
0 votes
0 answers
69 views

### How to find modulus and decrypt a message with a CPA on textbook RSA. The encryption oracle only allows two queries

The encryption oracle only allows you to encrypt a custom message $m$ or the secret message $m_s$. In both cases it asks you to choose a public exponent $e>16$. Of course, $n$, is not available. If ...
1 vote
1 answer
82 views

### Is gcd(e,p−1)=1=gcd(e,q−1) similar to gcd(e,phi(n))=1?

I wonder, is $\gcd(e,p−1)=1=\gcd(e,q−1)$ similar to $\gcd(e,\phi(n))=1$ ??
• 11
3 votes
1 answer
240 views

### RSA/ ECC keygen HW vs SW

i have a pretty straightforward question but i can’t seem to find an answer : Regardless of the physical protection provided by an HSM or TPM or any hardware cryptographic key storage system, are keys ...
• 51
0 votes
0 answers
50 views

### In RSA Encryption, Can I choose the public exponent e > m (modulus) ? or e > φ(n)? [duplicate]

In RSA ,the encryption, Can we choose the public exponent (e) greater than m (modulus) or e > φ(n) ? I wonder about choosing public key exponents (e) because the most information on the internet or ...
• 11
3 votes
1 answer
139 views

### How much can we compress RSA public keys with two equal size factors?

Can we define an RSA variant in which the public key with $n$-bit public modulus $N$ has a compact representation of $\kappa\ll n/2$ bits, with a security argument that it is as safe as regular RSA ...
• 142k
4 votes
1 answer
176 views

### Is this new bound for Wiener Attack well accepted?

I found this recent paper The Wiener Attack on RSA Revisited: A Quest for the Exact Bound, which reported a new bound $d\le \frac 1 {\sqrt[4]{18}} N^\frac 1 4$. Is this well accepted in the ...
• 159
0 votes
0 answers
54 views

### In RSA Encryption, Can the public exponent e > m (modulus) ? and can we choose any public key without paying attention to the conditions? [duplicate]

In RSA ,the encryption, Can we choose the public exponent (e) greater than m (modulus) or e > φ(n) ? I wonder about choosing public key exponents (e) because the most information on the internet or ...
• 11
10 votes
5 answers
2k views

### Best cryptographic algo with asymmetric cost: expensive to sign, cheap to validate

I'm looking to prevent a DDoS attack on a web service, by making the cost of performing an attack prohibitive. Typical users will only need to call out it once a day, and can afford to spend a few CPU ...
• 203
1 vote
1 answer
211 views

### Cryptography to tackle deepfake, proving the photo is original

Deepfake technology has become very difficult to tackle due to sophisticated machine learning algorithms. Now, even when a journalist or bystander provides photo or video evidence, the culprit denies ...
• 111
0 votes
0 answers
33 views

### RSA derivation of ed=1 mod(ϕ(n)) [duplicate]

I know that $m =m^{ed} \bmod n$, and there is Euler's $a^{\varphi(n)} = 1 \bmod n$, but how do we derive that $ed=1 \bmod(\varphi(n))$ holds for all m. Where does that equality come from? Couldn't ...
0 votes
2 answers
596 views

### Best cryptographic method to distribute license files

I will describe my problem high-level, and not ask a very specific cryptographic question, since I am open for general suggestions as well. So in my question I will only speak about "security ...
• 123
0 votes
2 answers
131 views

### Is signature same as hash value encrypted with the private key in openssl?

Computing the signature of hello.txt file which has the text hello in it, here is done in two steps: ...
1 vote
0 answers
96 views

### Is there any harm using a pseudo-prime endorsed by a probablistic test like Miller-Rabin in RSA?

In RSA, the decryption exponent $d$ is typically calculated as $$d= e^{-1} \bmod{(p-1)(q-1)}$$ or $$d = e^{-1} \bmod \operatorname{lcm}{(p-1, q-1)}$$ where $p$ and $q$ are often randomly selected ...
• 9,422
2 votes
1 answer
138 views

### Operands size in RSA Cryptography (C language)

I am trying to implement the RSA cryptography algorithm using C language. I am not sure of the size that each operand should have. Let me explain: RSA requires to generate two huge prime numbers p and ...
• 147
1 vote
0 answers
29 views

### Curious behavior of EVP_DigestSign for DKIM

Difficulties porting code to OpenSSL 3 may raise some doubts on digest signing. Before version 3 came, digest signing was the only way to use ED25519. On version 3, RSA_sign() being deprecated, I ...
• 111
0 votes
1 answer
271 views

• 123