instruction
stringlengths
15
30k
Yes. We can easily generate the malicious public key as in DSS case. The following attack was proposed in Section 4.5 of [Blake-Wilson and Menezes: Unknown Key-Share Attacks on the Station-to-Station (STS) Protocol (PKC 1999)](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.30.1051). Let $(G,q,n,P)$ be the ...
> Is there a need to encrypt data when send over https? *Maybe,* but it would not be practical for widespread consumer use. In order for this extra encryption to be effective against [tag:man-in-the-middle] attacks, the client and server would already have had to agreed upon a pre shared secret out of band.
Given two 56bit keys, k1 and k2, why does Ek1(Ek2(M)) only give 57 bits of security? So basically im unsure why it only gives 57 bits of security, i understand that one key will provide 56 bits. Only thing i can think of is that when adding another 56 bit it will cycle through all the bits and realise they are the s...
Applying DES twice to give 57 bits?
With RSA : Is there a way to find his private key after encrypted it with the corresponding public key ;-) Does exist a sort of crypto "t-weak" to recover the private key in this special cas ?
Is there a way to find an RSA private key after it is encrypted with the corresponding public key? Does there exist an algorithm to recover the private key in this special case?
I just stumbled across [a Stack Overflow post](http://stackoverflow.com/questions/4574245/what-are-ncfb-and-nofb-modes-for) which points out that the [libmcrypt library](http://mcrypt.sourceforge.net/) (notably used in PHP) implements a somewhat unusual set of [block cipher modes](//en.wikipedia.org/wiki/Block_cipher_m...
Is MCrypt's 8-bit OFB mode secure?
in a project that I am working on we have been tasked with eliminating PGP while providing sufficient security to protect payment files only within the Company's trusted network. We arrived at HMAC SHA256. Assuming that we can keep the key private and refresh the (128 bit) key annually, can someone comment on how di...
Assume that Alice received 100 ciphertexts encrypted with additive homomorphic encryption, say Paillier, using the same public key that belongs to Bob. Alice added all of them, and wants to know the final sum, so she sends the final result (which is still encrypted of course) to Bob so that he can decrypt it with his...
Assume that Alice received 100 ciphertexts encrypted with additive homomorphic encryption, say Paillier, using the same public key that belongs to Bob. Alice added all of them, and wants to know the final sum, so she sends the final result (which is still encrypted of course) to Bob so that he can decrypt it with his...
I am writing a program using a Pedersen commitment and all I'm missing is an appropriate length for my prime p. I have heard that a length of 2^80 is ok, is that correct?
Given two 56-bit keys, $k_1$ and $k_2$, why does $E_{k_1}(E_{k_2}(M))$ only give 57 bits of security? So basically I'm unsure why it only gives 57 bits of security; I understand that one key will provide 56 bits. Only thing I can think of is that when adding another 56 bit it will cycle through all the bits and real...
Why does applying 56-bit DES twice only give 57 bits of security?
For reasonable security, EC private keys are typically 256-bits. Shorter EC private keys are not sufficiently secure. However, shorter symmetric keys (128-bits, for example) are comparably secure. I have a case where I need to regenerate an EC private key (that can be constructed by a special method) with as little ...
Assume that Alice received 100 ciphertexts encrypted with additive homomorphic encryption, say Paillier, using the same public key that belongs to Bob. Alice added all of them, and wants to know the final sum, so she sends the final result (which is still encrypted of course) to Bob so that he can decrypt it with hi...
Assume that Alice received 100 ciphertexts encrypted with additive homomorphic encryption, say Paillier, using the same public key that belongs to Bob. Alice added all of them, and wants to know the final sum, so she sends the final result (which is still encrypted of course) to Bob so that he can decrypt it with hi...
I am working with a library that outputs EC points in uncompressed form. To save space, I'm considering modifying said library to use compressed EC points. Assuming that I keep track of the sign bit prior to compression, is there any risk in compressing said point? I read this [Q and related answer][1], but want ...
Is it ever unsafe to compress an EC point?
Ahead of the question, little warning. Question is not about what are the better options. Question is why it is bad idea? Ok, suppose we have plaintext $p$, which divided into blocks: $p_1,p_2,p_3,...,p_n$ CBC (cipher block chaining) can be then defined as $c_1=E_k(p_1)$,$c_2=E_k(p_2+c_1)$,$c_{i+1}=E_k(p_{i+1}+c_...
Plaintext block chaining, bad idea why?
I'm trying to learn the scheme attribute based encryption. Almost all articles describes what they are designed for cloud storage. But as I understand almost all computing: encryption, decryption are performed on the client side and not in the cloud. In this regard, I have a question, how these schemes are related to...
Ahead of the question, little warning. Question is not about what are the better options. Question is why it is bad idea? Ok, suppose we have plaintext $p$, which divided into blocks: $p_1,p_2,p_3,...,p_n$ CBC (cipher block chaining) can be then defined as $c_1=E_k(p_1 \oplus IV)$,$c_2=E_k(p_2 \oplus c_1)$,$c_{i+...
I am trying to interpret the formula for index of coincidence from [here][1] ![Index of coincidence][2] I am not understanding fi , How i can calculate fi in this context ? Is this the appearance of single word like (`a`) in the whole sentence or what ? Because i am trying to solve it manually without using the m...
I am writing a program using a Pedersen commitment scheme and all I'm missing is an appropriate length for my prime $p$. I have heard that a length of $2^{80}$ is ok, is that correct?
I'm trying to understand attribute-based encryption schemes. Almost all articles describe that they are designed for cloud storage, but as I understand, almost all computing (encryption & decryption) are performed on the client side and not in the cloud. In this regard, I have a question. How are these schemes relat...
We have used "AES/CBC/PKCS5Padding" with a 256 bit key. We encrypt different streams of data (blockwise) with the same key. Each encrypted stream ends with same pattern. What is the reason for this?
I've seen people everywhere say to use a MAC or HMAC with block ciphers. I think I understand the basics, but I'm still not sure how the HMAC secret is distributed so the other party can verify that it's valid. Is the secret distributed freely like the IV (though the name suggests it is <em>secret</em>)? Is it part of ...
How is the MAC or HMAC secret shared with the other party for verification?
It seems that the nonce of AES-GCM in SSL has 3 parts: - salt, 4 bytes, generated in handshake, not changed in whole session - nonce_explicit, 8 bytes, chosen by the sender and carried in each SSL record - inner_counter, 4 bytes, used in AES-GCM internal Is it possible to use a more simple method to construct t...
It seems that the nonce of AES-GCM in SSL has 3 parts: - salt, 4 bytes, generated in handshake, not changed in whole session - nonce_explicit, 8 bytes, chosen by the sender and carried in each SSL record - inner_counter, 4 bytes, used in AES-GCM internal Is it possible to use a more simple method to construct t...
I've been looking into message authentication codes and found several ways to create integrity for a message. I know of the following algorithms: **HMAC**, this can use any cryptograhpic hash function and a key, for a HMAC to be secure the underlying hash function does not have to be (though I assume it would be a g...
I've being studying up on AES, GCM, CBC, HMAC and a lot of other primitives and are quite familiar with them however I am still a bit weary on the use of the keys and nonce. **Background:**<br> I have got multiple (embedded) devices (sometimes hundreds) all of which are connect to a server. These devices are to com...
Is it possible to have different keys on alot of (embedded) devices and just have 1 key on a server (to witch all these devices connect). The main point here being when 1 device is compromised this does not mean the traffic between other devices and the server is compromised (even if the server does not know that 1 dev...
I've being studying up on AES, GCM, CBC, HMAC and a lot of other primitives and am somewhat ( a little bit, perhaps) familiar with them *(edited to suit Maarten)* however I am still a bit weary on the use of the keys and nonce. **Background:**<br> I have got multiple (embedded) devices (sometimes hundreds) all of w...
I've being studying up on AES, GCM, CBC, HMAC and a lot of other primitives and am somewhat ( a little bit, perhaps) familiar with them *(edited to suit Maarten)* however I am still a bit weary on the use of the keys and nonce. **Background:**<br> I have got multiple (embedded) devices (sometimes hundreds) all of w...
I've being studying up on AES, GCM, CBC, HMAC and a lot of other primitives and am somewhat ( a little bit, perhaps) familiar with them however I am still a bit weary on the use of the keys and nonce. **Background:**<br> I have got multiple (embedded) devices (sometimes hundreds) all of which are connect to a serve...
Is there any patent free EC point compression available? If not, should I GPL/LGPL my code?
I am planning on backing up my hard drive using a cloud backup service but have become skeptical of the industry based on incidents like these: http://dbmsmusings.blogspot.com/2011/02/why-i-no-longer-trust-emc.html http://security.stackexchange.com/questions/7142/online-backup-how-could-encryption-and-de-duplicatio...
Are there drawbacks to encrypting data locally before being encrypted in cloud backup (multiple encryption)?
We have p and q which are distinct primes congruent to 1 mod 4. Then we have n = p*q. Do you know any algorith for calculating square roots for the decryption in this case? I'm asking for some explanation how to calculate or some pseudocode. Thanks in advance
I'm a student currently working on a research project on the NTRU cryptosystem, I've read some papers about this cryptosystem, and in those papers they are talking about keysize, is it the size of the public key or private key ? is there any other indusctrial application of NTRU apart from CyaSSL ? Thank you
what are the NTRU keysize and application in industry ?
In some literature it is written that the private key should be chosen random from {2,3, ..., p-1} and in some it says {2,3, ..., p-2} I guess p-1 is a weak private key, but why is that so? The calculation would be: A = k <sub>pub, A</sub> = α<sup>p-1</sup> mod p
I am trying to understand the conditions necessary for one of the Bletchley Park bombes to stop. Let me give an example. I have been experimenting with Enigma machine and bombe simulators to try to understand better how the bombe works. Using a standard three rotor Enigma machine set up as follows: - Rotors ...
Under what conditions did a Bletchley bombe stop?
Apart from the performance hit of encrypting / decrypting twice, and the inconvenience of having two keys to not lose this should work fine. In fact I wish more people had your approach to data privacy and encrypted things before sending them over the internet! About Altdrive in particular, a good question to ask yo...
Apart from the performance hit of encrypting / decrypting twice, and the inconvenience of having two keys to not lose, this should work fine. In fact I wish more people had your approach to data privacy and encrypted things before sending them over the internet! About Altdrive in particular, a good question to ask y...
I am attempting to write a program to perform a linear approximation attack on a reduced round version of the SIMON block cipher, but I am stuck on how to actually apply the linear approximation to get the subkeys for each round. I found [this paper][1], in which the following high-bias linear approximations are listed...
I am attempting to write a program to perform a linear approximation attack on a reduced round version of the SIMON block cipher, but I am stuck on how to actually apply the linear approximation to get the subkeys for each round. I found [this paper][1], in which the following high-bias linear approximations are listed...
What is the simplest [conjunctive normal form (CNF)][1] representation of the SHA-256 algorithm? [1]: https://en.wikipedia.org/wiki/Conjunctive_normal_form
What is SHA-256 in Conjunctive Normal Form?
What is the [conjunctive normal form (CNF)][1] representation of $\text{SHA-256}(m)=h$, where $m$ is of fixed (or bounded) size and $h$ is 256 bit? [1]: https://en.wikipedia.org/wiki/Conjunctive_normal_form
Is it possible to have different keys on alot of (embedded) devices and just have 1 key on a server (to witch all these devices connect)? The main point here being when 1 device is compromised this does not mean the traffic between other devices and the server is compromised (even if the server does not know that 1 dev...
I read something about cache attacks like this: >Enter KSM (Kernel SamePage Merging). KSM enables the kernel to examine two or more already running programs and compare their memory. If any memory regions or pages are identical, KSM reduces multiple identical memory pages to a single page. This page is then marked c...
I read something about cache attacks like this: >Enter KSM (Kernel SamePage Merging). KSM enables the kernel to examine two or more already running programs and compare their memory. If any memory regions or pages are identical, KSM reduces multiple identical memory pages to a single page. This page is then marked c...
I want to anonymise the initials of experiment participants by giving each a pseudonymic set of initials, based on a symmetric encoding of their true initials. These are data from individual human experiment participants that I publish online and in scientific journals. The convention (from a more innocent time) is...
i am reading the Pinocchio paper. the calculated result y is a part of the verification input, but it seems to me, the verification procedure does not utilize the result y. can anyone can help me to understand this?
I want to anonymise the initials of experiment participants by giving each a pseudonymic set of initials, by encrypting their true initials. Their initials are only two or three letters in length. These are data from individual human experiment participants that I publish online and in scientific journals. The conv...
I understand how ECC works for the point multiplications and stuff. <br> All we normally do is to multiply a scalar number (lets say d as a private key) with the base point generator `G` to get a public key point on an elliptic curve. <br> I am trying to tweak the algorithm for some other purposes so I am just wonder...
Such an operation [is possible](http://courses.csail.mit.edu/6.897/spring04/L25.pdf). <br> The ways of calculating that [appear to be different for each curve](https://duckduckgo.com/?q=elliptic+curves+pairing).
1. From my little understanding of EC based authenticated key exchange protocols that it is not possible for authenticated key exchange without signing/signature scheme, please confirm? 2. If both client and server does not have any certificates and server has only pre-shared secret of User/client. In this scenario,...
We all know AES has some pretty strong side channel attacks, some where (with a couple of hundred know plain- and ciphertext combinations) a key can be derived in a matter of minutes. Others may take a bit longer but they are out there if people have full access to the hardware and control over the algorithm. Does T...
We all know AES has some pretty strong side channel attacks, some where (with a couple of hundred know plain- and ciphertext combinations) a key can be derived in a matter of minutes. Others may take a bit longer but they are out there if people have full access to the hardware and control over the algorithm. Does T...
How can a system where the party performing a computation also possess the private key and still not know the answer of computation be designed ? Also the other party who does not have the private key know the correct result ? Involving a trusted third part seems a possible solution. But are there other ways to desi...
I am currently learning about encryption and I was asked a question: If a customer only had a DES system how could I secure messages as DES is not secure. I was researching this and I came across a Hybrid crypto system, where a symmetric-key crypto system (DES) is used and a public-key crypto system is also used....
I am reading the [Pinocchio paper][1]. The calculated result $y$ is a part of the verification input, but it seems to me, the verification procedure does not utilize the result $y$. Can anyone can help me to understand this? [1]: http://research.microsoft.com/pubs/180286/pinocchio.pdf
I am new to cryptography and I want to know the details of how Certificate Authority issues a digital certicate. From what I know(Please correct me if I wrong at any parts of my explaination) If Alice wants to request for a digital certificate, Alice will send her public key to the Certificate Authority. The ...
How does a Certificate authority issues a digital certicate?
I apologise if this has been asked before. I couldn't find any such question. Is the "compression function" in Merkle-Damgard just a collision-resistant, one-way hash function but one that operates only on fixed size blocks? If so, is MD just a way to extend it to work on arbitrary length strings?
What is the "compression function" in Merkle Damgard?
What is the "compression function" in Merkle Damgaard?
I apologise if this has been asked before. I couldn't find any such question. Is the "compression function" in Merkle-Damgard just a collision-resistant, one-way hash function but one that operates only on fixed size blocks? If so, is MD just a way to extend it to work on arbitrary length strings? [edit] changed ...
I apologize if this has been asked before. I couldn't find any such question. Is the "compression function" in Merkle-Damgård just a collision-resistant, one-way hash function but one that operates only on fixed size blocks? If so, is MD just a way to extend it to work on arbitrary length strings?
What is the "compression function" in Merkle-Damgård?
Is the "compression function" in Merkle-Damgård just a collision-resistant, one-way hash function but one that operates only on fixed size blocks? If so, is MD just a way to extend it to work on arbitrary length strings?
I'm having a hard time understanding why people use constant-time techniques to counter time-attacks, when blinding seems as good and cheaper to implement. Why do people avoid blinding in ECC?
Great question. I'll answer it in several parts. #Which Keys does Alice send?# There are two cryptographic operations that Alice may want to do: encryption/decryption, and signing/validation. You can either use the same keypair for both, or have two separate pairs of keys. ##1 keypair method:## Here Alice wou...
Using a quantum computer, [Grover's algorithm](http://en.wikipedia.org/wiki/Grover's_algorithm) can search an unordered list of length $N$ in time $\sqrt{N}$. Applied to cryptography this means that it can recover $n$ bit keys and find preimages for $n$ bit hashes with cost $2^{n/2}$. But the basic version of Grover...
Can Grover's algorithm be parallized?
Using a quantum computer, [Grover's algorithm](http://en.wikipedia.org/wiki/Grover's_algorithm) can search an unordered list of length $N$ in time $\sqrt{N}$. Applied to cryptography this means that it can recover $n$ bit keys and find preimages for $n$ bit hashes with cost $2^{n/2}$. But the basic version of Grover...
Great question. I'll answer it in several parts. #Which Keys does Alice send?# There are two cryptographic operations that Alice may want to do: encryption/decryption, and signing/validation. You can either use the same keypair for both, or have two separate pairs of keys. ##1 keypair method:## Here Alice wou...
Great question. I'll answer it in several parts. #Which Keys does Alice send?# There are two cryptographic operations that Alice may want to do: encryption/decryption, and signing/validation. You can either use the same keypair for both, or have two separate pairs of keys. ##1 keypair method:## Here Alice wou...
Great question. I'll answer it in several parts. #Which Keys does Alice send?# There are two cryptographic operations that Alice may want to do: encryption/decryption, and signing/validation. You can either use the same keypair for both, or have two separate pairs of keys. ##1 keypair method:## Here Alice wou...
Yes, it's the same [XOR][1]. It gets used inside most of the algorithms, or just to merge a stream cipher and the plaintext. Everything is just bits, even text. The word "hello" is in ASCII `01101000 01100101 01101100 01101100 01101111`. Just normal bits, grouped in 5 bytes. Now you can encrypt this string with a ra...
I am new to cryptography and I want to know the details of how a Certificate Authority issues a digital certificate. From what I know (please correct me if I'm wrong at any parts of my explanation): If Alice wants to request a digital certificate, Alice will send her public key to the Certificate Authority. T...
How does a certificate authority issue a digital certificate?
We have used "AES/ECB/PKCS5Padding" with a 256 bit key. We encrypt different streams of data (blockwise) with the same key. Each encrypted stream ends with same pattern. What is the reason for this?
We have used "AES/CBC/PKCS5Padding" with a 256 bit key. We encrypt different streams of data (blockwise) with the same key. Each encrypted stream ends with same pattern. What is the reason for this?
We have used "AES/ECB/PKCS5Padding" with a 256 bit key. We encrypt different streams of data (blockwise) with the same key. Each encrypted stream ends with same pattern. What is the reason for this?
What does it mean when we talk about FIPS-197 compliance in the context of SSL certificates, their deployment and usage ? I am almost certain that the FIPS-197 compliance in the context of SSL configuration is not about how the certificate is generated and signed but rather about how the web server / application...
What does it mean when we talk about FIPS-197 compliance in the context of SSL certificates, their deployment and usage ? I am almost certain that the FIPS-197 compliance in the context of SSL configuration is not about how the certificate is generated and signed but rather about how the web server / application...
Using a quantum computer, [Grover's algorithm](http://en.wikipedia.org/wiki/Grover's_algorithm) can search an unordered list of length $N$ in time $\sqrt{N}$. Applied to cryptography this means that it can recover $n$ bit keys and find preimages for $n$ bit hashes with cost $2^{n/2}$. But the basic version of Grover...
In **NTRU** crypto system I have used these polynomials and parameters: $N = 17, p = 7, q = 64$ and $f$ as private key is: $$f = -1 + x + x^2 - x^4 + x^6 + x^9 - x^{10}$$ So the inverse of $f$ in ring $\mathbb{Z}[X]/(X^N-1)$ is: $$f_p = 3x^{16} + 3x^{15} + x^{14} + 6x^{13} + 5x^{12} + 6x^{11} + x^{10} + 2x^9 + 2x^8...
I presume you are referring to hardcore, one-way functions (OWF's) with polynomial span? There have been a flurry of publications in the past 12 months relating to these functions and their implied possibility or practicability. The challenge with hardcore predicates has been in achieving polynomial span... [Bellar...
How can a system where the party performing a computation also possess the private key and still not know the answer of computation be designed ? Also the other party who does not have the private key know the correct result ? Involving a trusted third part seems a possible solution. But are there other ways to desi...
How can a system where the party performing a computation also possess the private key and still not know the answer of computation be designed ? Also the other party who does not have the private key know the correct result ? Involving a trusted third part seems a possible solution. But are there other ways to desi...
Is the reverse of the “discrete logarithm problem” equally dificult?
Maybe this turns out to be a very naive question, but is better to ask once than to be in doubt forever. The discrete logarithm problem is termed as:<br> Finding an integer $k$ for $b$ and $g$ known in $b^k=g$ I wonder.<br> Is the reverse, that is:<br> Finding an integer $b$ for $k$ and $g$ known in $b^k=g$ <br...
I am trying to generate the S-Box provided in the Affine Power Affine paper ([PDF][1]) but I'm not sure I understand it fully. The essence of the paper is this: AES(i) = Affine(Power(i)) APA(i) = Affine(Power(Affine(i))) Where Affine is the affine transform and Power is the inverse transform used in...