instruction
stringlengths
15
30k
SHA1 no longer considered secure for SSL Certificates -- what about Cipher Suites?
The main thing that makes HMAC secure in typical use even with MD5 is that it is used with a secret key. That means only preimage attacks are really relevant, since finding a collision is always an online attack if you don't know the key. With known attacks the preimage resistance of both MD5 and SHA-1 is > 100 bits. A...
This answer builds on the one supplied by @otus. There is also an important worry about whether the main solution works at all as advertised. I am posting it now to make clearer to @otus a question I asked in a comment. I will eventually either delete it or substantially revise it. First off, let me emphasize tha...
From Wikipedia: **Signing** - Choose a random k from the allowed set. - Let *r = g^k*. - Let *e = H(M || r)*, where *||* denotes concatenation and r is represented as a bit string. - Let *s = (k - xe)*. - The signature is the pair *(s,e)*. **Verifying** - Let *r_v = g^s y^e* - Let *e_v = H(M || ...
Is this modified Schnorr signature scheme secure?
**Signing** - Let *y = g^x*, which is your public/private keypair. - Let *r = g^v*, for random v - Let *c = H(M)* - Let *z = (v + cx) mod q* - The signature is the pair *(r,z)* **Verifying** - *g^z = ry^c mod p* We further assume that the signer takes care not to sign the same message twice (that'...
Why do I start the word buffers in MD5 with those values specifically? What in the world motivated the decision to use the numbers 1, 1, 2, 3 for the mix columns stagein AES? And what kind of witchcraft is going on in SHA when I call the sigma_x functions? What kind of math should I be starting with, assuming I only...
at the paper Fully Homomorphic Encryption over the Integers in introduction do I calculate r and q of this equation in the picture ? ![enter image description here][1] what is the meaning of symbole like n in the picture ![enter image description here][2] and how calculate it ? [1]: https://i.stack....
I'm trying to implement an RSA module in a FPGA. I choose to use Montgomery multiplication. I've found a document where the Montgomery Multiplication is pretty clear. I don't understand only a step. The algorithm is : $$ S[0] = 0 $$ for i to k-1 loop $$ q_i = ( S[i]_0 + A_i * B_0 ) \bmod 2 $$ $$ S[i+1]...
at the paper Fully Homomorphic Encryption over the Integers in introduction do I calculate r and q of this equation in the picture ? > ![enter image description here][1] what is the meaning of symbole like n in the picture > ![enter image description here][2] and how calculate it ? [1]: ht...
I'm trying to implement an RSA module in a FPGA. I choose to use Montgomery multiplication. I've found a document where the Montgomery Multiplication is pretty clear. I don't understand only a step. The algorithm is… $S[0] = 0\\ for\ i\ to\ (k-1)\ loop\\ \ \ \ \ q_{i} = ( S[i]_0 + A_{i} \times{B_{0}} ) \bmod...
Practical techniques for searchable encryption proposed by Song et all <sup>\[1\]</sup> have a false positive rate of $l/2^m$ where $l$ is left half of encrypted bits and $m$ is right half and $l+m=n$ where $n$ is number of bits of the word being encrypted. For getting clarity on these bits please refer the figure 3 in...
Practical techniques for searchable encryption proposed by Song et al. \[1\] have a false positive rate of $l/2^m$ where $l$ is left half of encrypted bits and $m$ is right half and $l+m=n$ where $n$ is number of bits of the word being encrypted. For getting clarity on these bits please refer the figure 3 in page 6. ([...
In the paper [Fully Homomorphic Encryption over the Integers](https://eprint.iacr.org/2009/616) in the introduction: How do I calculate $r$ and $q$ of this equation in the picture? $r \approx 2^{\sqrt{\eta}}$ and $q \approx 2^{\eta^3}$ what is the meaning of symbol like $\eta$ in the picture? $p\in [2^{\e...
I need to store encrypted files on a hard disk. The actual code side is not important for me now (I plan to use C# and AES-GCM encryption from Bouncy Castle library, please tell me if you think that's a bad idea!), but I'm having trouble designing the actual high-level algorithm. How do I deal with user changing pa...
**How do I deal with user changing password (The key will be generated from password.)?** Generate a random master key K. Use K to encrypt the files. Use the user's password to generate a second key, K'. Encrypt the master key using K'. Then when the user changes his password, all you need to do is decrypt the maste...
Many browsers and Internet companies have recently claimed that SSL Certificates with a signature algorithm of SHA1 will imminently no longer be considered secure. Most notably, [Google and Google Chrome](http://googleonlinesecurity.blogspot.com/2014/09/gradually-sunsetting-sha-1.html). Yet I've read that since the...
**How do I deal with user changing password (The key will be generated from password.)?** Generate a random master key K. Use K to encrypt the files. Use the user's password to generate a second key, K'. Encrypt the master key using K'. Then when the user changes his password, all you need to do is decrypt the maste...
Can anyone help solve this ciphertext or propose a strategy?
In many encryption schemes CHARM random group message instead of text-message: msg=group.random(GT) for example, in CP-ABE scheme, random message is used: cpabe = CPabe_BSW07(group) msg = group.random(GT) attributes = ['ONE', 'TWO', 'THREE'] @see link for scheme details: http://jhuisi.github...
> It may be that that's due to lack of secure DNS (confirmation anyone?) So it [turned out][1] to likely be a warning about lack of DNS security. > I also noticed that the signing algorithm is shown as `a=rsa-sha1`, and with the move to “Deprecate SHA-1” in other contexts, I'm wondering: *how urgent this is for D...
The main thing that makes HMAC secure in typical use even with MD5 is that it is used with a secret key. That means only preimage attacks are really relevant, since finding a collision is always an online attack if you don't know the key. With known attacks the preimage resistance of both MD5 and SHA-1 is > 100 bits. A...
In many encryption schemes in [Charm][1] the random group message is used instead of a text-message: msg = group.random(GT) For example, in CP-ABE scheme, random message is used: cpabe = CPabe_BSW07(group) msg = group.random(GT) attributes = ['ONE', 'TWO', 'THREE'] See link for scheme de...
What is "msg = group.random(GT)" in Charm encryption schemes?
A Brute Force Attack obviously involves attempting to decrypt ciphertext (with the associated plaintext being known) using all possible encryption keys. Aside from attempting all possible encryption keys in sequence, have there been, or is there any alternative methods of performing a brute-force attack? I'm aw...
Can anyone propose a strategy to crack the given ciphertext?
Practical techniques for searchable encryption proposed by Song et al. \[1\] have a false positive rate of $l/2^m$ where $l$ is left half of encrypted bits and $m$ is right half and $l+m=n$ where $n$ is number of bits of the word being encrypted. For getting clarity on these bits please refer the figure 3 in page 6. ([...
I wonder what encryption scheme is used in high-precision encrypted GPS streams (the so-called “P(Y) code”). If there's a master key needed, then it has to be in every device. Yet the master key doesn't seem to have ever leaked (unlike like game consoles or Apple devices). So what could explain why military-precisio...
What is the (uncompressed) x,y-representation of a curve point on the P-256 NIST elliptic curve?
The text below has been taken from the below paper [Groth-Sahai Paper][1]. The relevant part is highlighted in red. ![enter image description here][2] What does this group-dependent language mean in this context? From the definition of a language we know that it means a set of strings. In this case what all are th...
One of the main rules of the OTP is, that a key should never ever be reused. But if we use some commutative operation (XOR for example) for generating the cipher text, then I don't see any difference between the message and the key, so can we also say that a message should never be reused? With other words - even i...
I have two X.509 certificates in DER format. A: 3082013C3081E4A003020102020A47901280001155957352300A06082A8648CE3D0403023017311530130603550403130C476E756262792050696C6F74301E170D3132303831343138323933325A170D3133303831343138323933325A3031312F302D0603550403132650696C6F74476E756262792D302E342E312D3437393031323830...
I need to know whether one can obtain any roots of the polynomial in Shamir secret sharing if he possesses less than threshold shares. For instance in (t,n) if he has t-1 shares can he obtain any roots of the original polynomial? ** Here we assume that the polynomial has some roots.
No, you can reuse a message as often as you want with the OTP. (But never reuse the key!) What happens if you reuse a key? The attacker can xor the two encrypted messages and gets the xor of the two plaintexts. The xor of two messages is highly insecure and can be easily turned into two plaintexts with some know pat...
No, you can reuse a message as often as you want with the OTP. (But never reuse the key!) What happens if you reuse a key? The attacker can xor the two encrypted messages (ciphertexts) and gets the xor of the two plaintexts. The xor of two messages is highly insecure and can be easily turned into two plaintexts with...
I have been attempting to find an answer to a self-study question: "If I have a hash algorithm that **outputs 256 binary bits**, on average, *how many times would I have to call the hash function so that the output begins with 15 zeros*? I am absolutely lost, but bare with me here - each bit has two possible values ...
Start smaller, that may help. How many calls would it take to have just the first bit be 0. If we model the hash function as having a truly random output, then the probability that one output has a 0 in the first bit is 0.5. The probability that one of two outputs has a 0 bit in the first position is 0.5+0.5=1. So, wit...
Start smaller, that may help. How many calls would it take to have just the first bit be 0. If we model the hash function as having a truly random output, then the probability that one output has a 0 in the first bit is 0.5. The probability that one of two outputs has a 0 bit in the first position is 0.5+0.5=1. So, wit...
Start smaller, that may help. How many calls would it take to have just the first bit be 0? If we model the hash function as having a truly random output, then the probability that one output has a 0 in the first bit is 0.5. How about with two outputs? Well, each one has a 0.5 probability of having a 0 in the first bit...
The right way to approach this problem is to think of the inverse problem. I.e., given N outputs from the hash function, what is the probability that none of them have the desired number of 0's? 1 - this probability is the probability that at least one will have the desired number of 0's. Let's simplify the problem ...
The right way to approach this problem is to think of the inverse problem. I.e., given N outputs from the hash function, what is the probability that none of them have the desired number of 0's? One minus this probability is the probability that at least one will have the desired number of 0's. Once you know this, you ...
I have been attempting to find an answer to a self-study question: "If I have a hash algorithm that **outputs 256 binary bits**, on average, *how many times would I have to call the hash function so that the output begins with 15 zeros*? I am absolutely lost, but bear with me here - each bit has two possible values ...
This question came up as I tried to answer an earlier question I asked: http://crypto.stackexchange.com/questions/19244/cryptographic-data-structure-wanted-sparse-array-without-membership-test. I still have not resolved that question to my satisfaction, but this question may be appreciated independently. I want an ...
Is deniable error-correction possible?
I have been attempting to find an answer to a self-study question: > If I have a hash algorithm that **outputs 256 binary bits**, on average, *how many times would I have to call the hash function so that the output begins with 15 zeros*? I am absolutely lost, but bear with me here - each bit has two possible va...
I've read several articles about brute force cryptanalytic attacks, but none explicitly say what algorithm is being run for each attempt, nor what criteria is used to declare an attempt a success or a failure. If one is to try every possible every possible key value, what is one feeding those keys into? A brute force a...
Does brute force attack use the program that created the ciphertext?
In the key generation step of [paillier][1] cryptosystem , In order to satisfy $\gcd(pq,(p-1)(q-1))=1$ , we can take equal [length][2] primes. Instead of taking(length as parameter to generate $p,q$) equal length primes , is there any time efficient method to generate $p,q$ that assures $pq,(p-1)(q-1)$ are re...
Is it feasible to build a cipher (or hash) out of GPU or DSP primitives (e.g. big matrix multiplication, Fast Fourier Transform, big block SIMD, or hardware H.264/AVC codec)? Preferably those are slow to run on conventional CPU but a lot faster on GPUs and DSPs.
Keccak follows a sponge construction. Can we say that Keccak employs a compression function ? Generally speaking, for sponde constructions, can we say that there is an underlying compression function ? Thank you
Keccak follows a sponge construction. Can we say that Keccak employs a compression function? Generally speaking, for sponge constructions, can we <br> say that there is an underlying compression function? Thank you
What are the properties derived from the fact that a hash function is indifferentiable from a random oracle ? Thank you.
Keccak follows a sponge construction. Can we say that Keccak employs a compression function? Generally speaking, for sponge constructions, can we say that there is an underlying compression function?
What are the properties derived from the fact that a hash function is indifferentiable from a random oracle?
I'm imagining this for use in the scenario of cloud-stored client-encrypted email, where, when seeking to do a string search across messages, you don't want to have to download every stored message in order to decrypt and search. [Note that inspiration for this approach is taken from [Jones & Mewhort, 2007][1]; I ot...
See any problems with this search-specific homomorphic encoding strategy?
I have been learning about Vigenere ciphers and then thought of this scenario: if a cryptographer encrypts a plaintext English message with a Vigenere cipher and then another cryptographer, who wants to ensure that the message is very secure, encrypts the ciphertext with another Vigenere cipher (with a different key le...
I came to [this article][1] from another comment on Crypto StackExchange. After reading it, I am wondering if there is any benefit to using a digital signature on unencrypted S/MIME emails? [1]: http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html
Is there benefit to signing unencrypted emails?
I have been learning about Vigenere ciphers and then thought of this scenario: if a cryptographer encrypts a plaintext English message with a Vigenere cipher and then another cryptographer, who wants to ensure that the message is very secure, encrypts the ciphertext with another Vigenere cipher (with a different key le...
Here's an approach that corrects some errors: * Alice has a bitstring S that is indistinguishable from random that she wants Trent to know. (Perhaps it's actually a ciphertext that only Bob knows how to decrypt). * Alice generates 5 fresh new random bit-strings pM, pN, pP, pQ, and pR just as long as the original ra...
Construct a hash function as follows: $H^{s_1,s_2}(x)=H^{s_1}(x)\|H^{s_2}(x)$, is it second pre-image resistant if at least one of $H^{s_1}$ and $H^{s_2}$ is second pre-image resistant? In my opinion, According to the definition of second pre-image resistat, Say $H^{s_1}$ is second pre-image resistant but $H^{s_2}$...
Applying another round of vigenere would make the ciphtertext (in nearly every case) harder to break, yes. The problem is: This "new" algorithm is just a normal vigenere algorithm with a longer key (if the key lengths of both keys are not equal and not 1). You don't need to apply vigenere a second time, you can just ca...
My question is quite related to the concept of homomorphic encryption, which is not practical at all nowadays. In short, I would like to know how the industry have dealt with encrypted databases? Simple queries which test the equivalence of the entries can be easily implemented. Fine. But how about queries lik...
Encrypted data-base: how to deal with general queries?
Applying another round of vigenere would make the ciphtertext (in nearly every case) harder to break, yes. The problem is: This "new" algorithm is just a normal vigenere algorithm with a longer key (if the key lengths of both keys are not equal and not 1). You don't need to apply vigenere a second time, you can just ca...
It is well known how to produce a NIZK that curvepoints $aG$ and $aP$ have the same discrete logarithm $a$ with respect to the curvepoints they are multiplied by. There is also a way to prove that a curve point $aG$ has the same discrete logarithm as one of $b_1P$, ..., $b_nP$. I think this is due to Cramer but I first...
My question is quite related to the concept of homomorphic encryption, which is not practical at all nowadays. In short, I would like to know how to query encrypted databases. Simple queries which test the equivalence of the entries can be easily implemented. Fine. How about queries like: "select all employees wi...
Encrypted database: how to deal with general queries?
I know of a company on their website who are using this very basic password login page written in JavaScript. This doesn't seem very secure at all, because in the html source code it shows where the script comes from: http://www.dynamicdrive.com/dynamicindex9/password.htm and also you can see how it works as it's JavaS...
I know of a company on their website who are using this very basic password login page written in JavaScript. This doesn't seem very secure at all, because in the html source code it shows where the script comes from: http://www.dynamicdrive.com/dynamicindex9/password.htm and also you can see how it works as it's JavaS...
Construct a hash function as follows: Two schemes $\Pi=(Gen_1,H_1)$ and $\Pi=(Gen_2,H_2)$. Compute $s_1 \gets Gen_1$ and $s_2 \gets Gen_2$. Let $H^{s_1,s_2}(x)=H^{s_1}(x)\|H^{s_2}(x)$, is it second pre-image resistant if at least one of $H^{s_1}$ and $H^{s_2}$ is second pre-image resistant? In my opinion, According...
Is it feasible to build a cipher (or hash) out of GPU or DSP primitives (e.g. big matrix multiplication, Fast Fourier Transform, big block SIMD, or hardware H.264/AVC codec)? Preferably those are slow to run on conventional CPU but a lot faster on GPUs and DSPs. So if such a GPU or DSP-based cipher or hash is feasib...
I'm looking forward to reading other answers -- a structure with these properties would be very useful for [plausibly deniable encryption][1]. Perhaps something like this might be adequate: // untested pseudocode initialize(): global_current_index = 0 global_array = [] for ea...
Trying to understand [PBKDF2][1] in details. It is clear that the password and the salt is given to the PRF (Which is HMAC-SHA-1 in PBKDF2). But what is the role of the INT_32_BE(i)? What does it call? Is it ORed (`||`) with the salt? And what is the value of INT_32_BE(i) any way? Is it 1? ....Can anyone clear this ...
On https://www.gnupg.org/faq/gnupg-faq.html#define_cast, it says that "Like 3DES, its 64-bit block size means it should not be used to encrypt files larger than 4Gb in size..." How/why does the block size affect the security of the cipher?
Why should CAST5 and 3DES not be used for encrypting files over 4GB?
On https://www.gnupg.org/faq/gnupg-faq.html#define_cast, it says that > Like 3DES, its 64-bit block size means it should not be used to encrypt files larger than 4Gb in size… How and why does the block size affect the security of the cipher?
Is One Time Pad something like this?
Trying to understand [PBKDF2][1] in detail. It is clear that the password and the salt is given to the PRF (which is HMAC-SHA-1 in [the specification][2]). But what is the role of the INT_32_BE(i)? What does it call? Is it ORed (`||`) with the salt? And what is the value of INT_32_BE(i) any way? Is it 1? Can anyone c...
I would like a data structure supporting two operations: set(k,v), and get(k), with the following properties: 1. k can be any number between 0 and something impressively large, like 2^256-1. 2. If there is some v such that set(k,v) has been called then get(k) returns the most recent such v. 3. There is no way to l...
I've been studying cryptography for a little while. I understand fairly well the nuts and bolts of security proofs, but I'm having trouble reconciling the formal statements of security in these proofs with their practical "meaning" for a real system. Is there an intuitive way to reason about the "real-world" security o...
**Problem:** We have a two-dimensional affine cipher with $n = 2,\,\,\,\mathcal{P} = \mathcal{C} = {\mathbb{F}_{16}^2}$, where $\mathcal{K} = \{ A,\,\,b\} $ and $b = (0,0)$. The encryption and decryption is in ${\mathbb{F}_{16}} = {\mathbb{F}_2}[x]/\left\langle {{x^4} + x + 1} \right\rangle $. The task is to recover...
I am starting to learn more about cryptography and I just read more about how asymmetric keys can make a digital certificate, and I would like if someone could explain me why the following case can't be applied: Since asymmetric keys rely on a pair of keys, and you use the private key to encrypt the hash of the docu...
Possible Digital Signature Hack?
Consider the values a and b are encrypted as c1=(a XOR D )and c2=(b XOR D), my question is that can we derive b+a from any combination of c1 and c2 ? * I admit that the D should have not been used for both a and b. For now assume we can use it.
Is it significantly easier to reverse a sha256 hash if you know that the input was a 32 byte output of sha256? I assume for most outputs of sha256 there will be zero, one or two possible 32 byte inputs. Mapping and storing all of the values is infeasible, but I am still worried that constraining the input to bein...
Any weakness when sha256'ing output of sha256, repeatedly?
I have some problems in understanding the "advantage" of AES-XTS compared to CBC with diffuser. I read something about [FileVault][1], in this paper they mention the two modes of operations XTS and CBC (with diffuser) and the advantages of XTS. Both modes encrypt data units almost the same way. For CBC, the secto...
Alphabet: [A-Z] = [0-25] Plaintext = HELLO = 7 4 11 11 14 // QUESTION: **do this key must be as long as plaintext?** KEY: [QWERT] KEY = 16 23 4 17 19 Plaintext + Key = 23 27 15 28 33 Plaintext + Key (mod 26) = 23 1 15 2 7 Cyphertext: XBPCH IF plaintext = "HELLO!" THEN key must be "QWERTY", right...
Consider the values a and b are encrypted as c1=(a XOR D )and c2=(b XOR D), my question is that can we derive b+a from any combination of c1 and c2 ? Note: (1) I admit that the D should have not been used for both a and b. For now assume we can use it. (2)Basically I define the values (a and b) in Zp, accordingly the ...
#=============================================================================# # dieharder version 3.31.1 Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Seed | stdin_input_raw...
How do you interpret the p-values from the Dieharder testsuite to evaluate an RNG?
Based on the additional details in the comments, it seems like your question is: given $c_1=a\oplus d$ and $c_2=b\oplus d$, can we get $(a+b)\oplus d$. Where $a,b,d\in\mathbb{Z}_p$, $+$ is addition modulo $p$, and $\oplus$ is a bitwise XOR of the values, then taken modulo $p$. Or put another way, is there an operati...
Based on the additional details in the comments, it seems like your question is: given $c_1=a\oplus d$ and $c_2=b\oplus d$, can we get $(a+b)\oplus d$. Where $a,b,d\in\mathbb{Z}_p$, $+$ is addition modulo $p$, and $\oplus$ is a bitwise XOR of the values, then taken modulo $p$. Or put another way, is there an operati...
Based on the additional details in the comments, it seems like your question is: given $c_1=a\oplus d$ and $c_2=b\oplus d$, can we get $(a+b)\oplus d$. Where $a,b,d\in\mathbb{Z}_p$, $+$ is addition modulo $p$, and $\oplus$ is a bitwise XOR of the values, then taken modulo $p$. Or put another way, is there an operati...
> I've read that a good RNG will have a range of p-values that follows a uniform distribution; values between 0 and 1 should happen with about equal probability. Why should that be so? It comes straight from the definition of p-values. The p-value indicates the probability you'd get at least that skewed a result if ...
Alphabet: [A-Z] = [0-25] Plaintext = HELLO = 7 4 11 11 14 // QUESTION: **do this key must be as long as plaintext?** KEY: [QWERT] KEY = 16 23 4 17 19 Plaintext + Key = 23 27 15 28 33 Plaintext + Key (mod 26) = 23 1 15 2 7 Cyphertext: XBPCH So is it correct that IF plaintext = "HELLO!" THEN the k...
> Is it significantly easier to reverse a sha256 hash if you know that the input was a 32 byte output of sha256? It depends on what you are comparing to. Is it easier to reverse an SHA-256 hash of some SHA-256 hash than that of a random number? Sure, it can be. For example, it is easy to find that the preimage of...
Based on the additional details in the comments, it seems like your question is: given $c_1=a\oplus d$ and $c_2=b\oplus d$, can we get $(a+b)\oplus d$. Where $a,b,d\in\mathbb{Z}_p$, $+$ is addition modulo $p$, and $\oplus$ is a bitwise XOR of the values, then taken modulo $p$. Or put another way, is there an operati...