# Tag Info

4

Alice and Bob's keys are used to compute a shared key. Both parties compute the same key, which is used both encryption and decryption. This is a traditional, hybrid encryption system. Using only asymmetric cryptography for encryption would be painfully slow. As a mitigation, the sender can create an ephemeral key pair, deleted right after the message ...

0

The scheme is secure due to the use of asymmetric crypto. Instead of signing the timestamp, the SHA256 of the request body may be signed using libsodium's crypto_sign(). And this can effectively prevent replay attacks. A similar scheme may be done even using symmetric cyphers to improve performance. Client Registration Generate random clientid, ...

2

Using public key cryptography instead of a long-term shared secret is slightly more complicated but has major advantages. One of them being that the server doesn't learn the secret key. This protects against accidental leaks, but also insider threats. If this is an option, you can use client TLS certificates. Most HTTP client libraries support this, but web ...

1

When you exponentiate a number $x$ modulo $n$ to the $i$-th power, as you increase $i$, you will eventually reach $x$ again. In your example, $89^{3017} \pmod{3127} = 89$. This "magic exponent" is computed as $\phi(n) + 1 = (p-1)(q-1) + 1$. This is Euler's Theorem, see the Wikipedia article for a proof. In RSA, we choose the numbers $e$ and $d$ such that, ...

4

I am assuming that you are encrypting $x$ under a different public key from potentially a different scheme. The answer is yes, since every language in NP can be proven in zero knowledge. The question, of course, is can this be done efficiently. The answer to that depends on the schemes involved.

2

What an interesting question! Yes, it certainly could. The math required to carry out RSA encryption, for example, have been known for millennia. The most complex algorithms are: Primality testing for key generation. I think that the first efficient algorithm was Fermat's, from ~1600 Euclid's, which is from 300 BC Binary exponentiation, which I couldn't ...

1

The private key can be anything within the group order, if you take the key more than 32 bytes, then your key will work, but due to the cyclic nature of the group, your public key will be equal to the remainder of the key from the group order (modulo the group order). As for the public key, it will not necessarily be 64 bytes (two numbers are the x and y ...

0

From the official specifications, published by NIST; https://csrc.nist.gov/publications/detail/sp/800-73/4/final NIST Special Publication 800-73-4 Interfaces for Personal Identity Verification – Part 1: PIV Card Application Namespace, Data Model and Representation A.5 Key Establishment Schemes with the PIV Key Management Key ...

3

Well, to explain that, I have to touch lightly on what a group is, and how both operations involve a group. A group [1] is a set of values, along with an operation (which I'll denote as $\odot$); with this operation, we take two values, smash them together, and generate a third one [2]. One example of a group are the numbers, along with the operation of ...

1

The two main examples of discrete logarithms in crypto are the multiplicative group of a finite field: the integers modulo a prime $p$ with the multiplication elliptic curves: points with an operation to add them For the first one, we look at the subgroup generated by a number $g$ called the generator : $$1, g, g^2, \ldots, g^{q-1},$$ and $g^q = 1$, so ...

0

I'm editing a previous response I wrote here. Apologies if you read the other. I missed that you gave the context of a instant messaging protocol. Your process description is very different from how TLS implements forward secrecy. At this point I'd just say that in your scenario, it is not necessary that each message use a new symmetric key. It's ok to ...

0

One trivial solution is to let the message be: $$M = (c_{\text{Alice}}, c_{\text{Bob}}) = (Enc_{k_{pub,A}}(m), Enc_{k_{pub,B}}(m))$$ Whether this counts as a "single message" or not is difficult to say. Even if it does, it has the (unfortunate) property that Alice/Bob can't distinguish between: M = (Enc_{k_{pub,A}}(m), Enc_{k_{pub,B}}(m)),\quad M' = (Enc_{...

8

The leading 04 byte is specified by the SEC standard (which is based on the ANSI X9.62 standard). It indicates that the public key point is not compressed. If the key is compressed, it uses 02 or 03 as leading byte depending on the lower bit of the y coordinate. EdDSA public keys do not use this byte for two reasons: It always uses compressed points; there ...

9

(minisign author here) As noted by corpsfini, keys encode the Y coordinate. The X coordinate is recovered using the curve equation: X = sqrt((Y^2 - 1) / (d Y^2 + 1)). The square root has two solutions, so we need to encode the sign of x as well. Since coordinates only require 255 bits, we have a extra bit, used to encode the sign. X and Y ∈ [0; 2^255-19[, ...

0

A Bad Answer For Dummies / Web Developers I'm going to give a bad answer to this for the types of people like myself who aren't mathematicians, but who could reasonably solve FizzBuzz or calculate a Fibonacci sequence. TL;DR You can't do this without a library (at least not as far as I can tell). A Mix of Terms d vs $k$, $a$, and $b$ d is the private ...

3

Suppose you have two message signature pairs and following values are then public i.e. known to you - The public keys: $Q_1 (= x_1G)$, $Q_2 (= x_2G)$ The messages and their hashes: $m_1$, $m_2$, $H(m_1)$, $H(m_2)$ The signatures: $(r_1, s_1)$, ($r_2, s_2$) The following are unknown - The private keys: $x_1$, $x_2$ The nonce: $k$ The following relations ...

2

But assuming everything else being equal, does a larger key size increase the data size compared to the original data in asymmetric encryption? Yes. The ciphertext will somehow have to include some kind of result that is related to the asymmetric algorithm. And the size of that result commonly depends on the key size. So for instance for RSA encryption the ...

0

NO! because if you use the same K(random number), then R will be the same for any signature on the same curve: R depends only on KG (G generation point on curve) Example: we have two signatures (r1,s1), (r2,s2) If K is the same, then the key can be calculated as follows: r1=r2 (because r=xP modn and P=kG (G generation point on curve) is the same for both ...

0

The key is shared via email, via scp/rsync/ssh-copy-id (remote copy), or by editing the settings of your account on a website. If you look in a web application that supports PKI, there will be an option under settings where you can upload your public key. Running an agent on your trusted OS machine (which has your private key) allows automatic verification ...

0

Be careful when comparing key sizes. Different algorithms require different sized keys to achieve equivalent security. There are significant differences between symmetric block cipher key sizes and asymmetric (public/private) key sizes; and among asymmetric algorithms there are big differences, too. Symmetric ciphers, such as AES, DES, Blowfish, etc., have ...

4

In addition to kelalaka's answer, keep in mind that the amount of data that can be encrypted with RSA is relatively small (keysize+padding/8), so most schemes use hybrid encryption to use RSA to encrypt a symmetric key and some other critical information and most data is encrypted using the symmetric key.

3

Yes, for the RSA larger modulus $n = p \cdot q$ means that you can encrypt larger plaintexts. The modulus determines the size of the plaintext space. Keep in mind that, for proper RSA encryption (which is not textbook RSA), you need padding schemes like PKCS#1 v1.5 or OAEP padding schemes to be secure against attacks. The padding schemes will reduce your ...

Top 50 recent answers are included