Stack Exchange Network

Stack Exchange network consists of 175 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 [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.

-1
votes
2answers
1k views

How exactly are GPG keys (and prime numbers inside of GPG) mathematically related?

I know that the keys are somehow mathematically related, and I know that they're somehow generated via prime numbers, but how exactly are they related? I realize that it'd probably be best for me to ...
0
votes
1answer
91 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 ...
-6
votes
0answers
34 views

Welcome To Pyca Cryptography [on hold]

Cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, message digets,and key derivation functions.For example,to encript ...
0
votes
1answer
58 views

Will publishing two or more public keys of the same RSA private key cause a security risk?

I want to make an end-to-end messaging platform where everyone is identified with a unique random private key. Everyone uses other peers' public keys to identify and send encrypted messages and verify ...
0
votes
2answers
866 views

How does RSA public and private key structure look like?

So I was reading this wiki about the RSA algorithm and I read this article to understand it better. My goal was to create a simple program that would generate private and public keys. I got to the ...
0
votes
1answer
49 views

DH prime size required to force an attack of $2^N$ steps

Why the size of a DH prime $p$ should be about 6800 bits long to force an attacker to perform $2^{128}$ steps to attack the system? How is this relationship 6800-128 established?
0
votes
0answers
23 views

Convert a plain public key to PEM format [on hold]

I plan to generate an EC key pair using P-256v1 from a trusted application and export the public key to Normal OS. The public key will either be in plain format or have none (only key hex). The ...
1
vote
2answers
32 views

PKI Multiple Samples start to expose Private Keys?

My understanding is that using a PKI, public/private key pair is generally secure to send message to people. That is, encrypt a message using the recipient's public key so they use their private key ...
6
votes
1answer
660 views

Private and Public Keys

I have a very basic understanding of encryption and the encapsulation process, but for the life of me I can't grasp how public keys and private keys work, how they're made, and how they're exchanged. ...
2
votes
1answer
50 views

What is the actual result of a Logjam's DH attack?

Does a Logjam attack calculate a group of probable Diffie-Hellman private keys for a user and then try them one at a time to see if it can decrypt the message - or does it directly calculate the one ...
0
votes
1answer
59 views

How to calculate e if we know n,p,q,m,c? [duplicate]

If we know n, p, q, and we have an encrypt oracle, which means we can input any plaintext and we'll get its ciphertext, and here p is smooth, which means the factors of p-1 are very small, is that ...
0
votes
0answers
29 views

ECC with 512bit compatible curves

I understand that given solutions for solving a discrete logarithm problem are on the order of 𝑂(2𝑛/2), ergo, 256bit private keys based on 25519 or secp256k1 have an effective bit strength of ...
3
votes
1answer
74 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 ...
0
votes
2answers
116 views

What is the difference between forward secrecy and key freshness?

Is all random private key that generating a unique session key is both forward secrecy and key freshness?
0
votes
0answers
3 views

OpenSSL ECDH setting peer's public key in C [migrated]

I'm trying to integrate ECDH using OpenSSL in my C-SDK (which we will refer to as client) which is running on Ubuntu and needed some help regarding how to set the peer's (server) public key on the ...
2
votes
1answer
83 views

man-in-the-middle attack on text-book RSA PKE

I am attempting to solve the following problem: I know the following: 3 messages are being sent between Alice and Bob, all messages are encrypted with the known public key $(d,N)$: Alice sends ...
4
votes
1answer
58 views

Why is D_K only required to be infeasible to derive from E_K for almost every key K?

In DH76 'New Directions in Cryptography', it states that 3) for almost every $K \in \{K\}$, each easily computed algorithm equivalent to $D_K$ is computationally infeasible to derive from $E_K$ ($...
0
votes
1answer
36 views

Flexibility in $RSA$ and $DLOG$ standards?

Today's security is based on $RSA$ and $DLOG$ primarily. If both go down then it is hard to imagine a scenario where internet can be salvaged quickly. Assume $RSA$ with $n$ bit prime factors and $...
0
votes
1answer
56 views

The goal, the method, and the interface of the signcrypt primitive.

Some time ago, I proposed making the site more educational by teaching correct cryptographic programming. The proposal had had somewhat good reception, but was met with cold ice as there had been ...
1
vote
0answers
21 views

How does the KeyGen of Merkle's improvement of Lamport's OTS work?

In his paper [1] on page 17 and 18, Merkle proposes an improvement on Lamport's OTS by only signing the 1's in the message in combination with a checksum of the amount of 0's in the message. I get the ...
0
votes
1answer
35 views

How to prevent Public Key from being replaced entirely?

I am using RSA to sign my license file using Microsoft CNG API. I am signing the license file and sending the file with the <...
0
votes
2answers
39 views

Characteristic of Public Key?

Is Public key used directly to encrypt a message or it is used to derive other keys ? Can we decrypt a message with same public key using which it was encrypted ? So far I understand, as PKI is based ...
0
votes
1answer
274 views

Half of any bitcoin (crypto) public key - (public key half) is possible

I found a topic on bitcointalk Public key x and y == Double(Half of the Public key x and y) half any public key is possible how that possible , in crypto there is subtraction and multiplication ...
1
vote
2answers
530 views

Guidelines for cryptographic key generation

I was wondering whether you know can point me to some general (basic) principles/guidelines one should follow for generating cryptographic keys? I have looked at NIST 800-133, but was hoping for some ...
4
votes
1answer
199 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)$ ...
4
votes
1answer
162 views

