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
6
votes
1answer
1k views

How is the session key more secure than the public key?

From the website of GNU Privacy Guard (GnuPG): If an attacker could decrypt a session key it would only be useful for reading the one message encrypted with that session key. The attacker would have ...
2
votes
1answer
108 views

Decrypting message as MSB in regev scheme

I was watching this FHE video and it define Regev encryption scheme as fallow : kyegen: sk : choose $t = (1,s)^t \in \mathbb{Z}_q^{n+1}$ pk = $A \in \mathbb{Z}_q^{m*(n+1)}$ random except $[A * t]_q$ ...
2
votes
1answer
157 views

The security level of double encryption

Let PKE $\Pi' = (Gen', Enc', Dec')$ and it is secure in the sense of $S'$. Let PKE $\Pi'' = (Gen'', Enc'', Dec'')$ and it is secure in the sense of $S''$. $S'$ and $S''$ may be separation which means ...
5
votes
1answer
9k views

What is a trapdoor permutation?

Can anyone explain to me what a trapdoor one-way permutation is? Is RSA a trapdoor one-way permutation? Context: I was reading about ring signatures. On page 560, it describes steps to implementing ...
1
vote
1answer
99 views

Is it possible to multiplex TLS connections by SNI metadata without knowing any keys?

Imagine the following communication diagram: C1-----\ /--B1 C2------P---B2 ...----/ \--... We have multiple C(lients), call them C1, C2, etc. They connect to a ...
1
vote
0answers
42 views

Why is a hash function required for building Public Key Encryption from a Trap Door Function

This is from Dan Boneh's Coursera Lectures - Week 6 - Constructions. https://www.coursera.org/learn/crypto/lecture/nTRhL/constructions Here he picks a random x from X. And then Hashes X to get the ...
0
votes
1answer
72 views

Making a secure file sharing scheme usable

I am trying to realize a secure file sharing scheme based on asymmetric crypto. Users will access this via browser. In short, it works like this: Users register and set their username and password. ...
0
votes
0answers
39 views

Recommended length for a nonce in hashed-based authentication

Considering the following variation of the SKID3 protocol (1) $A \rightarrow B: r_A$ (2) $B \rightarrow A: r_B || \operatorname{MAC}(r_B||r_A||A)$ (3) $A \rightarrow B: \operatorname{MAC}(r_B||r_A||B)$...
0
votes
0answers
51 views

Deterministic generation of secure private keys from parent private key

is it possible to generate set of child private keys from one parent private key, generated by ECC for example, securely? So that new private key (and derive public key) could be used for encryption ...
9
votes
3answers
21k views

Why are RSA ciphertexts different for the same plaintext?

I am using SpongyCastle for a project on android. I have used RSA to encrypt the data and then decrypt it in another activity, the keys are stored in the shared preferences. I discovered a thing I ...
0
votes
0answers
35 views

How GGH/HNF public key cryptosystem encryption process works

I'm reading paper Lattice based cryptography which at section 5 page 14 it describes GGH\HNF scheme that i can not quite get it and i need help. The private key is a “good” lattice basis $B$. ...
0
votes
0answers
31 views

Is there a secure way of allowing users of my app to selectively share data from an external service?

Is there a secure way of allowing users of my app to selectively share data from an external service with my app? In order for the users of my app to get their personal data from the external service ...
10
votes
4answers
4k views

Why should the RSA private exponent have the same size as the modulus?

Consider the generation of an RSA key pair with a given modulus size $n$ and a known, small public exponent $e$ (typically $e = 3$ or $e = 65537$). A common method is to generate two random primes ...
18
votes
1answer
11k 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 ...
39
votes
5answers
18k views

Does RSA work for any message M?

