Questions tagged [public-key]

An asymmetric cipher is an encryption scheme using a pair of keys, one to encrypt and a second to decrypt a message. This way the encrypting key need not be kept secret to ensure a private communication. Similarly in public key authentication, the verification key can be public and the signing key private.

Filter by
Sorted by
Tagged with
0
votes
2answers
61 views

Implementing BFV Relinearization

I'm currently working on a Python implementation of the BFV[12] cryptosystem. I got to a point where key generation, encryption, addition and decryption works as expected. Where I'm struggling with ...
0
votes
1answer
28 views

Signing a secret key with ECDSA

Assume I have a randomly generated 256 bit secret key, as well as a private ECDSA key. Is it safe to sign the randomly generated 256 bit secret key using ECDSA, and then store the resulting signature ...
3
votes
1answer
153 views

How does the key agreement process take place in Virgil E3Kit SDK for end to end encryption?

I'm using Virgil E3Kit SDK to implement end-to-end encryption in my App. Their E3Kit SDK is very effective and not too hard to understand, but I still don't understand how does the key agreement ...
2
votes
0answers
71 views

Fixed point in RSA encryption

Some papers count the number of the fixed points in the RSA encryption algorithm. They're a minimum of 9 and the real number depends on the smoothness of primes $p$ and $q$. It very unlikely that a ...
15
votes
3answers
8k views

How many KDF rounds for an SSH key?

What is the best practice on choosing how many key derivation function (KDF) rounds/iterations when generating an SSH key pair with ssh-keygen? Am I correct in saying that it is unnecessary if the ...
0
votes
1answer
166 views

Asymmetric Cryptography decryption

I am new to cryptography, i know essential part of asymmetric cryptography but is it possible to decrypt 617 decimal digits (2,048 bits) with RSA ? How it can be factored?
4
votes
1answer
1k views

What's the main difference between Pohlig-Hellman and RSA?

Both Pohlig-Hellman and RSA perform encryption and decryption by exponentiation modulo some integer ($p$ prime for PH, $n$ composite for RSA). They both use a key $e$ as the exponent to encrypt a ...
2
votes
1answer
346 views

Can I use the secret part of a asymmetric encryption keypair as a symmetric encryption key?

Background I'm working on a framework for crypto-based authentication and authorization that is largely inspired by the way Keybase's Teams product works. Keybase uses the same process to generate ...
-1
votes
1answer
44 views

Bruteforce attack on a 64bit computer [duplicate]

How would I attempt to brute force a RSA encrypted message with a 64bit computer if it the memory can't put up with calculations bigger than 64bit? Without going that far to attempting to crack it, ...
21
votes
3answers
17k views

Why is the P-521 elliptic curve not in Suite B if AES-256 is?

In the NSA's document, "The Case for Elliptic Curve Cryptography" (archived), we have ...
2
votes
1answer
271 views

Revoke a GPG key using previously generated revoke certificate after renewd (change expiration date)

I have few sub-questions Do secret keys get expired, or just the public key gets expired? Do I have to back up the master sec key each time I renew it? For an ...
2
votes
0answers
98 views

Verify commitment C commits to the same value that E encrypts

Given the following (using additive notation): $G$ - generator of an elliptic curve group of order $q$ $s$ - secret drawn uniformly from the distribution $1..q$ $k$ and $K$ - a private public keypair ...
3
votes
2answers
193 views

Key Exchange vs Key Encapsulation

From what I understand, the steps of a key exchange protocol are Alice and Bob each encrypt something using their public key and private key and send the result to each other Alice and Bob each do ...
62
votes
3answers
40k views

Impacts of not using RSA exponent of 65537

This RFC says the RSA Exponent should be 65537. Why is that number recommended and what are the theoretical and practical impacts & risks of making that number higher or lower? What are the ...
18
votes
2answers
1k views

Can deterministic ECDSA be protected against fault attacks?