Identifying a bad public key

The great thing about public key cryptography is that anyone can generate a keypair, keep the private key secret and publish the public key anywhere they want. This is used in CAs where an ...
3
votes
1answer
157 views

Why isn't ElGamal a symmetric-key scheme?

I was asked about this question by a friend. He considers that Alice and Bob share a secret key s=g^(xy). So why isn't it considered a symmentric-key scheme? ...
0
votes
1answer
48 views

Why Nonces and timestamps are used in Public key authority?

why the nonces(N1 and N2) and Timestamps(T1 and T2) are used in Public key Authority? which of them prevent replay attack?
0
votes
0answers
23 views

Importance of the order of public/private key application to a signed encrypted message [duplicate]

Let's say two users (U1, U2) each have a private key they keep to themselves, and each broadcast a corresponding public key to the world. Let's then say that U1 wants to send a signed encrypted ...
3
votes
2answers
1k views

How can a message encrypted with the public key be decrypted with the private key?

I've been reading about encryption and have a basic understanding of the concept. What I don't understand, however, is how a calculation with one key can result in a number that, through calculation ...
0
votes
0answers
17 views

is there any good implementation to the RSA in arduino ? c language [migrated]

I need a good implementation to the RSA algorithm that works on Arduino mega with key size 1024. the code will run on Arduino ide. the project idea simply is an android app send an encrypted message ...
0
votes
0answers
29 views

How to exchange a common key to a group of person using Elliptic-curve Diffie–Hellman (ECDH)? [duplicate]

In ECDH, when two persons want to share private keys, they first select a point $G$ on the elliptic curve and after that, each of them picks a random integer $a$ and $b$, respectively, and multiply ...
0
votes
0answers
37 views

Decentralized / Distributed Private Key Generation between Untrusted Parties?

I found an interesting concept in this paper, page 13, (Link to the paper) called "Decentralized private key generation", as follows: "Decentralized private key generation – Multiple Enigma nodes ...
2
votes
1answer
56 views

Share secret non-interactively in a verifiable way

In an application, I need to share a secret (random number) with a Group of known receivers over a public channel (a Blockchain) but each receiver needs to be able to check that the others received ...
0
votes
1answer
41 views

Why public key has two parts in my secure messaging client similar to signal

I am working on a Golang code similar to Signal protocol. I need to modify it. I am confused on tripartite Diffie-Hellman handshake part of code, i.e. why public key has two separate parts as compared ...
-1
votes
2answers
54 views

