instruction
stringlengths
15
30k
How to argue to a paranoid that RSA is safe?
If we consider an RSA modulus $N$ of $n$ bits ($n=2048$ in the question) product of $k$ primes of about $n/k$ bits, how high can be $k$ without loosing security? That's [a problem studied even before Multiprime-RSA was named][1], with no definitive answer other than: **we can't err on the unsafe side with $k=2$**. #...
I need three pseudo random functions which all take a seed S (t-bits long). The functions should map from 1) d bits to d bits 2) d bits to 1 bit 3) d bits to t bits d is 10 bits t is 2048 bits Can you link me to some c++ implementation(or any language) or tell me how to implement it?
I'm currently working on a project where I want to establish a secure and authenticated communication channel between to entities, using Elliptic Curve Cryptography. Now I'm not really sure how to proceed after the key exchange. The current exchange looks like this: - $Alice$ sends her public key $K_A$ to $Bob$ -...
I'm currently working on a project where I want to establish a secure and authenticated communication channel between to entities, using Elliptic Curve Cryptography. Now I'm not really sure how to proceed after the key exchange. The current exchange looks like this: - $Alice$ sends her public key $K_A$ to $Bob$ -...
If we consider an RSA modulus $N$ of $n$ bits ($n=2048$ in the question) product of $k$ primes of about $n/k$ bits, how high can be $k$ without loosing security? That's [a problem studied even before Multiprime-RSA was named][1], with no definitive answer other than: **we can't err on the unsafe side with $k=2$**. #...
This is a very newbie question... I have to quickly implement a solution for our application that works like this... We have a binary executable that is given a configuration file. I need to encrypt the configuration file such that a non-trusted user can be given the binary and the encrypted config file (and maybe a...
What cryptographic paradigm is appropriate for this use case?
I need three pseudo random functions which all take a seed S (t-bits long). The functions should map from 1. $d$ bits to $d$ bits 2. $d$ bits to $1$ bit 3. $d$ bits to $t$ bits $d$ is $10$ bits $t$ is $2048$ bits Can you link me to some c++ implementation(or any language) or tell me how to impleme...
I'm currently working on a project where I want to establish a secure and authenticated communication channel between to entities, using Elliptic Curve Cryptography. Now I'm not really sure how to proceed after the key exchange. The current exchange looks like this: - $Alice$ sends her public key $K_A$ to $Bob$ -...
Judging by the algorithm on the [Blowfish Wikipedia article](http://en.wikipedia.org/wiki/Blowfish_(cipher)), there is no way for the process to fail with an error. How then does GnuPG know when to tell you your password is correct when decrypting a file, rather than proceeding to decrypt meaningless data?
How do decryption algorithms determine whether your attempted passphrase is correct?
> Assuming that $g^A \bmod p$ and $g^B \bmod p$ are 100 digits long, would Charlie be able to determine a bound (in terms of digits or bits) for the respective secret key $A$ and $B$ ? 100 digits is approximately 332 bits; if $p$ is 332 bits long, then it is known to be feasible to apply the [Number Field Sieve][1]...
I´m implementing the aes algorithm encrypt for the SSE2 set instrucctions. For the Subbyte function i use movzx, load the S-box in the cache of the CPU for more performance. That cost about 56 OPS wing cpu. I was wondering if you could calculate the value of the bytes without having to change the vector, as serio...
I´m implementing the aes algorithm encrypt for the SSE2 set instrucctions. For the Subbyte function i use movzx, load the S-box in the cache of the CPU for more performance. That cost about 56 OPS wing cpu. I was wondering if you could calculate the value of the bytes without having to change the vector, as serio...
If we consider an RSA modulus $N$ of $n$ bits ($n=2048$ in the question) product of $k$ primes of about $n/k$ bits, how high can be $k$ without loosing security? That's [a problem studied even before Multiprime-RSA was named][1], with no definitive answer other than: **we can't err on the unsafe side with $k=2$**. #...
XEX Mode is the following scheme: $X = E_{k}(I) \otimes \alpha^j \\ C = E_{K}(P \oplus X) \oplus X$ where $I$ and $j$ are both tweaks (sector number and block number respectively). If I wanted to use only one tweak, $I$, is the following correct and safe? $X = E_{k}(I) \\ C = E_{K}(P \oplus X) \oplus X$ ...
Is it safe to use XEX or XTS modes with only one tweak?
I´m implementing the AES-encrypt algorithm for the SSE2 instruction set. For the `Subbyte` function i use `movzx`, having loaded the S-box in the cache of the CPU for more performance. That cost about 56 OPS wing CPU. I was wondering if you could calculate the value of the bytes without having to change the vecto...
Two or three years ago, I was reading something interesting, but then I lost the paper. The paper described building secure and fast P2P networks (not like tor or I2P). Unfortunately, I only remember some parts of the protocol/algorithm: - Peer logical address not equal to physical address, actually logical address...
I was reading about Encrypt-then-MAC and everywhere I go it seems people include the IV with the ciphertext generated for each packet then MAC that and send all the information concatenated. Why do I need to send the IV more than once?
Why must IV be sent with each packet?
I got asked this question and I didn't know what to answer. What comes to my mind now would be to test it with famous attacks. Padding attacks, exhaustive searches by modifying the input and expecting the output, timing attack... Any idea?
How do you test the security of your cipher?
I'm looking to implement modular exponentiation (for RSA) in constant time, but most of the examples I've found are more mathematical descriptions of the operations. Are there any references with descriptions in psuedo-code, which are understandable (and implementable!) by someone without much of a math background?
This somewhat reminds me of [“How do I test my encryption?”](http://crypto.stackexchange.com/q/11614/12164) but that question was more specific than this one, which seems to be too broad in it’s current state. Nevertheless, there’s an easy answer to your question: 1. Check and verify all the security aspects yo...
XEX Mode (with two tweaks) is the following scheme: $X = E_{k}(I) \otimes \alpha^j \\ C = E_{K}(P \oplus X) \oplus X$ where $I$ and $j$ are both tweaks (sector number and block number respectively). If I wanted to use only one tweak, $I$, is the following correct and safe? $X = E_{k}(I) \\ C = E_{K}(P \oplu...
Can XEX or XTS modes be used with only one tweak?
I got asked this question and I didn't know what to answer. > How do you test the security of your cipher? What comes to my mind now would be to test it with famous attacks: padding attacks, exhaustive searches by modifying the input and expecting the output, timing attack… Any idea?
I'm trying to understand a [paper](http://www.researchgate.net/publication/220855303_Dropout-Tolerant_TTP-Free_Mental_Poker) that uses the notation $E_y(1,r_{i,j,1})$ (full text available in link, used just once on Page #35, 6th page of pdf, Section 3.3, Step 1c) in the context of an encryption similar to ElGamal. I d...
Question is a follow-up to [this one][1]. The question was about accelerating SHA1. I am writing an application, where I do have a choice of hash algorithm, as long as it's a strong one. I want to be able to use the one which could be CPU-accelerated on consumer grade AMD and/or Intel processors. Which one should I tak...
Accelerated hashing on consumer-grade CPU?
Question is a follow-up to [this one][1]. The question was about accelerating SHA1. I am writing an application, where I do have a choice of hash algorithm, as long as it's a strong one. I want to be able to use the one which could be CPU-accelerated on consumer grade AMD and/or Intel processors. Which one should I tak...
Could a code be developed where one uses intentional errors say in english, as a text to encode? For example someone might have a message 'Agent X must report to station 5'. This could be distorted to 'A Gentex missed repaired 2 stationS.' The distorted message then encoded. If the distortions are recognizable to the ...
If there a proof in the literature which says the CONF Problem is equivalent to solving the discrete log ? Let $g$ be a generator of a cyclic group $\mathbb{G}$ of prime order $q$ CONF problem: given $q,g, g^a, g^{ab}$ find $g^b$ Discrete log problem: given $q, g, g^x$ find $x$
Is the CONF key sharing Problem equivalent to discrete log problem?
I've read several texts which say that if the entire plaintext is a multiple of the block-size padding is not required (and not using padding would not mean a loss of security). I generally disagree on this. In some special cases, for example in CTR of OFB mode padding could even unveil more information about the bloc...
Does not using padding mean a lack of security?
in Bilinear pairings, what is the difference between Type 2 and Type 3? I understand in Type 2, there exists an efficiently computable homomorphic function $\phi : G_2 \rightarrow G_1$ , which is not present in Type 3 pairings. But what I don't understand is what is the use of the homomorphism in cryptography? ...
in Bilinear pairings, what is the difference between Type 2 and Type 3?
`Identicons` are used to create unique images based on IP address or strings. Lots of programs are available to generate identicons based on an input string. My question is how `hard` is to do the reverse. Identify the source string of an identicon. In other words what is the strength of the hash function used to g...
Is there a difference between PRF and a hash function? example: Creation of a secret key is using PRF and creating a secret key is using hash function.
i'm trying to analyse the strength of a block cipher with CBC mode or with ECB mode on the scenario of a exaustive search attack with knowledge of pairs of plaintext-ciphertext (known plaintext attack). I understand that, for a block cipher that receives a key of k bits and processes blocks of n bits ( n > k ), on ECB...
I'm trying to analyze the strength of a block cipher with CBC mode or with ECB mode on the scenario of a exhaustive search attack with knowledge of pairs of plaintext – ciphertext (known plaintext attack). I understand that, for a block cipher that receives a key of $k$ bits and processes blocks of $n$ bits ($n>k$),...
I was reading about Encrypt-then-MAC and everywhere I go it seems people include the IV with the ciphertext generated for each message then MAC that and send all the information concatenated. Why do I need to send the IV more than once?
If someone or some group found an efficient way to factor large composites with two distinct prime divisors would this make it easier to decode any messages?
The question has been answered but let me add some historical examples. Enigma operators often made spelling mistakes; it didn't help their cause. Navajo [code talkers](http://en.wikipedia.org/wiki/Code_talker) on the other hand were a good measure even if the cipher was broken. What you are describing is very c...
AES provides long term security against hacking, then what is the need for key regeneration for each session?
I have just made my own program to encipher using AES in counter mode and have validated it using NIST data. So I know I have done it properly. I have read that AES-CTR can produce a stream of random numbers. To achieve this what do I feed in as the plaintext? Will any text do? Does it matter if the plaintext has re...
How do I produce a stream of secure random numbers from AES-Counter mode?
If someone or some group found an efficient way to factor large composites with two distinct prime divisors, would this make it easier to decode any messages?
Note that you do not have an efficiently computable homomorphism from $G_1$ to $G_2$, but in Type-2 you have an efficiently computable homomorphism $\psi: G_2 \rightarrow G_1$ and in Type-3 you do not have one. > But what I don't understand is what is the use of the homomorphism in cryptography? Well, if you have...
how well known is For 1 ≤ i ≤ (p − 1)/2 , g^(i+(p−1)/2) = g^(i−1+(p−1)/2) − g^i + g^(i−1) (mod p) for finite cyclic groups (Z/pZ)∗ prime moduli?
i'm trying to make a strong authentication software and embedded software in a java card, i have found many papers and publications about the subject, too much information to process and i'm working on a very tight schedule, given that the Java card implementation i have supports ECC ( Elliptic curve cryptography ) and...
The [Wikipedia entry on SHA-2][1] contains a usable pseudocode recipe. In the hope of some deeper understanding, I implemented SHA-256 and SHA-512 from it. This was helpful, but I still don't think I have joined together my understanding of how the hashing works, and how it achieves its goals. In short, I can see s...
The [Wikipedia entry on SHA-2][1] contains a usable pseudocode recipe. In the hope of some deeper understanding, I implemented SHA-256 and SHA-512 from it. This was helpful, but I still don't think I have joined together my understanding of how the hashing works, and how it achieves its goals. In short, I can see s...
There is a cipher called PRINCE proposed in ASIACRYPT two years ago. http://eprint.iacr.org/2012/529.pdf The cipher divides the 128-bit key into 64-bit k0 and k1. If I remove the key whitening at the beginning and end. Then the cipher is stripped down to PRINCEcore which only uses 64-bit k1. Is brute forcing the PR...
Is 64-bit block cipher insecure? Can one practically brute force it?
AES 256 is used widely in hybrid crypto systems (e.g. SSL/TLS). According to keylength.com a 2048 bit public key corresponds to 112 bits of security. - **Does it make sense to use AES 256 in this context?** - If yes, how it improves security in comparison with AES 128?
Does AES 256 really make sense in hybrid crypto systems when the PKI is the bottleneck?
I'm trying to analyze the strength of a block cipher with CBC mode or with ECB mode on the scenario of an exhaustive search attack with knowledge of pairs of plaintext – ciphertext (known plaintext attack). I understand that, for a block cipher that receives a key of $k$ bits and processes blocks of $n$ bits ($n>k$)...
Let $X\in \Bbb F_2^p$ be some information. How do I create $Y_1,\dots,Y_n \in \Bbb F_2^q$ so that having less than $n-1$ of the $Y_i$s gives you no information on $X$ but having $n-1$ of them allows you to recover $X$? I first though of error correcting codes but I don't think those would be able to ensure that h...
I'm trying to make a strong authentication software and embedded software in a java card. I have found many papers and publications about the subject… too much information to process and I'm working on a very tight schedule, given that the Java card implementation I have supports ECC ( Elliptic curve cryptography ) and...
The [Wikipedia entry on SHA-2][1] contains a usable pseudocode recipe. In the hope of some deeper understanding, I implemented SHA-256 and SHA-512 from it. This was helpful, but I still don't think I have joined together my understanding of how the hashing works, and how it achieves its goals. In short, I can see s...
This might sound pretty weird, but I was thinking of a game a person could play alone with a pen and paper. I got this idea where the person would write a random four letter string on a paper, and would have to decode it. There would be a mean to verify if the person is getting closer to the goal or not. So, I deci...
everyone. Recently, I am reading some dual system encryption papers. I have a question about dual system encryption. Is adversary able to generate semi-functional ciphertext? Thanks!
I have used AES to secure my short term wireless network(1 day lifetime). The same symmetric key is used for securing entire network traffic. is it possible to improve security with onetime password scheme? ie, Again AES encryption,but with different 128 bit keys each time.
Recently, I am reading some dual system encryption papers. In these systems, is adversary able to generate semi-functional ciphertexts?
Reading [this][1] question I figured out that the known attacks on SHA1 don't apply to its HMAC version, so, HMAC-SHA1 is quite strong *right now*. In a protocol like SSL, if it gets broken tomorrow, we can "simply" turn off all the ciphersuites taht use HMAC-SHA1. But what if it is used as MAC protection for encrypt...
Let $X\in \Bbb F_2^p$ be some information. How do I create $Y_1,\dots,Y_n \in \Bbb F_2^q$ so that having less than $n-1$ of the $Y_i$s gives you no information on $X$ but having $n-1$ of them allows you to recover $X$? ---------- I first though of error correcting codes, but I don't think those would be able t...
A basic ZKPP (Zero Knowledge Password Proof) is based on the server being able to challenge the client, and the client can then prove it knows the password (in such a way that is verifiable to the server) without transmitting the password itself. However, in order for the server to issue the challenge and verify the...
Are ZKPPs possible with server-side hashed passwords?
The two text having relation as '\x10' ---> '\x90'(80+10) will have relation after encryption/decryption also in RC4. Following code clearly describes the problem I am mentioning. from Crypto.Cipher import ARC4 key = '12345678' obj1 = ARC4.new(key) obj2 = ARC4.new(key) d1= obj1.decrypt('...
Recently, I have been reading some dual system encryption papers. In these systems, is adversary able to generate semi-functional ciphertexts?
The two text having relation as `\x10` → `\x90` (80+10) will have relation after encryption/decryption also in RC4. Following code clearly describes the problem I am mentioning. from Crypto.Cipher import ARC4 key = '12345678' obj1 = ARC4.new(key) obj2 = ARC4.new(key) d1= obj1.decrypt('\x...
Reading the question [“HMAC-SHA1 vs HMAC-SHA256”](http://crypto.stackexchange.com/q/15382/12164), I figured out that the known attacks on SHA1 don't apply to its HMAC version. So, HMAC-SHA1 is quite strong *right now*. In a protocol like SSL, if it gets broken tomorrow, we can “simply” turn off all the cipher-suites...
There is a cipher called PRINCE proposed in ASIACRYPT two years ago. See the paper: [“PRINCE – A Low-latency Block Cipher for Pervasive Computing Applications”](http://eprint.iacr.org/2012/529.pdf) The cipher divides the 128-bit key into 64-bit k0 and k1. If I remove the key whitening at the beginning and end. T...
Can 64-bit “PRINCEcore” practically be brute forced?
The two text having relation as "\x10\x11" → "\x90\x91" (80+10) will have relation after encryption/decryption also in RC4. Following code clearly describes the problem I am mentioning. from Crypto.Cipher import ARC4 key = '12345678' obj1 = ARC4.new(key) obj2 = ARC4.new(key) d1= obj1.dec...
There is a cipher called PRINCE proposed in ASIACRYPT two years ago. See the paper: [“PRINCE – A Low-latency Block Cipher for Pervasive Computing Applications”](http://eprint.iacr.org/2012/529.pdf) The cipher divides the 128-bit key into 64-bit k0 and k1. If I remove the key whitening at the beginning and end. T...
There is a cipher called PRINCE proposed in ASIACRYPT two years ago. See the paper: [“PRINCE – A Low-latency Block Cipher for Pervasive Computing Applications”](http://eprint.iacr.org/2012/529.pdf) The cipher divides the 128-bit key into 64-bit k0 and k1. If I remove the key whitening at the beginning and end. T...
There is a cipher called PRINCE proposed in ASIACRYPT two years ago. See the paper: [“PRINCE – A Low-latency Block Cipher for Pervasive Computing Applications”](http://eprint.iacr.org/2012/529.pdf) The cipher divides the 128-bit key into 64-bit k0 and k1. If I remove the key whitening at the beginning and end. T...
> … One-time pad is not only ridiculously simple, but also has been shown to be impossible to crack (if used appropriately). … One-time-pads may provide ideal security, but they are awfully problematic to transport securely from one point to another. Considdering that an OTP should only be used once, makes OTPs even...
> … One-time pad is not only ridiculously simple, but also has been shown to be impossible to crack (if used appropriately). … One-time-pads may provide ideal security, but they are awfully problematic to transport securely from one point to another. Considdering that an OTP should only be used once, makes OTPs even...
In general every public key cryptosystem has a probabilistic polynomial time algorithm $G$ such that $G(1^k)=(\textrm{public key}, \textrm{private key=trapdoor})$; $G$ is the key generator. Now for the RSA cryptosystem the keys can be found in the following way: > Bob decides the key length $k$, then $G(1^k)=((n,e),...
In general every public key cryptosystem ``has'' a probabilistic polynomial time algorithm $G$ such that $G(1^k)=(\textrm{public key}, \textrm{private key=trapdoor})$; $G$ is called the key generator. Now for the RSA cryptosystem the keys, can be found in the following way: > Bob decides the key length $k$, then $G(...
> I understand that, for a block cipher that receives a key of k bits and processes blocks of n bits (n>k), on ECB mode, Oscar would find false keys and because of that he would need to check more than one pair (i.e. two or three for DES). That doesn't sound right; if you are assuming that the attacker (Oscar) has a...
I have been told that one advantage of using a hash function is that it spreads entropy over all input bits. But it also seems to be true that a bad hash algorithm can make things less random. But how do I know if the hash I am using doesn’t make things less random? Currently, I’m hashing (SHA2) a few extracted byte...
> Currently, I’m hashing (SHA2) a few extracted bytes I collect from a CSRNG to create keys for AES encryption/decryption. Is that wrong? Depends on what you mean by "a few"; if you mean 16 or more, then yes, that is likely to be secure. However, if you mean, say, 4, then that is Very Bad. The reason is that the...
Given $$c_1x = k_1 + y_1 $$ $$c_2x = k_2 + y_2 $$ $$\vdots $$ $$c_nx = k_n + y_n $$ where the values of $\{c_1 \ldots c_n \}$ and $\{ k_1 \ldots k_n \}$ are known, and $x, \{y_1 \ldots y_n \}$ are unknown. $y_i$ is chosen uniformly at random. We are working in a group of $\mathbb{Z}_p^*$, so all $c_i, k_...
Given $$c_1x = k_1 + y_1 $$ $$c_2x = k_2 + y_2 $$ $$\vdots $$ $$c_nx = k_n + y_n $$ where the values of $\{c_1 \ldots c_n \}$ and $\{ k_1 \ldots k_n \}$ are known, and $x, \{y_1 \ldots y_n \}$ are unknown. $y_i$ is chosen uniformly at random. We are working in a field of $GF(p)$, so all $c_i, k_i, x, y_i...
The answer to your question is easy: It depends. :-) First of all I think your two questions can be reduced to one. If you don't know the key length, then you can simply brute force over the different key lengths. For breaking the Vigenere cipher the proportion cipher_text_length/key_length is the most important ...
I don't know how it's done in practice, but here's a theoretical perspective: Have an OWF Family, say modular exponentiation. for a password $x$ store $g^x$ on the server, Run the following ZKPP: 1. server chooses a random $y ∈ Z_p^*$ and computes $g^y , (g^x)^y$ and send $g^y$ to the client 2. client c...
I don't know how it's done in practice, but here's a theoretical perspective: - Have an OWF Family, say modular exponentiation. - For a password $x$ store $g^x$ on the server. - Run the following ZKPP: 1. server chooses a random $y ∈ Z_p^*$ and computes $g^y , (g^x)^y$ and send $g^y$ to the client 2. clie...
http://en.wikipedia.org/wiki/ISAAC_(cipher) This question was asked [before][1] but the answers seem vague, and I want to know about ISAAC specifically, not ISAAC+. It seems some cryptanalysis was performed on it and the only seemingly major drawback to security is that some initial rounds may be biased (although...
Is ISAAC Cipher Cryptographically Secure?
It doesn't need to be crazy secure. I wanted to figure out if there's a popular practice when encrypting a short phrase (less than 32 letter long) into two keys (two strings 32 length). Doesn't need to be complicated. It's for a hobby project. For example: Key 1: `JFHEL1J2J1KD1FK4J4K3LA5D7EKSJX323` Key 2: `1HF...
Note that you do not have an efficiently computable homomorphism from $G_1$ to $G_2$, but in Type-2 you have an efficiently computable homomorphism $\psi: G_2 \rightarrow G_1$ and in Type-3 you do not have one. > But what I don't understand is what is the use of the homomorphism in cryptography? Well, if you have...
I'm working with Shor's algorithm and I have a question regarding the following step a^r -1 = (a^r/2+1)(a^r/2-1)=0modn Now what is going to be the result if r/2 was -1? this will mean it's going to be like this : (1/a+1)(1/a-1) ..will it also be = to 0modn?
I'm working with Shor's algorithm and I have a question regarding the following step a^r -1 = (a^r/2+1)(a^r/2-1)=0modn Now what is going to be the result if a^r/2 was -1? this will mean it's going to be like this : (1/a+1)(1/a-1) ..will it also be = to 0modn?