Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rsa]

RSA is a common public key algorithm, which can be used for encryption and signature. It is a core component of most the security protocols used on the Internet, including the SSL/TLS protocol suite.

0
votes
2answers
21 views

Is it necessary to encrypt messages client side if using HTTPS?

I am creating a messaging service for an app I'm developing and right now the data flow is as follows: Send: message sent to server => message encrypted based on user's public key and signed using ...
0
votes
1answer
27 views

SHA 1 with RSA for ssl certificate

Hi using SHA 1 with RSA encryption for ssl certificate is secure? As i know, sha 1 is not secure, but if we use RSA with sha1, still it will be an issue? Please suggest if any security issues exist.
0
votes
1answer
90 views

Does hashing a file consider its digital signature as well?

I have a signed (using Windows signtool) executable which is hashed by SHA1 algorithm and encrypted using RSA. Now I like to verify the executable to avoid security vulnerabilities. For that I have an ...
1
vote
1answer
36 views

Web Crypto API maturity for JavaScript RSA encryption?

We have been using a JavaScript crypto API to do RSA encryption in the browser. I know all the criticisms on encryption in JavaScript but we have evaluated pros and cons of the solution and the risks ...
0
votes
3answers
48 views

Recommended asymmetric algorithms for JWT

I'm implementing JWT authentication for a new web service and am unsure which asymmetric algorithm to choose. I've searched around and haven't found any consensus or clear recommendations. According ...
0
votes
1answer
36 views

RSA uses substitution and shuffling?

I've been doing some searches for RSA and it appears that it uses shuffling but not substitution. Is this true? Simple explanation of the algorithm: https://www.geeksforgeeks.org/rsa-algorithm-...
0
votes
0answers
55 views

Using RSA private key as AES key for encryption

Example application need: An application pulls down data from a web service and needs to encrypt and persist this data locally to disk. Only this application should be able to decrypt the data stored ...
-1
votes
1answer
54 views

Deducing private key in RSA encryption from public key, cyphertext and plain text

Assuming someone is doing MITM attack. He knows the cyphertext, the public key and the plaintext message, can he deduce the private key from these 3 elements?
1
vote
0answers
71 views

signature with Bleichenbacher’s attack [migrated]

I understood Bleichenbacher & ROBOTO attack, however I have some trouble understanding Section 3.5 of ROBOT attack which discusses retrieving private keys. https://www.usenix.org/system/files/...
1
vote
2answers
73 views

How to handle end to end encryption [closed]

I am working on an app where the goal is to upload user data, store it, do some processing on that data and present it to user when asked. We want to follow end to end encryption model where the ...
0
votes
0answers
17 views

How can I find the publick key length of a dnssec public key

I have generated a DNS public-key (as far as I recall it is an rSA key). Given the key (ZSK and KSK), how can I figure our its length? how can I make sure it is RSA or another type? For example, this ...
0
votes
0answers
12 views

Why do we need a condition e < (p-1)(q-1) in generating the keys in RSA? [migrated]

