instruction stringlengths 15 30k |
|---|
Two known strings have the same hash (MD5) value? |
Is there an example of two known strings which have the same hash (MD5) value, i.e. an MD5 collision? |
Are there two known strings which have the same MD5 hash value? |
An authentication and key-agreement protocol between devices shall mutually demonstrate their identity, and establish a shared random secret $R$ suitable for securing later communications.
To that purpose, each of the many devices receive a certificate from a certification authority, binding their identity $ID_i$ (i... |
An authentication and key-agreement protocol between devices shall mutually demonstrate their identity, and establish a shared random secret $R$ suitable for securing later communications.
To that purpose, each of the many devices receive a certificate from a certification authority, binding their identity $ID_i$ (i... |
An authentication and key-agreement protocol between devices shall mutually demonstrate their identity, and establish a shared random secret $R$ suitable for securing later communications.
To that purpose, each of the many devices receive a certificate from a certification authority, binding their identity $ID_i$ (i... |
An authentication and key-agreement protocol between devices shall mutually demonstrate their identity, and establish a shared random secret $R$ suitable for securing later communications.
To that purpose, each of the many devices receive a certificate from a certification authority, binding their identity $ID_i$ (i... |
An RSA signature scheme with public key $(n,e)$, private exponent $d$, and encoding function $enc$ (including but not limited to the question's $enc$), signs message $m$ as $$Sign(m) = enc(m)^d\bmod n$$
Such scheme is insecure if an adversary can figure out $k>0$ distinct messages $m_i$, and integers $u_i$, $r$, $s$... |
Why do we use modular arithmetic so often in Cryptography? |
What is the importance of Modular arithmetic in cryptography? |
How to control the output of a hash function to output to specific data according to similarity? |
What is the definition of Textbook RSA?
What are some of the properties of textbook RSA?
How does it differ from other RSAs? |
RSA is both an encryption and signature function. I have heard the term "textbook RSA" used mostly with the encryption function, but the same basic principle applies to RSA signatures as well. It is essentially RSA without any padding.
There is no canonical definition of textbook RSA (e.g., does it include restricti... |
Here on the ElGamal wikipedia page http://en.wikipedia.org/wiki/ElGamal_encryption
> Alice generates an efficient description of a multiplicative cyclic group **G**, of order **q**, with generator **g**.
How is this done? What are some of the properties here?
|
I am new to here, I was having some problems with a problem I am working on:
"For each of the following variants of the definition of security for signatures, state whether textbook RSA is secure and prove your answer:
(a) In this first variant, the experiment is as follows: the adversary is given the public key ... |
For (a), what if you query the signing oracle on $m' \equiv -m \mod N$? Can you see how to compute $m^d$ given $(-m)^d$? (Hint: $d$ is odd.) |
For (a), what if you query the signing oracle on $m' \equiv -m \mod N$? Can you see how to compute $m^d$ given $(-m)^d$? (Hint: $d$ is odd.)
For (b), try showing that doing this is equivalent to solving the [RSA problem](http://en.wikipedia.org/wiki/RSA_problem). |
Trapdoor functions are a fundamental part of public key cryptography. An example of the most common trapdoor is
- Prime Factorization, used in cryptosystems such as RSA
How are these trapdoor functions found? |
How are trapdoor functions developed/found and where can I find existing ones? |
How we can solve this equation and get the value of M?
8 = M^13 mod 33
not a computer program, but a mathematical operation . |
How we can solve this equation and get the value of M?
$$8 = M^{13} \mod 33$$
not a computer program, but a mathematical operation. |
How do I solve this RSA instance for m? |
I'm not sure what SSL uses to share the symmetric key to both end users, i.e. at the beginning of the communication. Is it RSA? Or El-Gamal? Or something else?
Thanks! |
What does SSL use? RSA? El-Gamal? Elliptic curves? |
I'm working on implementing a cryptographic system and I'm trying to understand the Zero Knowledge Password Proof concept. So here's some background:
To generate a secret key I am:
- Doing an ECDH key exchange and generating 2 secret keys. One key is to encrypt messages and the other key is to HMAC sign the data... |
How do GPG verify that it has succeeded with decryption (in i.e. the symmetric encryption)?
Is something appended to the clear text so there exist some expected data?
$ gpg -c test.txt
$ gpg -d test.txt.gpg
returns
gpg: decryption failed: bad key
when wrong key is entered. How does it know that ... |
How do GPG verify succesfull decryption? |
How do GPG verify that it has succeeded with decryption (in i.e. the symmetric encryption)?
Is something appended to the clear text so there exist some expected data?
$ gpg -c test.txt
$ gpg -d test.txt.gpg
returns
gpg: decryption failed: bad key
when wrong key is entered. How does it know that ... |
How does GPG (or other programs using the OpenPGP file format) verify that it has succeeded with decryption (for symmetrically encrypted data)?
Is something appended to the clear text so there exist some expected data?
For example, I'm using these command lines:
gpg -c test.txt
gpg -d test.txt.gpg
... |
How does GPG verify succesfull decryption? |
One difference between RSA and ElGamal is that ElGamal isn't necessarily deterministic (while RSA is).
What makes it non-deterministic? Is this advantageous to security? How else does this property affect ElGamal encryption or the ElGamal signature scheme? |
Why is ElGamal considered non-deterministic? |
Show that if $n = 35$ is used as an RSA modulus then the encryption exponent $e$
always equals the decryption exponent $d$?
What I have so far:
$n = 35$
Therefore $p = 5$ and $q = 7$ or vice versa, which means euler's phi function is
$\varphi = (5-1) \cdot (7-1) = 24$
Then to find $e$ we need the fact ... |
Show that if $n = 35$ is used as an RSA modulus then the encryption exponent $e$
always equals the decryption exponent $d$?
What I have so far:
$n = 35$
Therefore $p = 5$ and $q = 7$ or vice versa, which means Euler's phi function is
$\varphi = (5-1) \cdot (7-1) = 24$
Then to find $e$ we need the fact ... |
Show that if $n = 35$ is used as an RSA modulus then the encryption exponent $e$
always equals the decryption exponent $d$?
What I have so far:
$n = 35$
Therefore $p = 5$ and $q = 7$ or vice versa, which means Euler's phi function is
$\varphi = (5-1) \cdot (7-1) = 24$
Then to find $e$ we need the fact ... |
Question: Suppose **A** encrypts a number $x$ which indicates her bid on a contract, using ElGamal encryption. Say that the encryption of $x$ produces a ciphertext $c$. Explain how **E** can modify $c$ to make it an encryption of $100 \cdot x$.
Answer: **E** is exploiting the malleability of ElGamal. She can take t... |
Show how if Alice uses the same value of $k$ to sign two different messages $m_1$ and $m_2$, using the ElGamal signature scheme, Eve can recover the value of $a$ from the corresponding signatures $(m_1, r_1, s_1)$ and $(m_2, r_2, s_2)$. (Note: you are allowed to assume that if $gcd(a, n) = d$ then there are $d$ solutio... |
Affine Cipher:
$Enc(m) = (ax + b) \mod m$
$Dec(c) = a^{-1}(x-b) \mod m$
For a brute-force key search, we need to do $a \cdot b$ encryptions in the worst case.
For a meet-in-the-middle attack, how many encryptions/decryptions do we need to do in the worse case?
Side question: How is $a^{-1}$ calculated? ... |
Affine Cipher:
$Enc(x) = (ax + b) \mod m$
$Dec(x) = a^{-1}(x-b) \mod m$
For a brute-force key search, we need to do $a \cdot b$ encryptions in the worst case.
For a meet-in-the-middle attack, how many encryptions/decryptions do we need to do in the worse case?
Side question: How is $a^{-1}$ calculated? ... |
Affine Cipher:
$Enc(x) = (ax + b) \mod m$
$Dec(x) = a^{-1}(x-b) \mod m$
For a brute-force key search, we need to do $a \cdot b$ encryptions in the worst case.
For a meet-in-the-middle attack, how many encryptions/decryptions do we need to do in the worse case?
Meet-in-the-middle attack definition: Affin... |
If there are 4 people involved, and every two of them should be able to know the secret (the polynomial is just a line) and you are given f(x) and x for each of those people, and you know one of them is a cheater, how do you find the cheater? |
How do you find a cheater in Shamir Secret Sharing? |
Depending on the framework you are using, there are various padding modes that can be used with AES encryption. For example, with .NET we can choose PKCS7, ISO10126, ANSIX923, Zeros or None.
I understand that the encryptor and decryptor need to use the same mode to be interoperable.
What considerations are there ... |
Imagine I have a blob that I want to [encrypt-then-MAC][1]. Now, what I can realistically ask my users for (out of UX considerations) is just an encryption password. Naturally, I bcrypt original password and use bcrypted value as an encryption key. Using the same key for MAC purposes seems risky to me, so I reckoned I'... |
How safe is it to derive MAC key from a hashed password? |
> Suppose a message $m$ is divided into blocks of length $160$ bits: $m
> = M_1 || M_2 || ... || M_l$ And define $h(m) = M_1 \oplus M_2 \oplus ... \oplus M_l$
>
> Which of the three desirable properties of a good cryptographic hash
> function does h satisfy? Show that it does not satisfy the other two.
Three d... |
How are these three problems related?
From my understanding, since the Discrete Log(DL) Problem is considered hard, then so is CDH.
And since CDH is considered hard, then so is DDH.
http://en.wikipedia.org/wiki/Decisional_Diffie%E2%80%93Hellman_assumption
On the wikipedia article for DDH it mentions that DDH ... |
**The problems:**
* The Discrete Logarithm problem: Given $y$, find $x$ so that $g^x = y$.
* The Computational Diffie-Hellman problem: Given $y_1 = g^{x_1}$ and $y_2 = g^{x_2}$ (but not $x_1$ and $x_2$), find $y = g^{x_1·x_2}$.
* The Decisional Diffie-Hellman problem: Given $y_1, y_2, y_3$, decide if they are of t... |
**The problems:**
* The Discrete Logarithm problem: Given $y$, find $x$ so that $g^x = y$.
* The Computational Diffie-Hellman problem: Given $y_1 = g^{x_1}$ and $y_2 = g^{x_2}$ (but not $x_1$ and $x_2$), find $y = g^{x_1·x_2}$.
* The Decisional Diffie-Hellman problem: Given $y_1, y_2, y_3$, decide if they are of t... |
How are the three problems *Discrete Logarithm*, *Computational Diffie-Hellman* and *Decisional Diffie-Hellman* related?
From my understanding, since the Discrete Log (DL) Problem is considered hard, then so is CDH.
And since CDH is considered hard, then so is DDH.
On the [Wikipedia article for DDH][1] it mentio... |
What is the relation between Discrete Log, Computational Diffie-Hellman and Decisional Diffie-Hellman? |
Is EKE attackable by a brute-force password search? |
From the RFC I understand how HOTP generates OTPs by incrementing a counter and uses the 'look-ahead' window to try to resynchronise (from this counter), if the user tries a few wrong passwords.
Say the user leaves their token with their cat, which decides to generate 200 passwords while rolling around with it. This... |
How is de-synchronisation of HOTP solved? |
From [RFC 4226][1] I understand how HOTP generates one-time passwords by incrementing a counter and uses the 'look-ahead' window to try to resynchronise (from this counter), if the user tries a few wrong passwords.
Say the user leaves their token with their cat, which decides to generate 200 passwords while rolling ... |
For RSA and El Gamal (and most other public key cryptosystems), one of the key ideas is that factoring and finding discrete logarithms are hard. There are other systems that rely on certain properties of lattices.
What are the other one-way-ish functions that have cryptosystems designed around them? |
What other one-way functions are used in cryptosystems? |
How does GPG verify succesful decryption? |
Can you append a hash to the end of the data before encrypting it? That would be a simple way to verify the data.
MSG' = MSG + SHA(MSG)
Store: Encrypt(MSG')
After decryption, verify that the data hash matches. |
We're using the Objectivity/DB object database with a custom encryption plugin that encrypts serialized objects on disk. Encryption uses AES with a shared secret key held by all users. I would like to be able to provide some guidance to users if they enter the "wrong" shared encryption key (as in "I think you mistyped ... |
Can I determine if a user has the wrong symmetric encryption key? |
Show how if Alice uses the same value of $k$ to sign two different messages $m_1$ and $m_2$, using the ElGamal signature scheme, Eve can recover the value of $a$ from the corresponding signatures $(m_1, r_1, s_1)$ and $(m_2, r_2, s_2)$. (Note: you are allowed to assume that if $\gcd(a, n) = d$ then there are $d$ soluti... |
I want to be able to verify the integrity of a ciphertext by providing the cleartext hash, for this to work it would need to:
$$hash(crypt(cleartext)) = f(hash(cleartext))$$
Where $f$ is an arbitrary function mapping the cleartext hash to the ciphertext hash.
Is there such a pair? |
Verifying the integrity of ciphertext using the cleartext hash? |
There really isn't such a function $f$; encryption algorithms attempt to generate what looks like random bitstrings (at least, it looks that way to anyone who doesn't know the key), and because the plaintexts and the ciphertexts look unrelated, their hashes are also going to look unrelated.
On the other hand, what i... |
I want to be able to verify the integrity of a ciphertext by providing the cleartext hash, for this to work it would need to:
$$hash(crypt(cleartext)) = f(hash(cleartext))$$
Where $f$ is an arbitrary function mapping the cleartext hash to the ciphertext hash.
Is there such a pair?
**Update**: I'm trying to ... |
At least it's my understanding that AES isn't affected by known-plaintext. Is it immune to such an attack, or just resistant? Does this vary for chosen-plaintext? |
Why is AES resistant to known-plaintext attacks? |
I really don't have an answer (other than saying that storing a hash of the password is good as any other way of solving your immediate problem; there are other ways, but they all allow an attacker to run a dictionary attack on the database).
On the other hand, I do have these comments on what you're doing:
- If ... |
A known-plaintext attack (i.e. knowing a pair of corresponding plaintext and ciphertext) always allows a *brute-force attack* on a cipher:
* Simply try all keys, decrypt the ciphertext and see if it matches the plaintext.
This always works for every cipher, and will give you the matching key. (For very short plai... |
I am familiar with Challenge-Response Authentication scheme.
However I would like to know actual message content sent between client and server for 1 way authentication, over an insecure channel.
When the user enters the password, is the password encrypted and sent, or is the hash of the password encrypted and se... |
How is the password sent across for verification? |
The usual ways to check that a user-supplied encryption key is correct are to either:
* store a (salted) hash of the key, and check that it matches, or
* encrypt a (partially) known block of data with the key and check that the decrypted output has the expected form.
The former method is exactly same as what y... |
Is there any reasonable [homomorphic encryption][1] protocol that supports some meaningful fragment of regular languages/expressions and/or edit distance bounds?
I'm suspicious that homomorphic encryption never handles this sort of "insert bounded amount of arbitrary garbage", but maybe a subset of regular expressio... |
How close is homomorphic encryption to handling regular expressions? |
In general, it seems that right now, searching on encrypted data is still quite limited. Besides CryptDB, [SADS][1] is another that I have seen. Without knowing more about your security requirements, however, it will be hard to say exactly (e.g., is the regex kept private or is only the data that it is being matched ag... |
Is there's a way for someone (with the key) to decrypt a message encrypted with the cipher mode shown?
![Cipher description][1]
[1]: https://i.stack.imgur.com/Ao8Ec.png |
Does this block cipher mode allow for decryption? |
Is there's a way for someone (with the key) to decrypt a message encrypted with the cipher mode shown?
![Cipher description][1]
$$ P_0 = IV $$
$$ C_i = P_{i-1} \oplus E_K(P_i) \oplus P_i $$
[1]: https://i.stack.imgur.com/Ao8Ec.png |
As poncho notes, knowing the _last_ plaintext block (and the key, of course) allows all the other blocks to be decrypted. Also, given this knowledge, the "IV" is completely unnecessary for decryption, as is the first block of the ciphertext!
So, let's change the system a bit, adding the IV to the _end_ of the plain... |
Does an attacker gain any advantage by knowing which initialisation vector was used for encryption? |
Does an attacker gain an advantage if they have the initialisation vector? |
I'm curios about protocols which leak considerable personal information, like instant messaging exposing the contacts relation. How does one make an instant messaging protocol which is resistant to traffic analysis?
I could imagine an anonymous open mailbox like protocol. A public key's hash identifies a public ma... |
How does one design a traffic analysis resistant protocol? |
I'm curios about protocols which leak considerable personal information, like instant messaging exposing the contacts relation. How does one make an instant messaging protocol which is resistant to traffic analysis?
I could imagine an anonymous open mailbox like protocol. A public key's hash identifies a public ma... |
I'm curios about protocols which leak considerable personal information, like instant messaging exposing the contacts relation. How does one make an instant messaging protocol which is resistant to traffic analysis?
I'm interested most specifically in server side attacks on users' contacts/friends lists. In partic... |
I'm looking for a related key scheme for elliptic curve cryptography. The basic idea would be that there would be a master public key and a master private key. From the master public key, you could generate a series of public keys. From the master private key, you could generate the corresponding series of private keys... |
A signature of some data can mean many different things, such as: This is a message I sent, this is a certificate I validated,... So I was surprised that common signing schemes don't include a "purpose" parameter as part of the signature. In particular I didn't find such a parameter in the schemes from PKCS#1.
Other... |
I've been trying a long time to understand a thing which is obviously extremely simple, but i just can't get it.
Read this,please:
"The NTRUEncrypt PKCS uses the ring of truncated polynomials R combined with the modular arithmetic described in Section 1. These are combined by reducing the coefficients o... |
I've been trying a long time to understand a thing which is obviously extremely simple, but i just can't get it.
Read this,please:
"The NTRUEncrypt PKCS uses the ring of truncated polynomials R combined with the modular arithmetic described in Section 1. These are combined by reducing the coefficients o... |
I am currently using AesManaged encryption for my silverlight application. Is AESManaged encryption has a severe trade compliance issue in Bureau of Industry and Security in terms of shipping the application internationally?
TIA |
I am currently using AESManaged encryption for my silverlight application. Does AESManaged encryption have a severe trade compliance issue in Bureau of Industry and Security in terms of shipping the application internationally?
|
Assuming that the salts are sufficiently long (16 random chars) is there any advantage in using a per-application salt in addition to a per-secret salt when storing hashed passwords in a database?
The per-application salt would held in the code. The per-secret salt would be held in plain text on the same database e... |
In storing passwords in a database should I use a per-application salt in addition to a per-secret salt? |
According to Wikipedia:
> Related-key attacks can break AES-192 and AES-256 with complexities 2176 and 299.5, respectively.
What are the requirements for these attacks (i.e how many related keys, what should the relationship between the keys be)? Optionally, how do the attacks work in summary? |
According to Wikipedia:
> Related-key attacks can break AES-192 and AES-256 with complexities 2^176 and 2^99.5, respectively.
What are the requirements for these attacks (i.e how many related keys, what should the relationship between the keys be)? Optionally, how do the attacks work in summary? |
I'm revising for a cryptography exam at the moment and I'm having some problems with a question.
The question looks for the key length of a cipher given that the word "earthquake" appears in the plaintext.
Ciphertext:
aaatr ksams itahb netrs weurs rheti aadne ttrht eakgt snqid s
I was wondering how I use the... |
Instead of using actual data for one time pads, what would be different if the code for an algorithm was exchanged so that to acquire the pad one would execute the algorithm and use its output? Why is this not being used?
An algorithm would be much shorter and could generate a significant amount of chaotic informat... |
Why not use an algorithm's code rather than data itself for one time pads? |
well, i'm not going to explain this but after looking at [redshirt.c](http://www.mario-konrad.ch/file.php?id=14012); the core part of the program is that after skipping the header (which is `"REDSHIRT"` (9 bytes includes an ending null byte)), it has a loop which does:
int j;
j = (j & 0x7F) + (~j & 0x80);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.