instruction
stringlengths
15
30k
I understand that most stream ciphers, due to being applied with a simple XOR, are specially fragile against data tampering, and must be used with some MAC mechanism. So I am investigating the use of UMAC for this purpose. I also understand that UMAC works by XORing an universal hash function based on a secret key w...
**No**, its not safe to seed a PRNG with the hash of a password, and generate a key from it. That is especially bad with DSA and shared parameters $(p,q,g)$, and only slightly less unsafe for RSA, or DSA with per-key parameters $(p,q,g)$. **Two essentials things are missing: some _slow step_, and _salt_.** If the pr...
I have read about block cipher, but I do not understand the topic completely. Is a block cipher a way to send data or a way to encrypt data? How is the data divide into multiply blocks before it is sent? Is the data partitioned before the encryption process or afterwards? How long are the blocks? Can I choose...
Let me know a cryptographic symmetric system with only two functions say S() and P() and it should satisfy the following conditions: 1. There will be two independent computers say M1 and M2 (no connection exists between them) and only one function should be stored in a machine. i.e. Function S() will be execut...
I have read about block ciphers, but I do not understand the topic completely. Is a block cipher a way to send data or a way to encrypt data? How is the data dividec into multiply blocks before it is sent? Is the data partitioned before the encryption process or afterwards? How long are the blocks? Can I choo...
What is a block cipher?
I have read about block ciphers, but I do not understand the topic completely. Is a block cipher a way to send data or a way to encrypt data? How is the data divided into multiply blocks before it is sent? Is the data partitioned before the encryption process or afterwards? How long are the blocks? Can I choo...
Let me know a cryptographic symmetric system with only two functions say S() and P() and it should satisfy the following conditions: 1. There will be two independent computers say M1 and M2 (no connection exists between them) and only one function should be stored in a machine. i.e. Function S() will be executed...
[AES][1] comes with key sizes of 128, 192, and 256 bit. But in Truecrypt or other crypto software we can use passwords of different length, even less than 128 bit or more than 256 bit. How is this possible? [1]: http://en.wikipedia.org/wiki/Advanced_Encryption_Standard
How can encryption software accept password lengths which are not one of the AES key lengths?
As for the question "how difficult would it be to solve a random instance of a discrete log problem modulo an RSA modulus", well, it turns out that we can give a fairly solid answer; which is essentially "about as difficult as factoring the modulus". Here's is a demonstration that the discrete log problem is not dra...
As for the question "how difficult would it be to solve a random instance of a discrete log problem modulo an RSA modulus", well, it turns out that we can give a fairly solid answer; which is essentially "about as difficult as factoring the modulus". Here's is a demonstration that the discrete log problem is not dra...
Let $$(g,h=g^s,q)$$ be a tuple such that $g$ is a generator for a group $\mathbb{G}$ of ord $q$ and $s$ is uniformly random in $\mathbb{Z}_q$. The KEA1 Assumption saies that for any adversary $\mathcal{A}(g,h,q)$ that outputs a value $(C,Y)$ such that $C^s \equiv Y$ then there exists a **extractor** $\mathcal{B}$ th...
As for the question "how difficult would it be to solve a random instance of a discrete log problem modulo an RSA modulus", well, it turns out that we can give a fairly solid answer; which is essentially "about as difficult as factoring the modulus". Here's is a demonstration that the discrete log problem is not dra...
**No**, it's not safe to seed a PRNG with the hash of a password, then generate a key from that PRNG. That is especially bad with DSA and shared parameters $(p,q,g)$, and only slightly less unsafe for RSA, or DSA with per-key parameters $(p,q,g)$. **Two essentials things are missing: some _slow step_, and _salt_.** ...
Let me know a **cryptographic symmetric stream cipher system** with only two functions say S() and P() and it should satisfy the following conditions: 1. There will be two independent computers say M1 and M2 (no connection exists between them) and only one function should be stored in a machine. i.e. Function S(...
In many cryptographic protocols, some informations are transmited within smart cards. So, what is a smart card ? is it a physical card ? what's its interest in cryptographic protocols ?
What is a smart card?
I am trying to generate 2 x509 certificates with the same signature but different values in the common name field, based on md5 collisions, as it was specified in [this paper](http://marc-stevens.nl/research/papers/EC07-SLdW.pdf#page=7) (page 7). Now I have successfully created 2 files with the same md5 value, that ...
I am trying to generate 2 x509 certificates with the same signature but different values in the common name field, based on md5 collisions, as it was specified in [this paper](http://marc-stevens.nl/research/papers/EC07-SLdW.pdf#page=7) (page 7). Now I have successfully created 2 files with the same md5 value, that ...
As for the question "how difficult would it be to solve a random instance of a discrete log problem modulo an RSA modulus", well, it turns out that we can give a fairly solid answer; which is essentially "about as difficult as factoring the modulus". Here's is a demonstration that the discrete log problem is not dra...
what are the main pros and cons of proving the "security" of a crypto scheme under simulation proofs instead of game based proofs?
What are the differences between proofs based on simulation and proofs based on games?
Hopefully the question isn't too broad or off. Basically, are there any practical, and by practical I mean secure enough that a ciphertext only attack is infeasible, key-less cryptosystems? For example, there's the Caesar Cipher (I'm aware of the fact that it can pass as a special case of the shift cipher with the k...
Do practical key-less cryptosystems exist?
What is the expert cryptographic opinion on the following? Assume that there is a web server and a client on web page. User on the Client calls an OTP web service on the server which a) creates a RSA key pair b) generates a random 10 digit string - the Message c) Encrypts the Message with the Public Key compo...
I've the following problem: two parties, A and B, share a secret key Kab. M is a plaintext message, H an unkeyed hash function A send to B `M, H( Kab | M )` (where | means concatenation). If we want to provide data origin authentication and data integrity (no confidentiality required) my exercise states that we...
While reading [this articles on rank attacks on STS](http://eprint.iacr.org/2004/237) (a public-key scheme based on Multivariate Quadratic (MQ) equations), I stumbled upon a claim that I've also seen in other presentations on rank-attacks. However I'm not able to see why this claim follows. A description of STS and ran...
Why does this claim for rank-attacks work?
> **Possible Duplicate:** > [Why is H(k||x) not a secure MAC construction?](http://crypto.stackexchange.com/questions/1070/why-is-hkx-not-a-secure-mac-construction) <!-- End of automatically inserted text --> I've the following problem: two parties, A and B, share a secret key Kab. M is a plaintext message, H a...
A Smart Card is a physical device, often in the format of a traditional credit card (sometime much smaller: an example is the SIM card in a mobile phone), embedding: 1. An [Integrated Circuit][1] with memory providing permanent data retention; that's using [EEPROM][2], [Flash][3], or [FRAM][4] in most of today's Sma...
I'm testing an implementation of Bitcoin, which uses the curve Secp256k1 for ECDSA, and I want to see how it handles the point at infinity (0) if present in a signature (r,s) as r or s. How it is encoded? Can it be encoded?
How is the point at infinity encoded in a Secp256k1 signature?
I'm testing an implementation of Bitcoin, which uses the curve Secp256k1 for ECDSA, and I want to see how it handles the point at infinity (0) if present in a signature. For example, r could be the x coordinate of the encoding of the point at infinity. How is the 0 encoded? Can it be encoded? I found that bouncy...
How is the x coordinate of a "point at infinity" encoded in a Secp256k1 signature?
I'm not sure that I understand the question completely, as there are plenty of proofs of real-ideal simulation-based definitions that are proved in a "sequence of games" style. So, I think that the question being asked might be either of the following: 1. Rather than comparing proofs, perhaps the question is about *...
I'm not sure that I understand the question completely, as there are plenty of proofs of real-ideal simulation-based definitions that are proved in a "sequence of games" style. So, I think that the question being asked might be either of the following: 1. Rather than comparing proofs, perhaps the question is about *...
A Smart Card is small portable physical device, typically flat and in the format of a traditional credit card (sometime much smaller: an example is the SIM card in a mobile phone), embedding: 1. An [Integrated Circuit][1] with memory providing permanent data retention; that's using [EEPROM][2], [Flash][3], or [FRAM]...
A Smart Card is small portable physical device, typically flat and in the format of a traditional credit card (sometime much smaller: an example is the SIM card in a mobile phone), embedding: 1. An [Integrated Circuit][1] with memory providing permanent data retention; that's using [EEPROM][2], [Flash][3], or [FRAM]...
While reading [this article on rank attacks on STS](http://eprint.iacr.org/2004/237) (a public-key scheme based on Multivariate Quadratic (MQ) equations), I stumbled upon a claim that I've also seen in other presentations on rank-attacks. However I'm not able to see why this claim follows. A description of STS and rank...
A Smart Card is small portable physical device, typically flat and in the format of a traditional credit card (sometime much smaller: an example is the SIM card in a mobile phone), embedding: 1. An [Integrated Circuit][1] with memory providing permanent data retention; that's using [EEPROM][2], [Flash][3], or [FRAM]...
A Smart Card is small portable physical device, typically flat and in the format of a traditional credit card (sometime much smaller: an example is the SIM card in a mobile phone), embedding: 1. An [Integrated Circuit][1] with memory providing permanent data retention; that's using [EEPROM][2], [Flash][3], or [FRAM]...
I am writing a program which will use Chi-Square to determine which is the correct keyword for a ciphertext via Vigenere Cipher. I came across a website that describes the Chi-Square statistics in a rather simplistic manner and had also written some code to achieve my goals. However, the actual keyword does not seem...
In many cryptographic protocols, some information is transmitted within smart cards. So, what is a smart card? Is it a physical card? What are they used for in cryptographic protocols?
Whenever you have two functions such that, for any X and any Y, X == S(P(X)) and also Y == P(S(Y)), then X and Y are [bijective functions][1]. With modern secure communication systems, exactly the same plaintext message can be encrypted to many different ciphertext messages -- in particular, they are design...
The use of the nonce proceeds like this : 1. Generate 37 random 32 bit integers 2. Pack these into bytes 3. Using the user key (which has been scheduled), encrypt these bytes, so the nonce can be saved to file 4. Concatenate the original (unscheduled) user key with the unencrypted nonce bytes 5. Reschedule ...
We are having a requirement to store large files (~1GB) encrypted and decrypt them when reading. We are looking to use AES-CTR or AES-GCM mode to encrypt the data. There are scenarios where we want to divide the files into chunks/blocks and then decrypt these chunks in parallel. So my question is that is it possible to...
The use of the IV proceeds like this : 1. Generate 37 random 32 bit integers 2. Pack these into bytes 3. Using the user key (which has been scheduled), encrypt these bytes, so the IV can be saved to file 4. Concatenate the original (unscheduled) user key with the unencrypted IV bytes 5. Reschedule this key,...
The compression function of SHA-1 when used in Davies-Meyer mode adds its input to the chaining values at the final step. For the first message block, the IV is used as the input and in the next step, the previous block's output (as specified by Merkle-Damgard) is used. These values are fed to the last round of the com...
Why is feed-forward mechanism used in hash functions?
I'm studying the Kryptos sculpture with its cryptographic puzzles K1 to K4. Similar to the "palimsest" keyword for K1, the keyword "abscissa" for [K2][1] was determined by brute-force. To better understand the puzzle as a whole and ultimately solve K4, it's important to understand how the "agent in the field" mig...
Kryptos : K2. What is the origin of the “abscissa” keyword?
Throwing normal dice, one can get sequences of digits in [0,5]. Which is the best procedure in practice to transform such sequences into bit sequences desired?
How to best obtain bit sequences from throwing normal dice?
The obvious approach is to consider the following bit extraction algorithm: > 1. Roll the die, producing an integer $n$ uniform in $\mathbb{Z}_6$. > > 2. If $n < 4$, return $n$ as two bits. Otherwise, go to 1. This will return two uniform bits. The algorithm will always terminate, since the probability of recu...
The obvious approach is to consider the following bit extraction algorithm: > 1. Roll the die, producing an integer $n$ uniform in $\mathbb{Z}_6$. > > 2. If $n < 4$, return $n$ as two bits. Otherwise, go to 1. This will return two uniform bits. The algorithm will always terminate, since the probability of recu...
Main cipher objective : Generate a keyed CSPRN stream, that does not expose useful information about the state of the CSPRNG, and xor this with the plaintext. To prevent an attacked who could *somehow* recover state or key information from one ciphertext from using this on other ciphertexts, a "random section", here ca...
A Smart Card is small portable physical device, typically flat and in the format of a traditional credit card (sometime much smaller: an example is the SIM card in a mobile phone), embedding: 1. An [Integrated Circuit][1] with memory providing permanent data retention; that's using [EEPROM][2], [Flash][3], or [FRAM]...
Assume we have a public message board where anyone can send a message to. If plain messages are used, anyone can impersonate anyone. The goal is to disallow impersonations. We can use public key cryptography and users have access to secure means of distributing their public key (e.g. their personal website). Users c...
Pretty simple question - but I can't seem to find much information about it. - What exactly is a tweakable block cipher? - How do they differ from traditional block ciphers? - What exactly is the 'tweak'? Is it just a sequence of bytes? Does is have any special qualities? - Are tweakable block ciphers more s...
What is a tweakable block cipher?
Pretty simple question - but I can't seem to find much information about it. - What exactly is a tweakable block cipher? - How do they differ from traditional block ciphers? - What is the 'tweak'? Is it just a sequence of bytes? Does it have any special qualities? - Are tweakable block ciphers more suited to...
Assume we have a public message board where anyone can send a message to. If plain messages are used, anyone can impersonate anyone. The goal is to disallow impersonations. We can use public key cryptography and users have access to secure means of distributing their public key (e.g. their personal website). There is a...
I want to calculate the time complexity of two encryption and decryption algorithms. The first one (RSA-like) has the encryption $$ C := M^e \bmod N $$ and decryption $$ M_P := C^d \bmod N. $$ Assuming $n = \log N$, $m = \log e$ and $k = \log d$, I think they have time complexities $O(n^2 · m)$ and $O(n^2 · ...
I think [CrypTool][1] is great software. And what I find most useful in it is visualization of algorithms such as Caesar, Vigenere, AES, DES. And my question is: does anyone know other tools which are intended for visual explanation of basic cryptography and related topics such as prime numbers, elliptic curves, finite...
Say we do not know b or k, but are given g congruent to b^k (mod p). And say there exist factors E = e + m'p (e congruent to b^i mod p) and F = f + m''p (f congruent to b^j mod p) of g. Then EF = g + pm = b^k for some m, m' and m''. So if we can find the right (m, m') we can factor G = g+pm = EF. Then E is congruent...
Why would this method of discrete logarithm finding not work?
Say we do not know $b$ or $k$, but are given $g$ congruent to $b^k \pmod p$. And say there exist factors $E = e + m'p$ ($e \equiv b^i \bmod p$) and $F = f + m''p$ ($f \equiv b^j \bmod p$) of $g$. Then $EF = g + pm = b^k$ for some $m$, $m'$ and $m''$. So if we can find the right $(m, m')$ we can factor $G = g+pm = EF...
Check out the videos from [Art of Problem][1] there are some amazing videos on [cryptography][2]. Short and good visual ones they nail the point, am sure you would love them. [1]: https://www.youtube.com/user/ArtOfTheProblem [2]: https://www.youtube.com/course?list=ECB4D701646DAF0817
While reading [this article on rank attacks on STS](http://eprint.iacr.org/2004/237) (a public-key scheme based on Multivariate Quadratic (MQ) equations), I stumbled upon some claims that I've also seen in other presentations on rank-attacks. However I'm not able to see why this claim follows. A description of STS and...
Say we do not know $b$, but are given $k$ and $g$ such that $g\equiv b^k\pmod p$. And say there exist factors $E = e + m'p$ ($e \equiv b^i \bmod p$) and $F = f + m''p$ ($f \equiv b^j \bmod p$) of $g$. Then $EF = g + pm = b^k$ for some $m$, $m'$ and $m''$. So if we can find the right $(m, m')$ we can factor $G = g+pm...
My understanding is that the three most popular approaches to "steganography using text as a cover" are: 1 Generate a completely new text by picking one word at a time from a dictionary, using the ciphertext bits to select which word. * Pick words in ways that, at first glance, look like real English sentences, u...
How do you construct a practical full-domain hash function?
**Defination** H1K1(X) - means X data hashed by H1 hashing algorithm with K1 key. **Short question** Is H1K1(H2K2(X)) equals to H2K2(H1K1(X))? Is H1K1(H1K2(X)) equals to H1K2(H2K2(X))? **Long question** In the database my web application is storing password hashed. Through web service authentication req...
Say we do know $b$ but not $k$, and are given $g$ such that $g\equiv b^k\pmod p$. And say there exist factors $E = e + m'p$ ($e \equiv b^i \bmod p$) and $F = f + m''p$ ($f \equiv b^j \bmod p$) of $g$. Then $EF = g + pm = b^k$ for some $m$, $m'$ and $m''$. So if we can find the right $(m, m')$ we can factor $G = g+pm...
**Defination** ${H_1}^{K_1}(X)$ - means $X$ data hashed by keyed hashing algorithm $H_1$ with key $K_1$. **Short question** Is $H_1^{K_1}(H_2^{K_2}(X))$ equal to $H_2^{K_2}(H_1^{K_1}(X))$? Is $H_1^{K_1}(H_1^{K_2}(X))$ equal to $H_1^{K_2}(H_1^{K_1}(X))$? **Long question** In the database my web applica...
The mathematical definition of neglible and non-neglible functions is fairly clear-cut, but why they are important and how they are used in cryptography?
I have a number of different systems sending me email addresses, but I don't actually need the underlying email, just a hash of the email address. I know I can compare hash values to find matches across the senders, which is all I want to do, but what if each sending system uses a different salt or hash method. Is the...
Please refer to [this][1] secure index paper. On page#6, a `trapdoor` is defined as Trapdoor(Kpriv, w): Given the master key Kpriv = (k1, . . . , kr) and word w, output the trapdoor for word w as Tw = (f(w, k1), . . . , f(w, kr)) Can someone please explain it to me using an example? Let's say we've a wo...
As you suspected, md5(sha1(x)) is not equal to sha1(md5(x). If each sending system uses a different salt or hash method, there is no way to compare the resulting hash values. To see if two email addresses are the same from their hash values, both hash values must have been computed using exactly the same method a...
I want to calculate the time complexity of two encryption and decryption algorithms. The first one (RSA-like) has the encryption $$ C := M^e \bmod N $$ and decryption $$ M_P := C^d \bmod N. $$ Assuming $n = \log N$, $m = \log e$ and $k = \log d$, I think they have time complexities $O(n^2 · m)$ and $O(n^2 · ...
How do I derive the time complexity of encryption and decryption using modular arithmetic?
How do I derive the time complexity of encryption and decryption based on modular arithmetic?
Please refer to [this][1] secure index paper. On page#6, a `trapdoor` is defined as Trapdoor(Kpriv, w): Given the master key Kpriv = (k1, … , kr) and word w, output the trapdoor for word w as: Tw = (f(w, k1), … , f(w, kr)) Can someone please explain it to me using an example? Let's say we've a w...
What are some different cryptography methods?
Hello I wanted to ask if there is any review about the security of the AES implementation of the .net Framework? I found nothing concrete to that question, searching the Internet. And, but this is a Little bit off-Topic to this question, is it secure to use a hash of the plaintext(or file) and use this as a test if t...
Hello I wanted to ask if there is any review about the security of the AES implementation of the .net Framework? I found nothing concrete to that question, searching the Internet. And, but this is a Little bit off-Topic to this question, is it secure to use a hash of the plaintext(or file) and use this as a test if t...
I am making a call with parameters from application "A" to a web application "B". Parameters are in the query string of the URL. They don't need to be hidden. But I want to be sure that nobody can change the parameters. And web application "B" must ensure that the query comes from application "A". So, I encoded t...
AES CBC with fixed or predictable IV, what are the risks?
Alice is communicating with $n$ people. We do not assume that the $n$ people don't trust each other or trust Alice. Alice doesn't trust them either, and needs to assume that they will not form a coalition against her, so we assume the $n$ people cannot communicate with each other (except through Alice, if she agrees). ...
I need an untrusted client to generate a __random__ public/private keypair (in particular, an [Ed25519](http://ed25519.cr.yp.to/) keypair, which can be generated really fast), but I'm only allowed to see the public key. The randomness is important because the public key is used in attack-sensitive ways such that being ...
Crypto puzzle as proof of randomness?
[Wikipedia says](http://en.wikipedia.org/wiki/Elliptic_curve_cryptography#NIST-recommended_elliptic_curves) in reference to the elliptic curves officially recommended by NIST in [FIPS 186-3](https://www.google.com/search?q=FIPS+186-3): > Five prime fields for certain primes p of sizes 192, 224, 256, 384, and 521 bit...
Why do the elliptic curves recommended by NIST use 521 bits rather than 512?
I have a couple of related questions: I read about an estimate, ascribed to Turing, of the entropy of English text to be between 0.6 and 1.3 bits per letter. The modern day corpus, including the huge and exponentially ever expanding volume of materials accessible via the Internet, is different from the one available...
i want to generate random number for example from [1..100]. This algorithm which generates random number should work similarly like ("**Linear congruential generator**"). ![enter image description here][1] [1]: https://i.stack.imgur.com/CgabT.png Here: c - increment should be something like 98979817 ...
The cipher is an triple key polyalphabetic cipher also known as an Quagmire IV by the ACA. An example would be here: [Quagmire IV example and info (pardon the ads)][1] I posses the IV key and the PT key. The IV key runs vertically and sets the shifts of the lookup alphabets for the ciphertext. The IV key is the leng...
What are some approaches to attack an triple key polyalphabetic cipher when the IV key and PT key are known?
The cipher is an triple key polyalphabetic cipher also known as an Quagmire IV by the ACA. An example would be here: [Quagmire IV example and info (pardon the ads)][1] I posses the IV key and the PT key. The IV key runs vertically and sets the shifts of the lookup alphabets for the ciphertext. The IV key is the leng...
The cipher is an triple key polyalphabetic cipher also known as an Quagmire IV by the ACA. An example would be here: [Quagmire IV example and info (pardon the ads)][1] I posses the IV key and the PT key. The IV key runs vertically and sets the shifts of the lookup alphabets for the ciphertext. The IV key is the leng...