I think we are so familiar with the algorithm for generating the public and private keys in RSA: Choose two large prime numbers p, q. N = p * q Choose a random integer e such that 1 < e < (p-1)(...
1
vote
1answer
65 views

Storing RSA private/public key pairs in a file, on linux

Would it be wise to: Generate a lot of priv./pub. key pairs, and store them in a file on the server machine(Linux). (Let's say in a companies server room) Then encrypt the file with AES, and store ...
2
votes
0answers
27 views

mbedtls mutual authentication [closed]

I have a server CA cert, device cert and the device private key. I am using mbedtls and want to be able to create a mutual authentication connection between the device and the server. I also have to ...
1
vote
2answers
56 views

How to encrypt and sign a message with RSA?

I have been doing research on how RSA encryption works (mostly from a math's point of view) and I have come to understand this: By encrypting with the public key of bob, only bob can decrypt it with ...
0
votes
2answers
41 views

Does the symmetric key exchange through asymmetric encryption have to be done asymmetrically?

To communicate over a public channel, it seems often that 2 parties first use some asymmetric-encryption way to exchange a symmetric key. And then use the symmetric key for subsequent communication. ...
1
vote
3answers
48 views

How to enforce confidentiality while keeping the authenticity?

Below is an illustration of the digital signing process. According to Wikipedia: A digital signature is an authentication mechanism that enables the creator of the message to attach a code that ...
1
vote
0answers
32 views

Advantage Of ECDH-RSA over RSA Ciphersuites In TLS

If ECDH-RSA is used for key exchange, this is what happens: The server has its public ECDH parameter embedded within its certificate. The client generates its public ECDH parameter, extracts the ...
2
votes
0answers
33 views

when should i use HMAC-based JWT?

I read a number of blog posts and found that it is tough to keep the secret-key a secret and if using a symmetric algorithm for JWT creation, the generator has the power to create as well as validate ...
1
vote
2answers
53 views

How to authenticate using RSA avoiding MITM attacks

During my lessons of information security the professor told as that Alice can authenticate to Bob in the following way using RSA: Bob generates and sends a Nonce to Alice Alice signs this Nonce with ...
2
votes
2answers
70 views

Is RSA key-like browser authentication feasible?

I see that password based authentication is out of favor today, and Internet is moving toward RSA keys-based authentication. Coming from that fact, I am wondering if there would be a real benefit to ...
0
votes
1answer
107 views

Checking if an RSA private key is passphrase protected

I have generated an RSA key-pair on a computer, and I want to check if the RSA private key is encrypted (protected) with a passphrase. Note that the problem is not that I forgot the passphrase, but ...
0
votes
0answers
30 views

User specific AES-256 key for file. Retroactive encryption

I may be falling into a classic encryption-problem trap here... I've been developing applications using AES and public/private key encryption for some time so I have a good understanding of straight ...
0
votes
0answers
52 views

Compatibility advantages of RSA-4096 over RSA-3072

I am targeting a security level of 128 bits for GnuPG, so I am using SHA-256 and AES-128. Now I need to choose between RSA-3072 and RSA-4096. According to multiple sources RSA-3072 security level is ...
0
votes
1answer
90 views

Why is PKCS used? [closed]

Can anybody help me in understanding why PKCS is used? My confusion is that whether PKCS is used to transfer key in between client and server OR it is a standard to encrypt and decrypt the payload. I ...
1
vote
2answers
101 views

Should the client or the server generate the client's public-private key pair?

Say I have a mobile messaging app. There is a central server that manages stuff (like a directory of users, onboarding, etc.) and there are all the clients. My app is professional, so it uses ...
3
votes
2answers
184 views

Is server public key and Diffie Hellman public are the same?

I am trying to understand the working of TLS. I understand that there are various way to generate the master secret used to encrypting the data. Such as DH (Ephemeral DHE) and RSA. I understand that, ...
2
votes
6answers
262 views

Why can a man-in-the-middle attack not happen with RSA?

I understand how RSA works (generate private/public key pair, send public key to whoever you want to talk to, encrypt with public, decrypt with private), but isn't there a flaw in this? Let's say A ...
1
vote
2answers
96 views

Does git use the ssh user keys or the repository's deploy keys for encryption?

In this question I asked, why the SSH-Host key shown when connecting to a gitlab repository does not match the one shown on the instance configuration page. Nevertheless, the accepted answer says that ...
1
vote
2answers
86 views

Is there a stream cipher equivalent when using RSA key pairs?

From what I can gather, when encrypting with RSA key pairs, you cannot encrypt more data than the length of the key (at least I can't find the implementation in the libraries I'm using). So then, in ...
11
votes
2answers
561 views

Why are the gitlab SSH host key fingerprints not matching?

I tried to log into my university's gitlab via SSH. As expected, I was warned that the host is not known. Therefore, I tried to find the SSH host key on the "current configuration" page in the manual. ...
0
votes
1answer
312 views

why does ssh prompt with the ECDSA key instead of RSA [closed]

When I use an Ubuntu from linode ssh-keygen -l defaults to looking for an RSA file to "list". Yet ssh issued from a client asks for verification of the remote linode's ECDSA key. This means that ...
1
vote
1answer
138 views

how to save RSA keys in a software?

I am working on a non-professional piece of software that is required to generate and store RSA keys (public and private). The generated keys will be used to encrypt communication across the Internet. ...
1
vote
0answers
96 views

BadPaddingException when using the textbook cipher

I'm using an implementation as below to do an encryption where the bouncycastle is used as the crypto provider. So the ciphertext for a particular plaintext will not be dynamic as the RSA from ...
1
vote
1answer
67 views

Checking the primality of numbers for use in RSA [closed]

How can I check the primality of extremely large numbers such as those used in RSA, in Linux?
0
votes
1answer
65 views

How SSL Handshake recognise any attack

I already know that a replay attack on an SSL handshake is ineffective, but if we suppose that an "intruder" has listened and has got all of the information from a previous handshake, how will the ...
0
votes
0answers
33 views

What are the dangers of a compromised private key in “pass + certificate” VPN auth?

A VPN service I've encountered supports connecting to it with NetworkManager in linux. The options are OpenVPN as the connection type, with Password with Certificates (TLS) as authentication type. ...
3
votes
0answers
72 views

Attacks on RSA without knowledge of either key

All attacks on RSA seem to require knowledge of at least the ciphertext and the public key. However, has there ever been any evidence of an attack which simply uses a sufficiently large number of ...
0
votes
0answers
56 views

RSA/ECB/PKCS1Padding transformation

Is it secure to use RSA/ECB/PKCS1Padding transformation (with no parameters)? I found that padding oracle attack can be performed against the RSA with PKCS1Padding. I use this algorithm to encrypt ...
1
vote
1answer
31 views

Use D Parameter Of Private Key as HMAC Secret for JWT in a Load Balanced Environment

I need to use a signature for a JWT that needs to be created or verified on 12 different servers running in a load balanced environment. They all already have the same RSA Key Pair stored in the ...
-1
votes
3answers
175 views

How are private keys distributed safely?

I am going through the RSA algorithm and I have a few questions. My understanding of RSA Algorithm: How does a receiver get his private keys P and Q? For a particular public key, if every receiver ...
0
votes
1answer
101 views

What common techniques are there to decrypt a file given that I only know the private RSA key?

I've been trying to solve an online challenge. I've been given a file, which I suspect is encrypted (around 15KiB). I've also managed to obtain what seems to be an RSA private key (n == 2048). I know ...
1
vote
1answer
310 views

Why can RSA-OAEP padded mail be decrypted using OpenSSL 1.0.1e?

I have been encrypting messages and specifying RSA-OAEP padding with OpenSSL 1.0.2k, using the following command: openssl cms -encrypt -in content.txt -out message.msg \ -recip public-key.pem -keyopt ...
1
vote
1answer
217 views

ssh-keygen: What is the passphrase for?

When using ssh-keygen: What is the passphrase for? Why is it optional? What are the security implications of specifying (or not specifying) one? Below is an excerpt taken from a shell session (...
3
votes
1answer
1k views

What is RSA OAEP & RSA PSS in simple terms

After googling or youtubing, i still cant find any information on RSA OAEP & RSA PSS. Can someone explain it in simple terms to me? I understand RSA is public key and private key. Why is there so ...
3
votes
1answer
1k views

PEM, CER, CRT, P12 - what is it all about?

I hope my question is not too general, but I find the topic of storing asymmetric keys very confusing.. Here's how I understand it: Using openSSL I can generate my RSA keys pair: openssl genrsa -out ...
0
votes
1answer
64 views

What is a good way of embedding rsa encription into a messaging app

I'm learning cryptography and stuck with a problem. Suppose I have a chat app that uses sockets. Before the massage is sent it's encripted with the RSA algorithm; what are some good strategies to ...
2
votes
2answers
503 views

Why does WannaCry encrypt symmetric key with a new per-victim-only public key?

According to this answer, WannaCry will: Generate AES key at victim's system to encrypt victim's files. Generate RSA key at victim's system to encrypt AES key generated above. Encrypt private key of ...
4
votes
0answers
103 views

Encryption data keys in single file at same location

I have an external storage which I am wanting to store encrypted files. Strategy #1: Each file and folder name is AES encrypted with its own data key All data keys are saved into a single datakeys....
2
votes
1answer
101 views

RSA relation to SSH key exchange

I do not fully understand SSH. I was hoping someone could fix my confusion. When you generate an ssh key pair, you create four files. authorized_keys, id_rsa, id_rsa.pub and known_hosts My ...