New answers tagged

0

Imagine I run a vote, where 200 people send either “yes” or “no”, obviously encrypted. And a hacker collects all the encrypted messages and their sources. Then the hacker knows which 127 people voted one way and which 73 voted another way. And if the result of the vote is published then the hacker knows exactly who voted “yes” and who voted “no”. So the ...


1

Using Diffie-Hellman also improves security, as in forward secrecy. There are protocols that use asymmetric keys to verify that the other party is who they say they are, then Diffie-Hellman to negotiate a key to use for symmetric encryption of the actual information exchange. The attack scenario is the following: An eavesdropper logs all the (encrypted) ...


3

when the client send something to the server it will be encrypted with the server's public key (so only the server can decrypt it) and vice versa (when server has to send something to the client it will be encrypted with the client's public key) As I understand it, you are suggesting not to bother using symmetric encryption; instead, have both sides ...


2

This is more about representation and manipulation of data in a computer program than cryptography. Questions about Dart or the use of libraries in Dart, are better asked on Stackoverflow. The [0] and [1] are context-specific tags; more exactly they are tags that are not universal (because then the number-type mapping would be fixed and known) with a class ...


10

RSA private key can be found in two ways with $n = p\cdot q$, $p = 11$ and $q = 13$ if Euler's totient function is used as in RSA paper: $$\varphi(n)= (p-1)(q-1) = 120$$ is used then $d = 67 = e^{-1} \bmod 120$ If Carmichael Function used as requried in FIPS 180.4and allowed in PKCS#1 v2.2 standards: $$\lambda(n) = \text{LCM}(p-1,q-1) = 60$$ is used ...


18

This question can be summarized: the attacker found a $d$ that did not satisfy $e \cdot d \equiv 1 \pmod{ \phi(n) }$, but it works; what's going on. It turns out that $e \cdot d \equiv 1 \pmod{ \phi(n) }$ is not necessary (it is sufficient). The necessary and sufficient conditions are: $$e \cdot d \equiv 1 \pmod{p-1}$$ $$e \cdot d \equiv 1 \pmod{q-1}$$ If ...


2

You have some errors on the definition of the Regev's Scheme Keygen($1^n$): sk : choose $t = (1,s)^t \in \mathbb{Z}_q^{n}$ where $q$ is an prime between $n^2$ and $2n^2$ pk = $B \in \mathbb{Z}_q^{m\times n}$ random except $[B \times t]_q$ "small" $Encryption(B,\mu \in \{0,1\}$: For random $r \in \{0,1\}^m $ output and $\mu \in\{0,1\}$ $$c \...


1

I am assuming you meant to use a=2, so that if it sends an error message, we know that MCB was 1. Anyway RSA in practice is never used in raw form like this precisely because this malleability allows attacks like you just mentioned. Such malleability also allows an attacker to create fake signatures from an oracle and with good padding, we cannot trick any ...


0

Actually, I had thought something about it for long. Using password with a salt and a KDF to derive a key which is used to encrypt a key table which stores the user's signing private key and randomly generated key for each content.The key table needs to be decrypted and re-encrypted every time user changes a password. Then the user also uses that to encrypt ...


1

The proposed system is close to the safe RSA-KEM, with some exceptions: The condition $\gcd(P-1,e)=1$ and $\gcd(Q-1,e)=1$ is missing. This must be checked when generating $P$ and $Q$. In the case of prime $e$ (as in the question) this simplifies to $P\bmod e\ne1$ and $Q\bmod e\ne1$. The random key is 512‑bit, when in RSA-KEM it is typically drawn in $[0,P\,...


2

Katz and Lybushavesky just (yesterday) released a book on lattice based cryptography. My particular copy is still shipping, so I can't mention whether it covers what you are in particular interested in, but as: Lyubashevesky is a co-author of both the KYBER and DILITHIUM finalists Katz's prior book (with Yehuda Lindell) Introduction to Modern Cryptography ...


0

If your goal is to understand the NIST submissions, all of them are required to have a "design rationale" section in their specification documents. These often point to relevant papers as well. In addition, their presentations (see this and this and this) are often helpful in explaining intuitively the underlying principles. If your focus is ...


1

I had this question in my homework and here how I answer it When we want to pick $d$ as a private key, we calculate it by $ed = 1\ mod\ \phi(n)$ this means d is modular multiplicative inverse of e in mod $\phi(n)$ and $\phi(n) = (p-1).(q-1)$, $p$ and $q$ are prime numbers. $\phi(n)$ is always an odd number if $e=2$, $gcd(2,\phi(n)) \neq 1 $ so there is no ...


5

Deciding among a or b is a matter of choice of definition of public-key encryption. Clearly a is desirable, and b is a fallback in order to allow some interesting cryptosystems. The definition is chosen according to the cryptosystem studied, as in c. As pointed by poncho in comment, in b as it stands, the meaning is that for all keys and messages, there's ...


0

Digital signatures take place in reverse from asymmetric encryption. In asymmetric encryption if Bob wants to send a message to Alice, Bob will take Alice's public key, use it to encrypt his data, and then send that to Alice. Which of course only Alice can decrypt because she is the only owner of her private key. In digital signatures, Bob takes an agreed ...


1

Sorry for the downvotes, some users in the community can be toxic sometimes. Anyway, a digital signatures (decryptable, like in RSA or not like in DSA variants) are something that can only be created using a private key and verified using a public key using some very clever mathematics with decades of scrutiny. Hope this helps.


4

bob hashes his message and encrypt it with alice public key No, Bob would sign it with his own private key. For some signature methods, this is roughly similar to "encrypting with the private key", however for other signature methods, it's not; hence it is safer to keep a strong distinction between 'signing' and 'encrypting' alice receives the ...


Top 50 recent answers are included