instruction
stringlengths
15
30k
I'm currently migrating a project to use the bouncy castle [GCM mode](http://www.bouncycastle.org/docs/docs1.5on/org/bouncycastle/crypto/modes/GCMBlockCipher.html). I understand that using an authenticated mode removes the need for a HMAC, however I want to be sure that I'm using this mode correctly. When applying a ...
We know Grover's [algorithm][1] speedup brute-force attacks two time faster in block ciphers (e.g brute-forcing 128 bit keys take 2^64 operations not 2^128). that explain why we using 256 bit keys to encrypt top secrets. but [latest][2] practical attack on AES shows brute-forcing AES-256 take 2^100 operations. is this ...
AES is post-quantum or not?
We know [Grover's algorithm][1] speedup brute-force attacks two time faster in block ciphers (e.g brute-forcing 128 bit keys take $2^{64}$ operations not $2^{128}$). That explains why we are using 256 bit keys to encrypt top secrets. But [latest practical attack][2] on AES shows brute-forcing AES-256 take $2^{100}$ ...
Is AES-256 a post-quantum secure algorithm or not?
Is AES-256 a post-quantum secure cipher or not?
"Linear Cramer-Shoup" is defined on pages 4 and 5 of $\:$ eprint.iacr.org/2007/074.pdf . Are the ciphertexts in Linear Cramer-Shoup computationally indistinguishable from uniform <br> under a chosen-ciphertext attack? $\:$ (We can assume without loss of generality either that <br> $M$ is the identity element or t...
Does Linear Cramer-Shoup have pseudo-random ciphertexts?
EDIT: The following block of text (between the lines) was written as an answer to the original question, which did not explicitly state that the secret was used for any blocks after the initial one. --- Hmmm, I assume that the goal of this algorithm is to provide privacy; that is, to create an encrypted messa...
I'm reading a cryptanalysis on Blowfish, and I've come across something that I don't quite get. Let's denote $$\delta = a \oplus a'$$ where *a* and *a'* are bytes that cause a collision in some S-box when entered as the position to use in said box. The structure of Blowfish looks like this: ![](http://img2...
This is a rather trivial question, I just want to see if I get the concept right. In OFB you generate a pseudorandom stream based on some nonce, and you XOR that with the message to get the ciphertext. This sounds a lot like a one-time pad but I don't see the parallelism anywhere in literature. Am I missing somethin...
How comparable is OFB to a one-time pad?
Elsewhere someone stated that he couldn't publish his crypto software on the Internet, because US Export Regulations require approval, if the key size is greater than 56 bits. I know that several decades ago there were such extremely rigorous restrictions. Could anyone kindly check whether that indeed remains so even t...
Export from US of crypto software with key-size > 56 bits still needs permission?
How we can measure key space in transposition algorithms? Should we specify the method, like rail fence ?
I'm reading a cryptanalysis on Blowfish, and I've come across something that I don't quite get. Let's denote $$\delta = a \oplus a'$$ where *a* and *a'* are bytes that cause a collision in some S-box when entered as the position to use in said box. The structure of Blowfish looks like this: ![](http://img2...
There seem to be some errors or inconsistencies in the question. If $P \oplus P' = [0000\delta 000]$, and we use the 2-round structure shown in the picture, then the corresponding ciphertext pairs should satisfy $C \oplus C' = [xyzt\delta000]$. This is different from what you wrote (did you omit the final swap sh...
There seem to be some errors or inconsistencies in the question. If $P \oplus P' = [0000\delta 000]$, and we use the 2-round structure shown in the picture, then the corresponding ciphertext pairs should satisfy $C \oplus C' = [xyzt\delta000]$. This is different from what you wrote (did you omit the final swap sh...
Pari's "chinese" function (as in Chinese Remainder Theorem) does the solution for you, for two congruences. You can fold in more congruences via induction. ? chinese(Mod(42,91), Mod(11, 37)) %1 = Mod(3045, 3367) The previous example solves for $x \equiv 42 \pmod{91}$ and $x \equiv 11 \pmod{37}$, which is...
How large should the prime $p$ and generator $g$ values be in a Diffie-Hellman handshake if the messages are encrypted. If the key that encrypted the Diffie-Hellman messages becomes compromised, then does that compromise the key generated using Diffie-Hellman?
How large should a Diffie-Hellman p be if the messages are encrypted?
Are there any crypto-constructions to do the following kind of "zero-knowledge proof": 1. Alice encrypts a set of numbers using some cryptosystem and a secret key (e.g. Paillier crypto-system). 2. Bob sums the ciphertexts to obtain the sum of numbers. 3. Bob sends to Alice the ciphertext for the sum. Alice decrypt...
i am working on 224-bit elliptic curve cryptography. in this 224-bit * 224-bit multiplication results 448-bit output. I am reducing 448-bit into prime field range( prime number 2^224-2^96+1) using modulus operation. can any tell me efficient modulus operation for remainder calculation? i am working on VHDL.
Efficient algorithm for remainder calculation over prime field for ECC implementation?
I am working on 224-bit elliptic curve cryptography. In this 224-bit * 224-bit multiplication results 448-bit output. I am reducing 448-bit into prime field range( prime number $2^{224}-2^{96}+1$) using modulus operation. Can any tell me efficient modulus operation for remainder calculation? I am working on VHDL.
Are there any crypto-constructions to do the following kind of "zero-knowledge proof": 1. Alice encrypts a set of numbers using some cryptosystem and a secret key (e.g. Paillier crypto-system). 2. Bob multiplies the ciphertexts to obtain the sum of numbers. 3. Bob sends to Alice the ciphertext for the sum. Alice d...
If we send an embedded message with public key of the recipient through a mix network, does that recipient remains anonymous to the sender?
I also watched the video (thanks Sid, for the link) and after looking at it, it reveals some of the other methods that Ciphercloud appears to be using to preserve search. Nothing appears to be an implementation of any sort of homomorphic encryption. I snapped a copy of one screen after the response from John is ente...
[LIRA (Lightweight Incentivized Routing for Anonymity)](http://www-users.cs.umn.edu/~jansen/papers/lira-ndss2013.pdf) is a scheme to incentivize participants in Tor to contribute resources, in particular bandwidth. The paper talks about it being used for Tor. Can it work for other decentralized and privacy-friendly ...
Can a LIRA system work with cjdns or other decentralized meshnets?
I'm being asked to use an encryption algorithm in my code, and besides the fact that I'm sure there will be implementation faults that lead to vulnerabilities, I also have concerns about the algorithm itself. I'd like to know how strongly I need to convince these guys to not use this. If it is an acceptable algorithm a...
Is this encryption algorithm build from MD5 secure?
[Don't roll your own crypto.](http://security.stackexchange.com/questions/2202/lessons-learned-and-misconceptions-regarding-encryption-and-cryptology/2210#2210) [Use preexisting protocols and libraries whenever possible.](http://security.stackexchange.com/questions/25835/at-what-level-of-abstraction-should-a-develop...
I want to create a simple secured connection protocol over TCP/IP. I just want to connect from my mobile device to a server securely. Firstly I thought to use an SSL connection, but I changed my mind and decided to create my own protocol. I am thinking about key exchange: where I should put the private key, an...
Can someone explain how to find inverses in truncated polynomial rings manually (i.e. on pen and paper)? As an example from the tutorial: > Example. Take $N=7$, $q=11$, $a=3+2X^2-3X^4+X^6$. The inverse of $a \bmod 11$ is > $a^{-1}=-2+4X+2X^2+4X^3-4X^4+2X^5-2X^6$, since > > $(3+2X^2-3X^4+X^6)*(-2+4^X+2X^2+4X^3-4...
I know confusion is used in cryptography to make it more difficult to identify any relationship between the ciphertext and the symmetric key. I want to know when the confusion is applied during encryption, for example: 1. Confusion applied on the symmetric key `K1` to form the modified symmetric key `K2`, and then...
Much of the literature and latest papers suggest that homomorphic encryption is still not practical yet. How is [CipherCloud][1] able to achieve this? Does anyone have an idea? Their website does not provide much information about how their system works. [1]: http://www.ciphercloud.com/
I don't know how CipherCloud works. However, a related question is: How could you encrypt data in a database, in a way that allows you to achieve these goals? What are the best cryptographic techniques currently known, for that goal? As it happens, that question has a good answer. Take a look at [CryptDB](http://...
Well, the obvious answer to 'how to find a Safe prime that is also a Nothing-Up-My-Sleeve' number would be to take one of the primes listed in [RFC 3526][1]. These primes (which come in several sizes) are all of the form $p = 2^n - 2^{n-64} - 1 + 2^{64} \cdot ( \lfloor 2^{n-130} \pi \rfloor + i )$, where $i$ is the sm...
If Alice (sender) sends a private message embedded with public key of the Bob(recipient) through onion network, does Bob remains anonymous to Alice in this way?since Alice knows the public key of Bob,then how does Alice and Bob remain anonymous from each other?
If Alice (sender) sends a private message embedded with public key of the Bob(recipient) through onion network, so in this key exchange, does Bob remains anonymous to Alice as Alice knows about the public key of Bob. So if we want to achieve mutual anonymity, how can we do that? Can we achieve mutual anonymity through ...
Suppose I have a file server running ZFS with file deduplication enabled, and I have two users that are sharing files: Alice and Carol. If Alice uploads huge_file.tgz to her www/ directory, and Carol uploads the same huge_file.tgz to her www/ directory, then they are only stored on disk once, and both files are availab...
Given current technology such as GPUs and GPU cracking software I was wondering if anyone has an idea on how long it would take to brute force the key used to derive an HMAC?
I asked a question on security.stackexchange, but was told it would be a better fit here: http://security.stackexchange.com/questions/32779/how-would-one-crack-a-weak-but-unknown-encryption-protocol My question is: Assume I'm an attacker trying to break a weak-but-unknown encryption algorithm. i.e., someone not t...
How would one crack a weak but unknown encryption protocol?
A deterministic encryption scheme is a cryptosystem which always produces the same ciphertext for a given plaintext and key, even over separate executions of the encryption algorithm. Although we cannot achieve semantic security or indistinguishability for Deterministic Encryption due to lack of randomness in ciph...
A deterministic encryption scheme is a cryptosystem which always produces the same ciphertext for a given plaintext and key, even over separate executions of the encryption algorithm. Although we cannot achieve semantic security or indistinguishability for Deterministic Encryption due to lack of randomness in cipher...
As stated in [this page][1] large documents hashed using md5 maybe vulnerable to collision attacks. My question is even passwords of 6-30 character are vulnerable to such hash collision attacks? If yes, is there any proof available online or any example of two password phrase giving same md5 hash? I googled but of no h...
Even passwords are vulnerable to hash collision attacks?
Several websites I've come across limit the allowed special characters for a password. My thought was, it should all be hashed anyway so why does it matter? Is there an actual security reason to restrict this? Example error: ``` The password needs to be at least 4 characters. Valid characters are: letters, num...
Sensible usecase for restricting special characters in passwords?
I want to know how rand() works (even when I don't provide any seed how it produces PRNs?) thanks!
How does the rand() function in C work?
_Summary of comments, not to take credit._ Answer so far is: **cryptographically no**. But it's practical for usability. 1. Restricting control characters is useful for different interfaces/input methods. 2. Restricting non-ASCII characters is useful for avoiding bugs with different encodings. 3. Restricting...
Well, first of all, when we do encryption, we generally insist that there is a "key" involved; this key is something that the person doing the encryption and the person doing the decryption knows, but no one else. The goal of an encryption method is that someone who doesn't know the key can't gain any information from...
I have a project wherein i have to crack a given cipher text encrypted using RSA and have been given N and e. Can someone suggest an RSA attack using a very small exponent e(here e=3) and no padding?
Before I provide details, I want to clarify that I am not looking to implement this practically, but I'm only asking to get a better understanding. The way I currently understand it, we use slow hashes for passwords because there are too few possibilities in passwords. This means people could calculate all the poten...
Could a very long password theoretically eliminate the need for a slow hash?
How to compute the dot product on encrypted values?
How large should $p$ be if the Diffie-Hellman exchange is encrypted? Well, that rather depends on: - How much do you trust the encryption key not to be recovered? - Why are you doing a Diffie-Hellman in the first place? If you can trust that the encryption key will never be recovered by anyone other than th...
How large should $p$ be if the Diffie-Hellman exchange is encrypted? Well, that rather depends on: - How much do you trust the encryption key not to be recovered? - Why are you doing a Diffie-Hellman in the first place? If you can trust that the encryption key will never be recovered by anyone other than th...
You could cheat and use different keys for each recipient. That would work assuming the recipients don't know each other (and cannot compare keys). Mix networks are by design hard to trace so it depends on the network. EDIT: Sending a message to Bob implies Alice knows how to find Bob in the first place, or kn...
As defined by [Wikipedia](http://en.wikipedia.org/wiki/Hash_function) a hash function is >[...] any algorithm or subroutine that maps large data sets of variable length to smaller data sets of a fixed length. For example, a person's name, having a variable length, could be hashed to a single integer. The values retu...
What is the difference between a hash and a permutation?
Is there a practical homomorphic encryption scheme that can give reasonable execution time results in computing a dot product: $$a_1*b_1 + a_2*b_2 +a_3*b_3 +\ldots+ a_n*b_n$$ I imagine the scheme will need to support additions and multiplications to achieve this, so I assume we will need something that is fully homom...
What is the current state of the art zero knowledge proof compiler ? I need one that can minimally handle double exponentiation by a known value E.g. $$Pok\{(\alpha):h=g^{\alpha^b}\} $$ where b, g and h are public but $\alpha$ is secret. Preferably it should be able to handle double discrete log proofs E.g....
State of the art in zero knowledge proof compilers?
What is the current state of the art zero knowledge proof compiler ? I need one that can minimally handle double exponentiation by a known value E.g. $$Pok\{(\alpha):h=g^{\alpha^b}\} $$ where b, g and h are public but $\alpha$ is secret. Preferably it should be able to handle double discrete log proofs E.g....
Let's say Alice and Bob are playing a game where Bob is trying to guess a number Alice has chosen. Alice chooses a key $K$ and a number $N$ at random and performs $C=Commit(K, N)$ where $Commit(K, N)=h(h(K) \| h(N))$. $h()$ is a collision-resistant hash function and $K$ and $N$ can be of any length. Bob guesse...
Is it a multidisciplinary? an interdisciplinary? a cross-disciplinary? or a trans-disciplinary? what are the basis put to describe each kind?
In which disciplinary kind can Cryptography be put?
Unfortunately it seems you'll have to do a survey on the subject on your own. [This article](http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=248057&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D248057) seems to be relevant to what you're asking but I haven't read myself so I can't tell fo...
Shoup published in 2004 a paper on handling sequences of games, which targets the probability/hardness of combinations of cryptographic assumptions: ["Sequences of Games: A Tool for Taming Complexity in Security Proofs"](http://www.shoup.net/papers/games.pdf) With those conclusions you can calculate the probabili...
As Henrick notes, **permutation** is a mathematical term for a function (or map; these two words are essentially synonymous in mathematics) that rearranges the elements of its domain so that exactly one input is mapped to each output. In other words, a function $f$ from a set $S$ to $S$ is a permutation if and only ...
i'm still don't understand about 'reduces the coefficients of a modulo 3' on NTRU tutorial > a = f*e = 3 - 7X - 10X2 - 11X3 + 10X4 + 7X5 + 6X6 + 7X7 + 5X8 - 3X9 - > 7X10 (modulo 32). > Note that when Bob reduces the coefficients of f*e modulo 32, he chooses values lying between -15 and 16, not between 0 and 31. It...
If you want an answer that is maximally efficient in consuming a stream of random bits, then you need a decoder for arithmetic encoding. However if you're using a moderately fast CSPRNG, why would you sacrifice extra clock cycles to squeeze all the biased bits you can from each unbiased bit?
Not sure what you are trying to do but are you not approaching it the wrong way? NIST already recommends algoorithms/ciphers for use in their environments. This means they have vetted these and are deemed secure. Now you want performance as well. So use openssl and see which of the algorithms are of acceptable perf...
If you want an answer that is maximally efficient in consuming a stream of random bits, then you need a decoder for [arithmetic encoding](http://en.wikipedia.org/wiki/Arithmetic_coding). However if you're using a moderately fast CSPRNG, why would you sacrifice extra clock cycles to squeeze all the biased bits you can ...
i'm still don't understand about 'reduces the coefficients of a modulo 3' on NTRU tutorial > $a = f*e = 3 - 7X - 10X^2 - 11X^3 + 10X^4 + 7X^5 + 6X^6 + 7X^7 + 5X^8 - 3X^9 -7X^{10} \pmod{32}.$ > Note that when Bob reduces the coefficients of $f*e \bmod{32}$, he chooses values lying between -15 and 16, not between 0 ...
What is secure modulus length for modular exponentiation so that finding discrete log is computationaly impossible?
I'm sure it can, because SRP (secure remote protocol) can be implemented everywhere where Diffie-Hellman works, but I need a proof to put this aspect into Wikipedia. --- Edit: ok, can it be partially moved to elliptic curves?
> **Please See [Why Not Allow Special Characters In a Password](http://security.stackexchange.com/q/17192/971) on Security.** Several websites I've come across limit the allowed special characters for a password. My thought was, it should all be hashed anyway so why does it matter? Is there an actual security re...
I've been studying (more like breathing and eating) crypto for almost a year now, implementing algorithms, reading books, studying code, etc. The deeper I go in, the more I realize there is; I feel like I've just barely scratched the surface (if even that). Why do I start the word buffers in MD5 with those values sp...
Where can I begin to study the math behind modern cryptography?
A deterministic encryption scheme is a cryptosystem which always produces the same ciphertext for a given plaintext and key, even over separate executions of the encryption algorithm. Although we cannot achieve semantic security or indistinguishability for deterministic encryption due to lack of randomness in cipher...
Is it a multidisciplinary? an interdisciplinary? a cross-disciplinary? or a trans-disciplinary? what are the basis put to describe each kind? I mean how can we infer by which disciplinary field we can describe the cryptography? I got an answer such as it is a multidisciplinary because it contains multiple subjects li...
Suppose, for some security parameter $n$ you choose a prime $p$ such that $p = 2^n+c$ for some relatively small $|c| < 2^m << 2^n$. I have seen such primes being called <strong>Pseudo-Mersenne Primes</strong> (if $c < 0$), <strong>Barrett Primes</strong> or <strong>Crandall Primes</strong>. Does choosing such specia...
Suppose, for some security parameter $n$ you choose a prime $p$ such that $p = 2^n+c$ for some relatively small $|c| < 2^m << 2^n$. I have seen such primes being called <strong>Pseudo-Mersenne Primes</strong> (if $c < 0$), <strong>Barrett Primes</strong> or <strong>Crandall Primes</strong>. Does choosing such specia...
You might want to give some information about your background - whether you go to school/ college/ graduated in computer science/ work as a programmer/ or something else. In general, studying computer science or mathematics is a good foundation. However, cryptography will probably be covered in advanced courses at l...
to get highest performance Which asymmetric cipher provide fastest encryption/decryption ? electivecurve or diffie hellman ?
which asymmetric cipher provide highest performance?
HMAC used to secure chosen cipher-text attacks. if we are encrypting a large file (video) and sending it over TLS for decryption, how server can check MAC for ciphertext when we didn't sent whole of ciphertext yet ?
to get highest performance Which asymmetric cipher provide fastest encryption/decryption ? ECC or DH ? what key size is recommended today ?
About teachers I and others have suggested some teachers. But another approach would of course be to contact companies who work with cryptography (or analysis for that matter). Maybe both. I have no general knowledge about names, except for this award winning company: http://www.cryptomathic.com/. No I don't have an...
i am doing a project which requires the encryption to be done using AES.Is it really possible(technically)to crack AES?If yes please tell me the probability of breaking AES?What is the role of increasing the rounds?Do they really help in increasing the probability?What is the contribution of each round towards enhancin...
what is the probability of breaking AES algorthim?
What is the amount of decrease in the probability of decrypting a data encrypted using an AES algorithm? (That is by introducing each round out of ten whole rounds, how the probability of decryption is reduced?)
The complexity of the number field sieve can be obtained from the expected size of the coefficients of the polynomial $f(x) = x^d + c_{d-1} x^{d-1} + \ldots + c_0$: if $c_i \le n^{\epsilon/d}$, then the expected runtime is $$ \exp\left(\left(\left(\frac{32(1 + \epsilon)}{9}\right)^{1/3} + o(1)\right) (\log n )^{1/3...
I am doing a project which requires the encryption to be done using AES.Is it really possible(technically)to crack AES? If yes please tell me: The probability of breaking AES? What is the role of increasing the rounds? Do they really help in increasing the probability? What is the contribution of each round...
Of course it is technically possible to crack AES. The method for doing this is to guess the correct key. Assuming you know something about the plaintext, you can easily verify that the key you guessed resulted in the correct decryption. *The probability of breaking AES using this method?* AES has 128, 192 and 256 b...