How to find at least one private key from a large list of compressed public keys secp256k1

Not long ago I saw a discussion on the Bitcoin Talk forum: https://bitcointalk.org/index.php?topic=5060735.msg50736695#msg50736695 Please give advice and working methods? Is it possible to find at ...
0
votes
0answers
22 views

Minimal secure index of quasi-cyclic codes for code-based cryptography

It is well-known that keys (generator matrices) of code-based cryptography are very large for its practical usage. To reduce them scientists propose to use families of quasi-cyclic codes. I remind ...
1
vote
0answers
95 views

How do pairings behave on G2/twist points off the prime order subgroup?

$\newcommand{\F}{\mathbb{F}}$ Consider the ate pairing defined on a curve $G_1 = E(\F_q)$ and $G_2 = E'(\F_{q^r})$ where $E'$ is a twist of $E$ with the twisting isomorphism defined over $\F_{q^r}$. ...
2
votes
2answers
193 views

Can you compress an elliptic curve private key in half?

According to this, a $n$-bit key offers about $n/2$ bits of security. That got me wondering, can you compress the key in half? At first blush, no, because the key is essentially a random number, and ...
2
votes
1answer
78 views

How to encrypt sensitive files in a business application? Is it needed? [closed]

I'm currently working on a business Java application, and we store sensitive files related to our users. What is the appropriate approach to store them securely? Is it viable to encrypt/decrypt all ...
1
vote
1answer
551 views

If H(m) = 0 for some m, how can a DSA signature be forged?

If we know for some message $m$ that $H(m) = 0$, how can we forge a DSA signature with only the public key? I got that $g^s*r = (g^x)^r$ where $x$ is the private key, but that's one equation with 2 ...
3
votes
1answer
821 views

ElGamal encryption and signature using same keys

In ElGamal scheme we have message $M$; $p$, $g$ and $y=g^x \bmod p$ as public key where $x$ is unknown private key. Encrypted message $(c,d)$, where $c=g^k \bmod p$ and $d=M \cdot y^k \bmod p$. ...
0
votes
2answers
48 views

cryptographically signed streaming data

On a high level the question is: how does one cryptographically sign streaming data? Here is the context: a number of people are continuously streaming data to me the data is public and does not ...
-2
votes
1answer
91 views

RSA: why does $m^{ed}$ equal the original message?

Trapdoor functions are defined as that a secret key reverses the function. It seems to me more that it causes a cycle to repeat, similar to how $n^k \bmod k$, when $k$ is a prime number, equals $n$, ...
0
votes
1answer
47 views

What attacks does future secrecy protect against?

Consider messaging between 2 parties. A sequence of messages are exchanged between the parties using encryption. We consider an attacker that has at a minimum a log of all the (encrypted) messages ...
0
votes
2answers
1k views

What's wrong with RSA and OpenSSL?

We all know that signing a document is to encrypt its hash using signer's private key. https://commons.wikimedia.org/wiki/File:Digital_Signature_diagram.svg I've been searching the web for days, ...
1
vote
2answers
129 views

How to define a FHE scheme whose plaintext space is infinite using boolean circuits?

There are many kinds of fully homomorphic encryption scheme by using boolean circuits. And the plaintext space $\mathcal{P} = \{ 0,1 \}$. If there is a -bit FHE scheme, we can construct a FHE scheme ...
1
vote
1answer
442 views

Using secp256k1 keys for encryption

We are making a system where users can share files with other people but nobody should be able to figure out that all these different files belongs to same user on blockchain. these are the steps we ...
0
votes
0answers
50 views

Choosing K in ECDSA SECP256K1

I am working on a very resource-constrained environment. Using a standard peer reviewed library isn't possible because it won't fit within the RAM requirements of the device (~5K unused ram without ...
2
votes
1answer
124 views

Why is encryption slower than decryption in elliptic curve cryptography (ECC)?

While performing encryption using public key and decryption using the private key, I am always finding that encryption takes more time than decryption in elliptic curve cryptography (ECC). It's the ...