# Tagged Questions

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.

217 views

### How to calculate RSA CRT parameters from public key and private exponent

Given the public key (n, e) and private exponent (d), how to calculate CRT parameters (p, q, dP, dQ, and qInv) of this RSA key pair?
992 views

### Using ECB as RSA encryption mode, but 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 ...
546 views

### RSA with probable primes

I am a bit of a newbie to RSA encryption, so please be patient. I understand that for a 4096 bit RSA, the numbers p and q should be prime. And to have the best security, the p and q should both be ...
75 views

### one-way deterministic hash for low entropy input?

My problem is the following: we have a low entropy data called ID. (personal id number of 10 decimal digits plus a sum, and it contains a date) We want to create a data (H) which is the same for the ...
124 views

### Can i get a list of over hard and long RSA keys? i think i have found a vulnerability in RSA Algorithm [closed]

al-right, I need some examples of hard and long RSA keys cause i think i have found vulnerability in RSA. i need you to give me few hard Values of n (which is pxq) and i will tell you what p and q ...
204 views

### RSA Signature : Process of Sign the message and Verify

I have read that the RSA numeric signature works as the following: Generation of keys : $p,q,N,e,d$ Process of signing the message $m$ (which is BigInteger) : it uses the secret key $sk=(p,q,d)$ so ...
124 views

### Rsa Key Exchange Protocol

Moderators: Maybe this question will be move to other sub-forum. My question is Anybody know some link with a tutorial of how implement the RSA key exchange protocol using java for chat comunication?
104 views

### RSA_DH vs ECDH implementation

In ECDH protocol is possible, naturally, to use the same algorithm for calculate a secret key for both communication parties (Alice and Bob for example). It is possible to design also a same algorithm ...
148 views

### How do we guarantee plaintext is coprime in RSA?

The specifications for RSA state: $P^{\phi(N)} \equiv 1 ~mod~N$ if and only if $P$ and $N$ are coprime. Here $P$ is the plaintext and $N$ is the product of two suitable primes $x_1, x_2$. My question ...
187 views

275 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 ...
2k views

### Is ECB mode safe to use with RSA encryption? [duplicate]

Firstly, bear with me, I'm relatively new to cryptography. In a recent static analysis scan of our application, one of the findings complained that we are using ECB: A mode of operation of a block ...
104 views

### How do I prove IND-CPA security of RSA-OAEP?

How do I prove that RSA-OAEP is IND-CPA secure? It would be very good to show how to prove it formally, but an informal proof would also be enough. Because of the random number in RSA-OAEP, RSA gets ...
42 views

### trying to get calculator and RSA calculatin does not make sense [duplicate]

got two question, I am novice in the area of crypto and currently in big learning curve. From crypto book I am going over with, I see the RSA algorithm example as follows: it chose two rand #-s: ...
282 views

### RSA: Why must e be relative prime to phi(n) [duplicate]

I've got a question concerning fields used in RSA: Let's use the following symbols for my example: {p,q} = primes {e,n} = public key {d,n] = private key I learnt that an inverse element exists if a ...
630 views

### Common Modulus Attack in RSA

Consider the following scenario: The Information Security Department (ISD) of an organization issues each of the organization's employees, domestic and abroad, with an individual RSA key. To simplify ...
90 views

### Retrieve value of private key after encryption with the public key

Is there a way to find an RSA private key after it is encrypted with the corresponding public key? Does there exist an algorithm to recover the private key in this special case?
88 views

### Knowing N and a relationship between the 2 prime numbers(p and q) find p and q generated with RSA

Let there be $p$ and $q$, 2 prime numbers for which the following relationship is true: $|p-q| < 2 \cdot N^{1/4}$. The algorithm first generates the prime number $p$, then it generates $q$ close ...
359 views

### Key space vs Cardinality of 1024-bit RSA

I have been trying to figure out the encryption key space, and cardinality of 1024-bit RSA. From my understanding, the key generated from 1024-bit will be primes greater than $2^{1023}$ but less than ...
306 views

### RSA modulus (N) from public key and calculating N from p, q not equal [closed]

I have a RSA public key in the form of public exponent and modulus as follows: ...
436 views

### How multiplicative property of RSA can be exploited

It is known that RSA has the multiplicative property $E(m_1) \cdot E(m_2) = E(m_1 \cdot m_2)$ because $m_1^e \cdot m_2^e = (m_1 \cdot m_2)^e \pmod n$ But how can this property be used to break ...
167 views

### What use is the signature without the message under RSA?

Using RSA for signing & verification, is there a way to take a valid signature for an unknown message, and for someone else to generate a valid signature using a different key against the valid ...
529 views

### Toy public/private key example open to frequency analysis?

