New answers tagged

1

If this is true, how would one solve this in practice? Actually, in practice, what we generally do is not use El Gamal at all, but instead use Integrated Encryption Scheme (IES), which solves the same problem based on the same hard problem, but where one doesn't worry about Quadratic Residues (or the homomorphic properties, or the need to compute inverses, ...


2

Poly1305 itself has the requirement that its keys can only ever be used to generate a tag for a single message. That means that when Poly1305-AES (or another Poly1305-based authenticated encryption algorithm) is used as intended, the Poly1305 authentication key will be different for each message even if a key is reused. However, the various Poly1305-based ...


1

To remain at the introductory level used in the question's reference¹, a simple (and not necessarily perfect) method: if the modulus used is large (hundreds of decimal digits) and significantly larger than the text to encrypt, the right part of the shared secret can be used as a key for a Vigenère cipher. With Vigenère, it is essential for confidentiality ...


2

As the output of the DH key exchange is a number, it has to be converted into big-endian bytes before running it through a hash - say SHA (SHA2 or SHA3) for example, can convert it into a key of the correct length. If you need variable-length keys, then you can use XOFs, which provide variable length outputs. This cannot increase the entropy of the result ...


0

In this case, the only benefit of encrypting the signatures with the session key is to provide mutual Key Confirmation (= one party is assured that the other party is in the possession of the key). The signatures on their own only provide mutual implicit key authentication (=the other party is identified and is the only one that has the possibility to ...


1

I think Crypto++ will help you. This is a cryptography library implemented in C++. Its homepage: Crypto++ Library.


2

Libsodium is written/implementable in C++, C and Python. It implements lots of crypto systems, such as public key cryptography. Here is the intro in the docs: https://libsodium.gitbook.io/doc/


2

It's easier to take the questions out of order. what can be said about the distribution of exponents a+b mod p when b is taken at random from Zp, but a is fixed? If $b$ is a uniform independent random value from the range $[0, p-1]$, that is, the probability of each possible value is $1/p$, and $b$ is distributed independently from $a$, then $a+b \bmod p$...


Top 50 recent answers are included