# 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,431 questions
142 views

### RSA: Private key given public key, plain text, and cipher text with no padding?

Are there attacks which will return the RSA private key when the attacker knows the public key, plain text, and cipher text when no padding is used in the RSA algorithm? If yes, what are the known ...
284 views

### Public key encryption and decryption with private key [closed]

I am learning cryptography and here is what I understood so far: Story. I decide to talk with my friend over unencrypted channel. We exchange public keys with each other so that we can encrypt ...
270 views

### How to generate tokens from a secret key?

The problem is simple: I want to be able to spit out 256-bit "tokens" that only I could've produced because I know my secret key $s$, and given any number of these tokens, no one can figure what $s$ ...
45 views

### Minimum number of public and private keys depending on signature?

I'm trying to make sure I understand and intuit things properly here, so I'm going to be somewhat lengthy? With this, as I did a cursory search here and couldn't find exactly the case examples I'm ...
59 views

### Certificate public key keyexchange, Which key exchange is used in browsers?

I have a question regarding the keyexchange happening in web browsers. If you check the certificate here on crypto.stackexchange you can go under details and see that the public key is type RSA (2048 ...
52 views

### is the functional signature result relies on f(x) or on x where x is a message and f is a function?

I am new on cryptography and I have a question about the functional signature scheme. The notion was introduced in this paper. In a functional signature scheme, there is a standard signature and ...
104 views

### How secure is a system that retrieves encrypted private keys from a public database?

The system in question is one with multiple users. Each user has a password associated with their account, and each user owns several public-private keypairs. A user's private keys are encrypted using ...
93 views

### Oblivious Encryption: Oblivious Transfer Based Encryption

I’m aware of a couple of OT protocols, most of which use Public Key Cryptography, Key Establishment (or similar constructs) as the base. I don’t really have specific knowledge on other OT protocols, ...
49 views

### Encrypting with Asymmetric keys

I'm designing a system where the client asked for documents to be encrypted with "asymmetric cryptography". I've explained them that the best practice is to encrypt the data with a symmetric ...
734 views

### Can public key cryptography survive quantum computers? [duplicate]

Quantum computation is based on the superposition principle of quantum physics. Bits in a normal computer are either 0 or 1. Quantum physics allows bits to be in a superposition of 0 and 1, in the ...
249 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 ...
28 views

### GPG Sub Key Renewal Questions

Last year, I followed this guide to create two GnuPG Smart Cards; one card with the Primary Key and the other card with the Sub-keys. I noticed that the sub keys were close to expiring so I renewed ...
493 views

### How to use openssl asn1parse or equivalent on output files from ssh-keygen -t rsa -b 4096?

I generate an ssh key: ...
127 views

### Implementing a zero-knowledge proof [duplicate]

I'm trying to get my head around zero-knowledge proofs and my definition of a zero-knowledge proof is as follows. A zero-knowledge proof is a method by which one party can prove to another party ...
83 views

### Issues with Elliptic Curve Point Addition

I'm trying to implement elliptic curve point addition in hardware. I've managed to create a working module using Affine coordinates however I've been reading about how points can be added by using ...
97 views

### RSA public key of dead cryptographers

Two cryptographic schemes—RSA accumulators, and RSA-based Verifiable Delay Functions (VDFs) such as this one—require an RSA modulus to operate. These RSA constructions are secure if the trapdoor, ...
118 views

### What standards of ECC point compression exist?

The method that I used before to decode EC point from public key led me in a dead end. So I just want to know what yet I could try. I've got a public key that I don't know how to decode and I am ...
49 views

### General Private/Public key generation

I wanted to get an idea on how the whole cold-storage private/public key generation works for different cryptocurrencies. So I was playing around with BIP32 deriviation path on: https://iancoleman.io/...
73 views

### Non-derivable public key asymmetrical encryption? [duplicate]

The need we have is to pass encrypted messages but such that the encryption key can't be generated from the decryption key. This rhymes with vanilla asymmetrical crypto, but in every schema I've seen,...
217 views

### How is a ciphertext encrypted using random numbers decrypted using a symmetric key algorithm

We use true random number generators as a source of keys for encryption. What I can not wrap my head around is: How is this cipher text decrypted in case of symmetric key algorithm as we need the same ...
50 views

### Bitwise operation on secret values revealing the result only to the participants

Given the following situation, what sort of cryptographic construction am I looking for? Alice has a bitfield (vector, polynomial representation, etc.) Bob has a different bitfield of the same length ...
90 views

### Public-private algorithm where it is not possible to recover public key from private key?

Is there an asymmetric algorithm where it is not possible to extract a public key from private key? So far any algorithms I tried (dsa, rsa, ecdsa, ed25519) successfully recover their public keys from ...
65 views

### How do i generate the shared key from this question?

Say I have Alice and Bob: Alice has $XA$, $YA = g^{XA} \bmod P$, $RA$ (random number) Bob has $XB$, $YB = g^{XB} \bmod P$, $RB$ (random number) Assume they have exchanged their certificates and ...
178 views

### When do I need to use hybrid cryptography?

I need to provide confidentiality for a protocol. The protocol message size is between 100 bytes to 500 bytes. Do I need to use asymmetric encryption or hybrid cryptography?
202 views

### Append text to file without decrypting & encrypting again

Is it possible to add a line to a file which is encrypted symmetrically or asymmetrically (private key refers to readkey below, public key refers to append key then) without decrypting it? I was ...
172 views

### Why would an efficient integer factorization algorithm render RSA insecure?

I know that RSA relies on the integer factorization problem: given two primes p and q, their product p . q is easy to compute. But not feasible (i.e., polynomial-time) an algorithm is known that could ...
83 views

### Hybrid encryption for MQTT payload?

i've written a simple code for payload encryption, i'v done it with AES-128 CBC mode ,it works fine ,the senario is very simple : the publisher send a JSON payload format that includes the encryption ...
329 views

### What is a 'known answer test' (KAT)?

Came across this concept on while reading up on the key-encapsulation protocol SIKE but haven't been able to find a good explanation of what a known answer test is formally. What is a known answer ...
78 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 ...
86 views

### Limiting how many key pairs someone can generate without compromising their keys

Is there any way to assign someone a limited quota for how many cryptographic key pairs they can generate (ECC, RSA, any algorithm), and preferably non-interactively? By non-interactively I mean there ...
238 views

### Why is it impossible to find the private key from the public key?

From what I understand, based on the article A Beginner’s Guide: Private and Public Key Cryptography Deciphered, the public key is generated by performing $n$ tangent plus mirroring operations from ...
123 views

### Where shoul I store private/public keys and how should I share it?

I'm new in terms of encryption and I have to encrypt the data between two Java Spring applications, one have serves as MVC framework and other as Web Service, I'm implementing an asymmetric encryption ...
52 views

### Understanding certificates for public keys with subkey

I have a openpgp key with 3 subkeys: ...
57 views

### How could an offline app verify a signature from one of many private keys?

I have a situation where an offline app needs to be able to verify whether some data was created by a set of privileged users of the app. These privileged users will each have one private key of some ...
41 views

### I am new to digital certificate 509V3 concept. can some one please clarify the below points [closed]

I am using RSA 2048 with SHA 256 primitive in certificate: How to verify the user certificate n + 1 with Root certificate n? why it is required to perform Certificate chain verification? How to ...
147 views

### Schnorr Pubkey Recovery

As per How does recovering the public key from an ECDSA signature work? , it's possible to recover public keys from ECDSA signatures. Is this possible for EC-Schnorr signatures as well? I'm looking ...
321 views

### Curve25519 / Ed25519 - Generate a private key from this term

I have 2 key pairs $(x_1, y_1)$, $(x_2, y_2)$. I also have $a =$random 256-bit array and $b =$256-bit of defined values from me. I know the values for $(x_1, y_1)$, $x_2$ and $b$. But I miss the ...
301 views

### Decode & Verify Base64urlUInt-encoded RS256 Public Key from Google

According to Google, to access the id_token it sends along with Access Tokens (for accessing their API), you must first validate the token using the RS256 Public Key available from this page. The ...
152 views

### ECC Curve25519: How to generate this kind of private key? / Strange key exchange mechanism

I'm currently reverse engineering a program that uses Curve25519 key exchange in network communication. I have only a basic understanding of ECC, so maybe this thing just seems strange to me. The ...
74 views

### Public-key generation - primes reuse

Given the following Trap-door Commitment scheme Secret key receiver: $x_B \in_u Z_q$ Public key receiver: $y_B = g^{x_B} \mod p$ Here, $p=q*k+1$ for two primes $p,q$ and $k \in Z$. And $g$ is the ...
86 views

### Using nested signatures to trust public key of inner signatures

I have a scenario where entity $A$ has an unauthentic copy of the public key $P_B$ of $B$ and an authentic copy of $P_C$ of $C$, trusted by both $A$ and $B$. Now $A$ wants to establish trust in $P_B$...
822 views

### How can one validate with a public key a JWT signature generated with a private key?

As I understand it, a JSON Web Token (JWT) consists of 3 parts: the header, specifying the hashing algorithm to use for the signature; the payload itself; and the signature, which is a hash of the ...
96 views

176 views

### Encoding Public Keys

We would like to encode ECDSA Public Key specifically keys generated using the ed25519 for storage . What is the best and less error prone method , for now we think about using Hex strings or Base64 ...
101 views

### Where do the PKs come from in Bluetooth device?

I am studying the Elliptic Curve Diffie-Hellman (ECDH) on Bluetooth 4.2. There are some questions about the PK.. Where do these public and private keys come from? Who defines them? and Will it ...