I've been looking at an online Public Key Encryption Example (summarized below). It seems to me that choosing cyphertext = plaintext^(key) mod n would produce the ...
953 views

### Decrypted RSA 64 bit encryption using modulus and private exponent. Got gobbledygook [Verify] [closed]

As part of an experiment, I was given a .enc RSA (encrypted) file that was most likely generated using openssl. I had the public key, I factored it, obtained the private exponent, and decrypted the ...
4k views

### How to decrypt a '.enc' file that has been encrypted with RSA using a public key? [closed]

While solving a CTF challenge online, I came across a situation where I needed to decrypt a '.enc' file that has been encrypted using someone's public key. The ...
38 views

### Identification by RSA

Suppose we have identification scheme as such: Bob takes random $r$, and encrypts it with Alices public RSA key $(n,e)$, sends $r^e$ to Alice. Alice decrypts $r$ and sends it back to Bob, becomes ...
186 views

### Openssl library problem

I'm using openssl library and I've a problem with RSA_private_encrypt() and RSA_public_decrypt(). I'm using a key size of 256 bit with no padding of the input message. I've noted that when my input ...
38 views

### RSA, proof of correct work, if p is not a prime number [duplicate]

Is there any proof of correct work of RSA algorithm, if p is not a prime number? For example: n = p*q, p = p1*p2, where p1 and p2 are primes. Edit: I found that it's called Multiprime RSA, but i ...
177 views

### Assemble RSA keys from components [closed]

I'm studying openpgp cryptography and struggling to understand some things. I can't use pgp tool for generating keys and ecryption, but have to write a simple app to generate keys, encrypt and decrypt ...
42 views

### RSA: If I know n, e, p, and q, how do I calculate d using the extended euclidean algorithm? [duplicate]

After doing a good amount of research, it's become fairly obvious that I ought to be using the extended Euclidean algorithm to calculate d from the data that I already have. However, this isn't an ...
81 views

Suppose to have a function for numbers expressed in 8-bit $\in [0,2^8-1]$ defined as: $$f(x)=x||x||x||x$$ where $|f(x)|$ is exactly 32 bits. e.g., suppose x=2 (00000010) so ...
564 views

### Deterministically generate a RSA public/private key pair from a passphrase (with sufficient entropy)?

Is it possible to deterministically generate public/private RSA key pairs from passphrases? Would giving the (key generating) algorithm data made from key-stretching the passphrase (instead of a ...
29 views

### Is RSA-OAEP secure when e=3? [duplicate]

Is RSA-OAEP secure when the exponent is equal to 3?
33 views

### Practical strength of non-2^n RSA key lengths [duplicate]

It has for many years been popular to use RSA keys that have lengths that are powers of two. E.g. 1024-bit, 2048-bit and 4096-bit key lengths are all popular for use with OpenPGP implementations such ...
196 views

### Given only RSA public key parameters, what security issues might I be able to detect?

I'm attempting to automate some checks against a large list of .NET assemblies, and want to include a test to see if the RSA parameters used to sign the assemblies are sensible. However, since I don't ...
168 views

### Where I can find a list of certified software / hardware RNGs compliant to NIST SP 800-22?

I need to use NIST SP 800-22 approved software / hardware to generate RSA key pair. Where I can find a list of certified software / hardware RNGs compliant to NIST SP 800-22? And how is the SP ...
65 views

### Requested to encrypt data with AES256, digital certification, timestamped

at my job we have been tasked by gov to encrypt some data we send to them. The "law" says we have to do the title above, but they only need us to do the AES256 thing because the data is not really ...
79 views

### RSA Decryption from samples

I am working on a project for a client which involves decryption of data which was encrypted using RSA. The system in question retains three independent copies of each data-set, but each copy is ...
983 views

### decrypt a saml 2.0 response having aes 128 and rsa [closed]

I need to decrypt a saml 2.0 response. But, the response object has reference to aes 128 and rsa algorithms, and I am having hard time in finding a way to decrypt. Below is the structure of the ...
197 views

### Why is this a fix to Bleichenbacher's attack?

Looking at the excellent explaination of the attack here: Can you explain Bleichenbacher's CCA attack on PKCS#1 v1.5? I have one additional question: It says that: ""To prevent this attack, SSL ...
108 views

Server A produces signed messages on request. You can tell server A what type of RSA padding to use in the signature (either RSASSA-PKCS1v1_5 or RSASSA-PSS). Either way, the message will be signed ...
634 views

### RSA key pair generation and FIPS 140-2, 186-4

I need to securely generate RSA key pair and I need to have access to private exponent in order to process it further. What's the difference in FIPS 140-2 and FIPS 186-4 in connection with RSA key ...