I decided to read the original RSA paper A Method for Obtaining Digital Signatures and Public-Key Cryptosystem because of a question I had about RSA (which is not the question I'm about to ask, but ...
1
vote
2answers
179 views

What is the need for Diffie-Hellman key exchange when we have asymmetric encryption?

I am new to cryptography and I am having a hard time to understand what is the need for DHKE procedure. I think I fully understand the principle in which it happens and also the mathematics behind it ...
1
vote
1answer
121 views

Encode ASN.1 PKCS#8 Private Key with Public Key and attributes

I'm trying to encode an Ed25519 private key as a PEM file based on this document https://tools.ietf.org/html/rfc8410#page-7 . I'm using an ASN.1 encoder written in Dart, and I can encode the private ...
12
votes
2answers
2k views

More than one private key for RSA

In an RSA-encryption scenario, Bob's public key pair $(n, e)$ is $(143, 43)$. An attacker Mallory tries brute-force and comes to $d = 7$ as the private key. The value of $φ(143) = 120$ is not known to ...
4
votes
1answer
1k 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 ...
5
votes
1answer
10k views

Why ssh-gen makes difference between PEM and PKCS8?

Correct me if I am wrong, but PKCS8 is format to store private key info. It could be binary-enoded (DER) or Base64 encoded (<...
0
votes
1answer
330 views

Finding MSB in RSA

Scenario: Alice and Bob send each other encrypted AES (128) messages. In order to change key, Alice has a public RSA key (2049 bits). Bob has Alice's public key. Bob picks a random AES key, encrypts ...
0
votes
0answers
83 views

Is inverse polynomial in a finite field NP hard?

In ECC we have: if we know $G$ and $P=kG$, it is very difficult to find $k$. I wonder whether or not in NTRUEncrypt: if we know $h$ and $P=rh$, it is difficult to find $r$?
15
votes
2answers
4k views

How do I get the equivalent strength of an ECC key?

I know how to calculate the comparable symmetric strength of an RSA modulus: calculate the running time for a field sieve. This is how NIST gives approximate symmetric sizes for asymmetric algos in ...
0
votes
1answer
104 views

Is there a problem with this specific RSA protocol?

So a protocol uses two random primes $P$ and $Q$ with the equivalent bit length of around 2048 bits, multiplies to form $N$. The encryption function in detail is: $m^e \bmod\ N$ $(\text{512-bit-random-...
5
votes
2answers
1k views

RSA using 2 as a public exponent

I'm failing to see why 2 can never be used and what weaknesses would be associated with doing so. There's a similar question asking why it has to be in the form of $2^n$+1 but why not $2^n$
1
vote
1answer
71 views

What is the more accurate way of stating the correctness of a PK encryption scheme?

Is it more accurate to state that a public key encryption scheme is correct if for all $m \in M$ and $(pk, sk) \in \operatorname{Gen}(1^k)$ a. $\operatorname{Dec}_{sk}(\operatorname{Enc}_{pk}(m))=m\;$ ...
1
vote
3answers
155 views

I don't understand Digital Signature

Why did we call it digital signature if an attacker can pretend to be Bob? Bob hashes his message, encrypts the hash with Alice's public key, and sends it to Alice with the original message. Alice ...
3
votes
2answers
805 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 ...
1
vote
1answer
109 views

Post-quantum asymmetric encryption algorithms

One could use Falcon-512 for establishing a private and public key for an asymmetric context. Whereas in a symmetric context, we could use firesaber/saber/variants in order to obtain a shared secret ...
1
vote
1answer
26 views

Encryption in SET protocol

I have a rough idea of what is symmetric and asymmetric encryption, but I can't apply the idea to the SET protocol (Secure Electronic Transaction Specification), so how the symmetric and asymmetric ...
3
votes
1answer
547 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 ...
1
vote
1answer
82 views

How long to reestablish PKI if Diffie Hellman and Factoring are in classical $P$?

Supposing there is a classical (no need quantum) $O(\log N)$ algorithm to factor integers $N$ and supposing there is a classical (no need quantum) $O(\log p)$ algorithm to find $g^{xy}$ given $g^x$ ...
0
votes
2answers
43 views

SSL Pinning security: can MitM generate the same public key?

This is a very newbie question. SSL Pinning is "safe" in assumption that only the real server can decrypt the public key. By design, it should be almost impossible to find the private key ...
2
votes
3answers
996 views

Can I base a public-key cryptosystem only on a hash algorithm?

Could I base a public and private key system on just using a hashing algorithm? For example: privKey = sha256( randomGenerator() ) pubKey = sha256( privKey ) Why ...
8
votes
2answers
10k views

What happens when a root CA has its private key compromised?

What happens when a root CA has its private key compromised? Then all children in the tree are compromised too? And then all certificates are compromised? What needs to happen then? Related: - How ...
2
votes
0answers
44 views

What grade of protection does a private key's passphrase provide at best?

Does a passphrase with high entropy provide the same level of security as the private key itself? General scenario: An attacker has access to a private key file that is protected with a passphrase ...
0
votes
0answers
25 views

Zero knowledge proof of symmetric keys and encrypted texts resulting in the same text, if the symmetric keys are encrypted with asymmetric ones

Suppose I have: text T, symmetric keys X, Y encrypted text T with symmetric keys X, Y = TX, TY accordingly asymmetric key Z, used to encrypt X, Y to transmit them to a person. Let the encrypted ...
0
votes
0answers
31 views

Key and Message generated on Client, and validated by Server

(Sorry in advance for my blurry thinking on this: I'm a programmer, not a cryptography expert.) I have a Client/Server web application. The Client needs to be able to alter the local state in ways ...
2
votes
1answer
162 views

Is it possible to retrieve the original hash of a digital signature using a public key?

I am running a server that is receiving packets. Each packet is signed with an RSA 512 SHA-256 digital signature. I have a public key and exponent that I use to verify the digital signatures. I'm ...
0
votes
1answer
86 views

How many public keys and private keys are needed for RSA?

I am just learning about RSA encrytion and I am somewhat confused. First two prime numbers $p$ and $q$ must be chosen and multiplied to get $n$. Then we compute Euler function $\varphi (n) = (p-1)(q-1)...
0
votes
1answer
80 views

Why in RSA do we use mod n rather than mod phi(p⋅q)?

When we pick $e$: $$e \in \{1,2,3,4,...,\phi(p\cdot q)-1\}$$ where $\gcd(e,\phi(p\cdot q))=1$. Similarly when computing $d$ which is the modular inverse of $e$ (the private key) we use the extended ...
6
votes
4answers
1k views

Using public key cryptography with multiple recipients

I have a message that I want to send to multiple recipients. Can I encrypt the message separately with each of the recipient's public keys, then send the message thus encrypted to the respective ...
0
votes
0answers
33 views

R, S, and Z values in a transaction using the Transaction ID

How can i get the R, S, and Z values and the Public Key using a transaction IDE i have? I knew of a website called 2coin.org which provided these values but now the website is no more active and it ...
0
votes
0answers
46 views

How can JWE support an integrity check given that it uses a public key to encrypt the message?

As far as I know JWE (JSON Web Encryption) supports both integrity and confidentiality. I agree about the confedintiality because only the recepient with a private key can decrypt a message. What ...
10
votes
2answers
2k views

Why is this not a viable key exchange algorithm? [duplicate]

I was just wondering why this kind of algorithm can't be used instead of, say, Diffie-Hellman to exchange keys: Alice decides on a key she wishes to share with Bob. Alice generates a stream of bytes ...
13
votes
1answer
4k views

Why do we encrypt-then mac but sign-then-encrypt?

This question was asked in comments on my answer to should we sign then encrypt or encrypt then sign. I think posing the question as a separate entity is best, so: The general advice for applying ...
0
votes
1answer
71 views

What would be the most recommended AES && RSA Keys for production?

While I am a front-end developer and not a security expert programmer, I am worry about the keys I am using for my AES && RSA encryption. Please help me to understand: Is the following keys ...
5
votes
1answer
552 views

XOR instead of Multiplication in ElGamal encryption

In the ElGamal encryption scheme, the message $m$ is multiplied with the secret $g^{xy}$ Wikipedia. I don't understand the advantage of it. Why we can't just XOR our message with the shared secret? As ...
1
vote
2answers
91 views

Can the ECDSA still work without present of hashing function? [duplicate]

According to walkthrough steps for ECDSA topic from wikipedia as shown below, What if the impact if we don't apply the hashing function (highlighted in blue in the image) to the raw messages? Although ...
1
vote
2answers
87 views

Using different hashing function with ECDSA

I came across an IC device configuration & security flow and the details are illustrated in image below. I'm wondering must the ECDSA pair with the SHA Hashing function? Alternatively, what if ...

1 2 3
4
5
38