instruction
stringlengths
15
30k
Assuming I have a vault that tokenizes 6 decimal digit number plaintext, with the following requirements: 1. Given the plaintext the vault returns a random index. If the plaintext does not exist it returns a new random index. If it does exist it returns the same index it had returned before for that plaintex...
Assuming I have a vault that tokenizes 6 decimal digit number plaintext, with the following requirements: 1. Given the plaintext the vault returns a random index. If the plaintext does not exist it returns a new random index. If it does exist it returns the same index it had returned before for that plaintext. T...
Assuming I have a vault that tokenizes 6 decimal digit number plaintext, with the following requirements: 1. Given the plaintext the vault returns a random index. If the plaintext does not exist it returns a new random index. If it does exist it returns the same index it had returned before f...
I am designing a vault that tokenizes a plaintext that consists of 6 decimal digits, with the following requirements: 1. Given some plaintext, the vault returns an index. If the plaintext does not exist it returns a new random index. If it does exist it returns the same index it had returned b...
I am currently implementing Shamir's ID based signature algorithm as proposed in [Adi Shamir, Identity-Based Cryptosystems and Signature Schemes. Advances in Cryptology: Proceedings of CRYPTO 84, Lecture Notes in Computer Science, 7:47--53, 1984.][1] However I am stuck with generating the private key for a certain i...
I am currently implementing Shamir's ID based signature algorithm as proposed in [Adi Shamir, Identity-Based Cryptosystems and Signature Schemes. Advances in Cryptology: Proceedings of CRYPTO 84, Lecture Notes in Computer Science, 7:47--53, 1984.][1] However I am stuck with generating the private key for a certain i...
When encrypting with RSA it is often infeasible to decrypt by just doing `c^d mod n`, because for example when using the primes $(p,q)=(12553,1233)$, which are small primes compared to those in used by banks, one would often choose the Fermat number $65537$ as public exponent $e$, then the private exponent $d$ is $4267...
Using homomorphic encryption, I would like to be able to take an encrypted integer and either add 1 or -1 for a new encrypted value. I do not want the encrypted value to be recoverable - just the following: * $\varepsilon(x) = (\varepsilon(x) \oplus \varepsilon(-1)) \oplus \varepsilon(1) = (\varepsilon(x) \oplus ...
I've been studying specifically the authentication algorithm Needham and Shoroeder , and realized the idea in general of the message exchange . But , looking on the subject found a question that I do not know the answer right , enjoyed discussing this with someone with more experience on the subject . At one point in t...
By Shanon theorem, a perfect secrecy encryption scheme must use a key space of equal size as the message space. But when the correctness requirement is weakened such that $Pr[Dec_k(Enc_k(m))=m]=1/2$ we know that the key space may be smaller than the message space. Generally, what is the lower bound of the key spa...
Why does a perfect secrecy can be achieved when decryption correctness is not totally required?
I understand how ECC is based on the discrete log problem and RSA on integer factorization. I've read several references that show how a solution to either of these problems can typically be adapted to solve the other. And based on that I find references that claim for instance: "The asymptotic running time of the ...
Why can ECC key sizes be smaller than RSA keys for similar security?
I understand how ECC is based on the discrete log problem and RSA on integer factorization. I've read several references that show how a solution to either of these problems can typically be adapted to solve the other. And based on that I find references that claim for instance: "The asymptotic running time of the ...
I understand how ECC is based on the discrete log problem and RSA on integer factorization. I've read several references that show how a solution to either of these problems can typically be adapted to solve the other. And based on that I find references that claim for instance: "The asymptotic running time of the ...
Any public key decryption can be decrypted given enough time and computing power. Is there a metric or term for this? Something like *it would require on average 2^43 1024 bit hashes to find private key 'I' based on public key 'U'?* Is there a term that would sum up this average amount of work?
Can anyone explain (or point to a reference for) what a hybrid argument is in a security proof, and when it's convenient or preferable to use it? Among some of the places where I've seen it mentioned, there is the paper [Boneh, Sahai, Waters - Functional Encryption: Definitions and Challenges](http://link.springer.c...
I understand how ECC is based on the discrete log problem and RSA on integer factorization. I've read several references that show how a solution to either of these problems can typically be adapted to solve the other - for example, [one reference](http://x5.net/faqs/crypto/q53.html) claims: > The asymptotic runnin...
Assume the following scheme for a PRNG generating decimals in [0,100) Given a message and a key, compute tag := HMAC512(message, key). Take the first 5 hexadecimal characters of the tag. If the result is smaller than 1,000,000 in decimal, divide it by 10,000 and return it, otherwise take the subsequent 5 hexadecim...
Building on the question and answer from http://crypto.stackexchange.com/questions/13238/addition-only-phe-in-f which ponders homomorphic cryptosystems to navigate, relatively, a single dimension without revealing absolute position (an encrypted counter?), I am now interested in extending this to multiple dimensions,...
Building on the question and answer from http://crypto.stackexchange.com/questions/13238/addition-only-phe-in-f which ponders homomorphic cryptosystems to navigate, relatively, a single dimension without revealing absolute position (an encrypted counter?), I am now interested in extending this to multiple dimensions, t...
Building on the question and answer from http://crypto.stackexchange.com/questions/13238/addition-only-phe-in-f which ponders homomorphic cryptosystems to navigate, relatively, a single dimension without revealing absolute position (an encrypted counter?), I am now interested in extending this to multiple dimensions, t...
Imagine there is a $n$ bit block cipher. The attacker has harvested some how all possible $2^n$ cipher texts for some given key. Without the knowledge of the distribution of input domain as in frequency counts or some statistical information of input data. Is it possible to perform ciphertext only attacks ? Any example...
In one of the exercises in [\[KL\] Book][1] I need to tell whether an encryption scheme is secure under an eavesdropper of only one message. Given a PRG $G: \{0,1\}^n \rightarrow \{0,1\}^{n+1}$. The encryption scheme encrypt $m \in \{0,1\}^{2n+2}$ by $c= <G(k) \oplus m_1, G(k+1) \oplus m_2>$ where $m_1$ and $m_2$...
Can you prove the existance of a PRG $G$ s.t. for each even $k$: $G(k)=G(k+1)$?
Given a list of 2048 bit integer values in which one or few 2048 bit integer values may be product of two prime numbers and other values may be just 2048 bit odd integers numbers. My question is - Is there a way / technique (apart from brute-force) to confirm that a given 2048 bit integer value is product of tw...
Is there a technique to confirm that a given large integer value is a product of two primes?
Given a list of 2048 bit integer values in which one or few 2048 bit integer values may be product of two prime numbers and other values may be just 2048 bit odd integers numbers. My question is - Is there a way / technique (apart from brute-force) to confirm that a given 2048 bit integer value is product of tw...
I need to crack a stream cipher. I have a set of plain text and encrypted text pairs. The hint to the question asks me to use entropy analysis and look at the hex dump of the encrypted text. However, I couldn't find anything useful in either of them. What should be the approach to solve this cipher?
Perhaps I don't understand the answers to http://crypto.stackexchange.com/questions/3654/malleability-attacks-against-encryption-without-authentication, so trying to be more concrete... please be patient. I want to change the plain text `"Pay Bob 100$"` to `"Pay Bob 500$"`. I have the cipher-text c under CBC-AES. A...
Why is CBC based on AES malleable in blocks other than the first block?
[Theoretical cryptography][1] tells us that everything in the world of private-key cryptography (CCA-secure symmetric encryption, hash functions, message authentication codes, etc.) can be built from one-way functions and that public-key cryptography (e.g., CCA-secure public-key encryption) can be build from the strong...
Perhaps I don't understand the answers to http://crypto.stackexchange.com/questions/3654/malleability-attacks-against-encryption-without-authentication, so trying to be more concrete... please be patient. If I want to change the first block and I can change the IV, I see that its easy to change the IV to `IV xor old...
[Theoretical cryptography][1] tells us that everything in the world of private-key cryptography (CCA-secure symmetric encryption, message authentication codes, etc.) can be built from one-way functions and that public-key cryptography (e.g., CCA-secure public-key encryption) can be build from the stronger notion of one...
Perhaps I don't understand the answers to http://crypto.stackexchange.com/questions/3654/malleability-attacks-against-encryption-without-authentication, so trying to be more concrete... please be patient. If I want to change the first block and I can change the IV, I see that its easy to change the IV to `IV xor old...
I've been studying specifically the authentication algorithm Needham and Shroeder, and understand the idea in general of the message exchange. But, researching on the subject, I found a question that I do not know the correct answer to, and I would like to get some feedback from someone with more experience on the subj...
Insecurity in Needham and Schroeder protocol?
Imagine there is a $n$ bit block cipher. The attacker has harvested some how all possible $2^n$ cipher texts for some given key. Without the knowledge of the distribution of input domain as in frequency counts or some statistical information of input data. Is it possible to perform ciphertext-only attacks? Are there an...
Is knowing the distribution of input domain only way to do cipher text only attacks?
I'm having trouble understanding why encrypting a number m, which is larger than n=p*q. I've looked into the following threads: http://crypto.stackexchange.com/questions/3798/why-rsa-cant-handle-numbers-above-76 http://crypto.stackexchange.com/questions/11904/why-does-plain-rsa-not-work-with-big-messages-mn Can so...
I'm having trouble understanding why encrypting a number $m$, which is larger than $n=p\cdot q$. I've looked into the following threads: http://crypto.stackexchange.com/questions/3798/why-rsa-cant-handle-numbers-above-76 http://crypto.stackexchange.com/questions/11904/why-does-plain-rsa-not-work-with-big-messages-mn ...
Suppose that you knew that a plaintext was encrypted with DES and consisted only of 16-bit Unicode letters, numerals, and punctuation marks available on a standard English-language QWERTY keyboard. How could you use this knowledge to attack the DES-encrypted cipher?
The difference between these 4 breaking Cipher techniques?
Building on the question and answer from http://crypto.stackexchange.com/questions/13238/addition-only-phe-in-f which ponders homomorphic cryptosystems to navigate, relatively, a single dimension without revealing absolute position (an encrypted counter?), I am now interested in extending this to multiple dimensions, t...
I have several problems approaching the following problem: Let's assume that we have Alice, Bob and Cathy. Alice wants to present a message to Cathy, showing her that someone else has signed it (Bob), but **without disclosing** Bob's identity. She needs to show that the signature does **not** belong to her. If we ...
Going Blind, Group or Ring?
What does the following notation mean in a homomorphic encryption scheme? ENC(x;r) What does `x` and `r` refer to?
If $e$ is a natural number, then this is true: $$m^e \bmod\ n = (m\bmod\ n)^e\bmod\ n$$ This is often used when encrypting, especially with RSA, since one can avoid directly calculating $m^e$, which can be a very big number. However, I haven't been able to find any documentation/proof for this conjecture, can...
In the wiki page of [Lattice-based Cryptography][1] the "Worst-case hardness" is defined as below: > Worst-case hardness of lattice problems means that breaking the cryptographic construction (even with some small non-negligible probability) is provably at least as hard as solving several lattice problems (approxima...
What does "Worst-case hardness" mean in lattice-based cryptography?
Worst case hardness means that the whatever problem you use and is based in lattice base problems then it is hard in worst case (means it is verrrry hard to solve by polynomial and quantum(exists?) computing. In contrast RSA (prime factoring) and discrete log cryptosystems are not in all instances hard in worst case b...
A very simple way to do something like this is by using the following construction: $$E^*(\langle x,y,z \rangle) = \langle E(x), E(y), E(z) \rangle,$$ where $E$ is an additively homomorphic cryptosystem. (To avoid attacks, use three different public keys to encrypt the three components.) Now $E^*$ has your desi...
Update: Question completely rephrased. I want to create the parameters for a bilinear pairing (the Tate pairing in this case). In case you're interested I'm following [this thesis](http://crypto.stanford.edu/pbc/thesis.pdf), specifically the type $F$ curves (page 61) which has embedding degree $k = 12$. But it's ...
In the face of non-quantum attacker, [Keccak][1][r=1088,c=512] with 512 bits of output provides: - Collision resistance up to $2^{256}$ operations - Preimage resistance up to $2^{256}$ operations - Second preimage resistance up to $2^{256}$ operations In general however, using quantum computing, specifically...
What security do Cryptographic Sponges offer against generic quantum attacks?
I'm trying to learn about sponge function for creating hash functions and generic attacks on it. I'm looking for the collision finding attack scenario which leads to $O(\min(2^{-n/2} , 2^{-c/2}))$ time complexity, where $n$ is the sponge output length(hash output length) and $c$ is the capacity length of sponge sta...
I came across [KATAN][1] Family of Ciphers for small domain input blocks . They cipher arbitrary block lengths 32,48,64 but their key size 80 bits only. Is 80 bits of key size considered safe with against brute force attacks , with current state of art processors ? [1]: http://www.cs.technion.ac.il/~orrd/KAT...
Is 80 bits of key size considered by safe against brute force attacks?
Is 80 bits of key size considered safe against brute force attacks?
DrLecter's answer explains the real problem, but let me give an easy to understand example: Imagine RSA encryption/decryption with the following parameters: - $n$ remains unchanged - $e=1$ - $d=1$ If you are asking yourself if this works, yes it does:$e$ is coprime to $\phi(n)$ and $ed=1$ mod $\phi(n)$ hold...
[Theoretical cryptography][1] tells us that everything in the world of private-key cryptography (CCA-secure symmetric encryption, message authentication codes, etc.) can be built from one-way functions and that public-key cryptography (e.g., CCA-secure public-key encryption) can be build from the stronger notion of one...
I fully realize that MD5 should not be used in any new project, but in my particular situation I have severe CPU performance issues, so MD5 is convenient. I have read a lot about MD5 security for this project, and I know it is broken in several ways: extending a file while having the same MD5 hash, and generating tw...
Is MD5 secure when used only on FIXED lenght blocks?
I fully realize that MD5 should not be used in any new project, but in my particular situation I have severe CPU performance issues, so MD5 is convenient. I have read a lot about MD5 security for this project, and I know it is broken in several ways: extending a file while having the same MD5 hash, and generating two ...
Is MD5 secure when used only on FIXED length messages?
A very simple way to do something like this is by using the following construction: $$E^*(\langle x,y,z \rangle) = \langle E(x), E(y), E(z) \rangle,$$ where $E$ is an additively homomorphic cryptosystem. (To avoid attacks, use three different public keys to encrypt the three components.) Now $E^*$ has your desi...
On [the Pro Webmasters StackExchange site](http://webmasters.stackexchange.com/), someone asked [a question](http://webmasters.stackexchange.com/q/39726/6511) about a webapp (in this case [cPanel](https://cpanel.net/)) that refused to allow a password change because it was too similar to a previous password. I suggeste...
Can passwords be stored securely so that a similarity comparison can be made?
I've got a question about an assignment . The question is "Why a Public-Key Deterministic Encryption Algorithm does not provide absolute security ?" . I suppose it means according to Shannon . Any help could be awesome!
Public-Key Deterministic Encryption : Why does not provide absolute security?
Is MD5 second-preimage resistant when used only on FIXED length messages?
[Theoretical cryptography][1] tells us that everything in the world of private-key cryptography (CCA-secure symmetric encryption, message authentication codes, etc.) can be built from one-way functions and that public-key cryptography (e.g., CCA-secure public-key encryption) can be build from the stronger notion of one...
I've got a question about an assignment . The question is "Why a Public-Key Deterministic Encryption Algorithm does not provide perfect security ?" . I suppose it means according to Shannon . Any help could be awesome!
Public-Key Deterministic Encryption : Why does not provide perfect security?
Given a private signature key `sk` and a public signature key `SK`, does revealing `sk(H(SK))` (in addition to `SK`) make it more easy for an attacker to determine `sk` or to fake a signature that would appear to have been produced by `sk`? Is this scheme a bad idea - in other words, does it compromise the secuity of t...
In [this][1] paper on pg. 1241 under section 2.3 the authors discuss "The Election Protocol" that they use to elect committees. The election protocol they use guarantees a constant fraction of honest parties and that each committee holds roughly the same number of parties. In the same paper on pg. 1249 you see th...
Why do authors execute a leakage resilient election protocol inside a leak-free phase ? Doesn't make sense
I've been looking at the definition of a PRG, [here](https://en.wikipedia.org/wiki/Pseudo_random_number_generator#Mathematical_definition). This is a broader notion than a cryptographically secure PRG ("CSPRG"), which is described [here](http://en.m.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_gener...
I've been looking at the definition of a PRG, [here](https://en.wikipedia.org/wiki/Pseudo_random_number_generator#Mathematical_definition). This is a broader notion than a cryptographically secure PRG ("CSPRG"), which is described [here](http://en.m.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_gener...
I've been looking at the definition of a PRG, [here](https://en.wikipedia.org/wiki/Pseudo_random_number_generator#Mathematical_definition). This is a broader notion than a cryptographically secure PRG ("CSPRG"), which is described [here](http://en.m.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_gener...
I think I have some sense of what Perfect Security means, and even Semantic Security, but I am struggling with randomness, so I'm going to ask a question about CSPRG's (Cryptographically Secure PRG's) by going through the first two. The basic idea that leads to the notion of Perfect Security, as I understand it, i...
I think I have some sense of what Perfect Security means, and even Semantic Security, but I am struggling with randomness, so I'm going to ask a question about CSPRG's (Cryptographically Secure PRG's) by going through the first two. The basic idea that leads to the notion of Perfect Security, as I understand it, i...
I've been looking at the definition of a PRG, [here](https://en.wikipedia.org/wiki/Pseudo_random_number_generator#Mathematical_definition). This is a broader notion than a cryptographically secure PRG ("CSPRG"), which is described [here](http://en.m.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_gener...
I think I have some sense of what Perfect Security means, and even Semantic Security, but I am struggling with randomness, so I'm going to ask a question about CSPRG's (Cryptographically Secure PRG's) by going through the first two. The basic idea that leads to the notion of Perfect Security, as I understand it, i...
I think I have some sense of what Perfect Security means, and even Semantic Security, but I am struggling with randomness, so I'm going to ask a question about CSPRG's (Cryptographically Secure PRG's) by going through the first two. The basic idea that leads to the notion of Perfect Security, as I understand it, i...
I've been looking at the definition of a PRG, [here](https://en.wikipedia.org/wiki/Pseudo_random_number_generator#Mathematical_definition). This is a broader notion than a cryptographically secure PRG ("CSPRG"), which is described [here](http://en.m.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_gener...
I think I have some sense of what Perfect Security means, and even Semantic Security, but I am struggling with randomness, so I'm going to ask a question about CSPRG's (Cryptographically Secure PRG's) by going through the first two. The basic idea that leads to the notion of **Perfect Security**, as I understand i...
I think I have some sense of what Perfect Security means, and even Semantic Security, but I am struggling with randomness, so I'm going to ask a question about CSPRG's (Cryptographically Secure PRG's) by going through the first two. The basic idea that leads to the notion of **Perfect Security**, as I understand i...
Is the following statement true: > If $G: \{0,1\}^k \to \{0,1\}^n$ is a PRG, then so is $G':\{0,1\}^{k+l} \to \{0,1\}^{n+l}$ defined by $$G'(x||x')=G(x)||x'$$ where $x \in \{0,1\}^k$ and $x' \in \{0,1\}^l$ (where $||$ denotes concatenation). My thought is that since $x'$ is not processed through the pseudo num...
A few definitions could assist: are $x$ and $x'$ *random* elements of $\{0,1\}^k$ and $\{0,1\}^l$? Is $G$ a *cryptographically-secure* PRG or a PRG with some statistical properties? Let $\mathcal{D}$ be a PPT-distinguisher and $r$ be a uniformly random bitstring of length $k+l$. A common definition (*e.g.* from K...
In one of the exercises in [\[KL\] Book][1] I need to tell whether an encryption scheme is secure under an eavesdropper of only one message. Given a PRG $G: \{0,1\}^n \rightarrow \{0,1\}^{n+1}$. The encryption scheme encrypt $m \in \{0,1\}^{2n+2}$ by $c= <G(k) \oplus m_1, G(k+1) \oplus m_2>$ where $m_1$ and $m_2$...
Why is it necessary to use a sufficiently long block size when implementing a CBC block cipher with a truly random initialization vector? In ECB mode it's easy to get information about the message if you can encrypt arbitrary plaintexts and look for matching blocks, but I'm not sure how this applies to CBC mode.
CBC mode encryption is defined as: $C_i = E_k(P_i\oplus C_{i-1})$ (with $P_i$ being the $i$th plaintext block, and $C_{i-1}, C_i$ being the ciphertext blocks. What might happen if we have a lot of ciphertext encrypted with the same key is if two ciphertexts happen to be the same, that is: $C_i = C_j$ If ...
CBC mode encryption is defined as: $C_i = E_k(P_i\oplus C_{i-1})$ (with $P_i$ being the $i$th plaintext block, and $C_{i-1}, C_i$ being the ciphertext blocks. What might happen if we have a lot of ciphertext encrypted with the same key is if two ciphertexts happen to be the same, that is: $C_i = C_j$ If ...
According to [this source][1] (also available as a [graphic][2]) and [that raw data][3] (see bottom right number), bitcoin mining nowadays (Feb. 2014) tops $20\cdot10^{15}$ SHA-256 per second, that is over $2^{79}$ SHA-256 per year. I'm guessing that a fraction of NSA's budget would allow this organization to do much b...
You could start with a test using an integer from a restricted range, if that's faster (Speed is the only reason you're considering a restricted range, right?), as an efficient way to weed out most composites, and if that succeeds perform the 40 tests using the full range.
I'm reading the paper “[Collision-Resistant Hashing? Towards Making UOWHFs Practical][1]” which states: > While it might be easy to find a collision $M,M'$ in $F_K$ by making both > $M,M'$ depend on $K$ (Any Collision Resistance), the adversary may be unable to find collisions if she > is forced to commit to one...
I found the below code online, but in its original state, the encryption was not using any padding (Padding.None), and was encrypting in blocks of 8. I wasn't able to get this code to properly encrypt / decrypt data so I was forced to have it encrypt the full length of the text. Is there something fundementally wrong w...
When a user wants to communicate with another user (let's say Alice and Bob), what is sent over the network during the initial communication? Alice uses her Kerberos client and enters her password and username. Something which is not clear to me: Will she send a message containing - time - username - ...
I found the below code online, but in its original state, the encryption was not using any padding (Padding.None), and was encrypting in blocks of 8. I wasn't able to get this code to properly encrypt / decrypt data so I was forced to have it encrypt the full length of the text. Is there something fundamentally wrong w...