In a paper by Barenghi and Pelosi, it was described that fault attacks could be used to derive the secret key when using deterministic ECDSA as described in RFC6979 by @Thomas_Pornin Deterministic (...
1
vote
1answer
40 views

Knowledge of discrete log is needed in the proof of Cramer-Shoup public key scheme?

In the proof of the Cramer-Shoup public key scheme [1], I understand that the adversary's view can be seen as equations such as $\log c = x_1 + w x_2, \log d = y_1 + w y_2$ and so on (equation 1 and 2 ...
0
votes
1answer
22 views

Is MAC process different for symmetric and asymmetric?

Message Authentication Code as far as I know works on the shared secret key. Do they work in the same way. Is there no difference between symmetric and asymmetric processes. Can anyone please explain ...
0
votes
0answers
55 views

Are My Answers for This RSA Question Correct?

I am very new to cryptography and so I am looking for feedback on this question on RSA. Please let me know if I have made any mistakes, Thank you! (a). RSA Algorithm: -choose two primes p,q -...
2
votes
2answers
36 views

As an analogy to asymmetric key encryption, does the following work? If not why not?

public key... a padlock (anyone can lock it) private key... the key to the padlock (only key owner can open it) Alice and Bob each have their own padlock and key Anyone can get a replica of any ...
-3
votes
0answers
51 views

Symmetric Or Asymetric- When to use?

In block chain, we use asymmetric cryptography to generate public key which we send to receiver so he can unlock the funds. All other type of hashing for creating nonce, block id, merkel route, ...
1
vote
1answer
45 views

Proving a user's identity after the user has forgotten his private key and password

First some background. I am building an application where people send each other emails with messages inside that need their sign-off. Once the participants receive the email they're also given a ...
1
vote
0answers
16 views

Could a private key recovery via modulus fault attacks be optimised by being able to choose the faulty moduli?

The paper 'Why One Should Also Secure RSA Public Key Elements' describes an attack where an adversary can fully recover a private key by injecting faults into the modulus before exponentiation takes ...
4
votes
1answer
42 views

Multiparty dataset intersection count

Typically, Private Set Intersection (PSI) protocols let you learn the subset of items on each party's dataset that are in the intersection. The problem in this case is a relaxation of these kind of ...
0
votes
0answers
36 views

Is the password based key exchange secure even if the public key is known to adversary?

I am assuming the answer for part 1 to be a "NO" as the adversary knows the public key he can get the password by offline attack IN part 2 : the answer is "yes" as the public key is freshly generated ...
0
votes
2answers
43 views

What is the PGP Web of Trust Strongset?

I understand that it is a system that "establishes the authenticity of the binding between public keys and their owners", but how does one join this web of trust? Do you have to physically meet one of ...
0
votes
0answers
21 views

E2EE encrypted chat where messages are only readable by participants and admin users

As the title suggests, is there a way to have an E2EE chat between two users, and have them be visible later by an admin user. I know this defeats the point of E2EE, but i want to have the messages ...
1
vote
1answer
144 views

Cryptographic equivalent of family coat of arms

As a layman when it comes to cryptography, I have recently been asking myself if there was a cryptographic equivalent of a family code of arms. I'm thinking of something asymmetric, that is future ...
1
vote
0answers
40 views

Proof ownership of private key for blinded public key

so i want to prove to a server that i have the private key to a public key for which i want to retrieve the server's signature. But the server is not allowed to learn either public nor private key. ...
2
votes
1answer
520 views

End to end encrypted web chat app with stored messages in database

I am working on a web app with an integrated chat. All chats can only occur between two users - not more, not less. I am very concerned with security, so I would like to encrypt all chat messages with ...
5
votes
1answer
527 views

Relations between RSA and Generalized Diffie-Hellman (GDH), factoring and GDH

Definition: (The generalized Diffie-Hellman problem) Let $n=pq$ for two large primes $p,q$. Given $x, x^a, x^b,n$, find $x^{ab}\pmod{n}$. (1) Is there a known reduction from the GDH problem to ...
0
votes
1answer
36 views

What is the key length of shared secret by Curve 25519 ECDH

Both parties uses Curve 25519 key pairs for ECDH key exchange. What is the key length of shared secret after ECDH?
0
votes
0answers
32 views

Secure asymmetric encryption with 32byte ciphertext

I need securely asymmetrically encrypt the up to 16 bytes plaintext and receive up to 32 bytes ciphertext. I found that ElGamal produces ciphertext that is 2 times keysize. So I would need to use ...
0
votes
1answer
67 views

Are all public-key encryption protocols based on one-way functions? [duplicate]

Are there any public-key cryptography protocols which don't rely on one-way (or trapdoor) functions? RSA and Diffie-Hellman cryptographic protocols both rely on one-way functions (prime factorization ...
3
votes
1answer
123 views

Breaking ciphertext using a quantum computer when the public key is not available

As we know about Shor's algorithm on quantum computers it is possible to crack RSA / ECC easily if we have enough qubits. Is it possible to crack RSA / ECC on a quantum computer if we only have ...
21
votes
2answers
24k views

How does a chosen plaintext attack on RSA work?

How can one run a chosen plaintext attack on RSA? If I can send some plaintexts and get the ciphertexts, how can I find a relation between them which helps me to crack another ciphertext?
3
votes
1answer
2k views

RSA public key exponent generation confusion

Quote from Wiki: $e$ having a short bit-length and small Hamming weight results in more efficient encryption — most commonly $2^{16} + 1 = 65537$. However, much smaller values of $e$ (such as $3$) ...
5
votes
4answers
8k views

Diffie-Hellman Key Exchange with Authentication: Man-in-the-Middle query

I have been reading up on MiTM attacks, and the prevention of them using public key certificates. Recently I learnt about Diffie-Hellman Key Exchange with Authentication, and how it uses signed ...
3
votes
1answer
82 views

Does signing multiple messages with the same RSA key weaken the encryption?

Here is the scenario, I am signing roughly 1000 messages, which consist of 16 byte hashes, with 1024 bit RSA. The private key is only used to sign the hashes, and there is no padding scheme. The ...
0
votes
3answers
91 views

How can i check if a public key match with a private key

Is there a way to check, (with openssl command for example), if a given public key match with a private key ? Thanks
2
votes
1answer
410 views

Would it be better to use HKDF or SCrypt for deriving a child key?

Okay so I'm trying to derive a child public key from an EC public key. I've come up with a couple ideas and now I'd like to know which is more secure. Mp: The master key pair, this includes a ...
0
votes
0answers
37 views

Protect student log data through public-key encryption and a trustee

I am looking for an GDPR-conform way to log student behavior in an online learning system (Moodle). In the system, students are offered a course to be examined in a field study. According to the GDPR, ...
0
votes
0answers
24 views

Using OpenSSL C library Envelope routines for public key encryption, saving output in a common standard [migrated]

I'm using OpenSSL's EVP routines (EVP_SealInit, EVP_SealUpdate, EVP_SealFinal) for public key encryption in my application. It works perfect for the app's internal data structures, however at some ...
0
votes
0answers
62 views

Diffie-Hellman + Asymetric encryption kept simple, or alternatives to TLS

I am working on a system that includes our dear friends Alice, Bob, and a server that is only partially trusted. I have spent the majority of the day reading up on various cryptography methods, but I ...
7
votes
1answer
131 views

Can I switch out a private RSA Key, so that when decrypting a message, it is decrypted to a different message?

Here's a task I've been struggling with: Say I have an encrypted message $c$, and a desired plaintext $m$. How can I define a valid private RSA Key $(d,N)$, so that $c^d \bmod N = m$ Note that the ...
8
votes
3answers
1k views

How does Clifford Cocks 'Non-Secret Encryption' work?

I have read Clifford Cocks "A Note on 'Non-secret Encryption'" and thought I would try to implement this, but I don't seem to be able to get it to work. I'm obviously missing something. From the ...
1
vote
2answers
136 views

Using RSA encryption to encrypt large files

The following post discusses the use of RSA for file encryption: https://medium.com/@ismailakkila/black-hat-python-encrypt-and-decrypt-with-rsa-cryptography-bd6df84d65bc The file encrypted is a JPEG ...
6
votes
1answer
310 views

Zero knowledge proof for Paillier addition under multiple keys

Suppose $m_0, m_1, m_2 \in \mathbb{N}$ such that $m_0 = m_1 + m_2$, $m_i > 0$ (none of them can be 0 or lower) Under a Paillier cryptosystem, set $e_0 = E(m_0, r_0)$ for a public key $(g_0, n_0)$ ...
1
vote
1answer
52 views

How can a public-key encryption scheme be used to construct a commitment scheme in the CRS model?

For a PKE scheme $(Gen, Enc, Dec)$, the most 'obvious' idea is to commit to an encryption of a bit and in the reveal phase maybe send $r_g$, $r_e$ where $r_g$ is the randomness of $Gen$ and $r_e$ is ...
2
votes
1answer
62 views

Converting raw ECC private key into ASN.1 DER encoded key

I created a random integer array of 32 bytes to use as my private key for secp256k1 curve. ...
7
votes
1answer
413 views

Is it possible to decrypt an ECDSA private key if the same nonce is used across different private keys?

If the same nonce is used across different messages under the same private key, the private key can be easily revealed. However, let's consider another scenario. Two private keys, x1 and x2, are ...

1
2 3 4 5
34