instruction
stringlengths
15
30k
It is well known that simple m-sequence linear feedback shift registers have a linear algebraic structure and therefore the generator seed can easily be deduced using the Berlekamp-Massey algorithm. Are there any other algorithms that can that can be used to "break" LFSR's and if so how does the algebra of said algorit...
Yes. Blowfish's S-boxes serve a similar purpose as AES's S-box. The P-array is used as part of the key schedule, to make sure that each round is different (this helps prevents slide attacks and related-key attacks). I recommend you read [the official specification of Blowfish](https://www.schneier.com/blowfish.h...
Preface: here is the official site for the Blowfish algorithm: http://www.schneier.com/blowfish.html The Blowfish algorithm uses an s-box, which consists of hex digits of pi (found here: http://www.schneier.com/code/constants.txt). I'm guessing that this s-box serves a very similar purpose to the s-box in AES (ri...
Blowfish: hex digits of pi used for s-boxes?
I'm trying to implement modular exponentiation in Java using lagrange and the chinese remainder theorem. For example, if N is 55, having been given the prime factors 5 and 11, phi is 40, so I know there are 40 numbers co-prime to N below 55. My instructor says the way to do it is "using Lagrange’s theorem, a few ...
It is possible to use a hash function to construct a block cipher with a structure similar to DES? Because a hash function is one way and a block cipher must be reversible (to decrypt), how is it possible?
I have a file of my own that i have encrypted using Coder-Abi. Now i can just remember part of this password. So, would it be possible (much easier) for me to crack it knowing only part of it? I can remember around 20 of them. The files are pictures, excel and word files. if there's a software (mainly freeware), ple...
Is it possible to crack a blowfish 256 bits encrypted file?
Is there a way to prove/create (or are there known hash functions) 2 hash functions that never have the same collision? I mean, like provable in way that someone who took 1 cryptography class in university can prove. For example, I want hash functions A and B such that if hash function A collides on X and Y, the...
Berlekamp-Massey can be used if you do not know the feedback polynomial and you do not know the initial fill. If you do know the feedback polynomial but do not know the initial fill, you can use other simpler methods. If you have a "noisy" observation of LFSR outputs and want to reconstruct the LFSR sequence, you...
Berlekamp-Massey can be used if you do not know the feedback polynomial and you do not know the initial fill. If you do know the feedback polynomial but do not know the initial fill, you can use other simpler methods. If you have a "noisy" observation of LFSR outputs and want to reconstruct the LFSR sequence, you...
Is there a way to prove/create (or are there known hash functions) two hash functions that never have the same collision? I mean, like provable in way that someone who took one cryptography class in university can prove. For example, I want hash functions $A$ and $B$ such that if hash function $A$ collides on $X...
Can there be two hash functions without common collisions?
Berlekamp-Massey can be used if you do not know the feedback polynomial and you do not know the initial fill. If you do know the feedback polynomial but do not know the initial fill, you can use other simpler methods. For instance, if you just look at any $n$ consecutive bits of output (where the register is $n$ bi...
Cryptographic key management involves storing and managing encryption decryption keys , certificates , signatures etc . If the requirement is just to store and manage object specific keys ( say amazon's s3 store objects ) do we really require a key management solution like the one from porticor or an appliance ? ...
Cryptographic key management involves storing and managing encryption decryption keys , certificates , signatures etc . If the requirement is just to store and manage object specific keys ( say amazon's s3 store objects ) do we really require a key management solution like the one from porticor or an appliance ? ...
>Instead can't we generate object specific keys "on the fly" using HKDF using a master key and object id as inputs, so that we dont have overhead of storing and managing keys each time? Sure you can. I've got an even easier method. Just use the same key for everything. No key derivation or key management needed. Or ...
*(i'm just trying to find what am I missing...)* Assuming John have a *clear* text message , he can create a regular `hash` ( like md5 , or sha256) and *then* encrypt the *message*. John can now send Paul the message + its (clear text)hash and Paul can know if the message was altered. ( decrypt and then compare ...
Why do we need Hash by key?
How can I use eulers totient and the chinese remainder theorem for modular exponentiation?
How can I break a Vigenère cipher with partial plain text?
Perfect secrecy, in the simplest terms, is data that is completely, entirely patternless. Yet, inside of it there is still your secret. ArtofTheProblem offers [a good simple explanation][1]. [1]: http://www.youtube.com/watch?v=cAt6MYoGqJ4
*( I'm not a cryptographer but a programmer who wants to learn the basic+ )* As far as I know , When I request a certificate from Verisgn(for example ) , and after they approved that me is me , They create a certificate (for me) which contains the digital signature + public key. the digital signature is a d...
Client and certificate verification?
As far as I know, when I request a certificate from Verisign (for example), and after they approved that me is me, they create a certificate (for me) which contains the digital signature and public key. The digital signature is a data which was created (*not* encrypted!) by their `Private key` over my `certifica...
How does a client verify a server certificate?
A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time. A block cipher encrypts one block at a time. The block may be of size one byte or more or less. That means we can also encrypt a block of o...
I m reading book " Network security essenial" written by william stallings. to create a message digest we have to go through some steps. 1) append padding bits.<br/> 2) append length.<br/> 3)Initialize hash buffer...so on<br/> in book for step 3 they have written<br/> **A 512 bit buffer is used to hold inter...
I'm reading the book [Network Security Essentials][1] written by William Stallings. To create a message digest with SHA-256, we have to go through some steps: 1. append padding bits. 2. append length 3. initialize hash buffer 4. ... so on. In the book is written for step 3: > A 512 bit buffer is used to ...
Why are these specific values used to initialise the hash buffer in SHA-512?
I have Montgomery exponentiation working, but it's working quite slow. I suspect there are two reasons for this - I implemented it bit size instead of word size (I didn't realize at the time that software implementation should use word size). The second is how I select R. Given a modulus N with bit length n, I'm ca...
I'm reading the book [Network Security Essentials][1] written by William Stallings. To create a message digest with SHA-256, we have to go through some steps: 1. append padding bits. 2. append length 3. initialize hash buffer 4. ... so on. In the book is written for step 3: > A 512 bit buffer is used to ...
I have Montgomery exponentiation working, but it's working quite slow. I suspect there are two reasons for this - I implemented it bit size instead of word size (I didn't realize at the time that software implementation should use word size). The second is how I select R. Given a modulus N with bit length n, I'm ca...
Question about RSA system?
Question about RSA system, when the public-key $e<10$?
I'm reading the book [Network Security Essentials][1] written by William Stallings. To create a message digest with SHA-512, we have to go through some steps: 1. append padding bits. 2. append length 3. initialize hash buffer 4. ... so on. In the book is written for step 3: > A 512 bit buffer is used to ...
**1. Was I right?** Pretty much. I want to add something to help clarify though: The Verisign public key in his store is of the Verisign CA (It is also stored in the form of a certificate). Also I think this process would qualify at decryption, no? **2. Verisign creates the digital signature over my certificate d...
Hint 1: what's the binomial expansion of $E_e^{RSA}(w+r)$? That is, how can that be expressed as a polynomial in variables $w$ and $r$? What degree are those polynomials, in terms of $w$? Hint 2: suppose we ask for $E_e^{RSA}(w+r)$ for $0 < r < e$ (and we also know $E_e^{RSA}(w)$); what can we do with the correspo...
Quadratic Sieve Bottleneck, Multiple Polynomials an option?
I am new to cryptography, but the topic of Ring Signatures came up and I am having trouble understanding parts of a Ring Signature. I read this paper (warning: PDF!): [RST01.pdf](http://people.csail.mit.edu/rivest/pubs/RST01.pdf) On page 560, it describes steps to implementing a ring signature. I am confused by step...
What exactly is a trap door permutation in a Ring Signature?
Can anyone explain to me what a trapdoor one-way permutation is? Is RSA a trapdoor one-way permutation? ---- Context: I was reading about [ring signatures](http://people.csail.mit.edu/rivest/pubs/RST01.pdf). On page 560, it describes steps to implementing a ring signature. I am confused by step 3, where $g()$ i...
What is a trapdoor permutation?
Let $c=E^{RSA}_{e}(w)$ be the ciphertext belonging to the plaintext $w$ if an $RSA$ system is used. Assume that the public exponent $e$ satisfies $e \le 10$. Furthermore, assume there is an oracle that, on input $r>0$, responds with the value $c_{r}= E^{RSA}_{e} (w + r)$. Can the plaintext be decrypted efficiently, ...
**1. Was I right?** Pretty much. I want to add something to help clarify though: The Verisign public key in his store is of the Verisign CA (It is also stored in the form of a certificate). Also I think this process would qualify at decryption, no? **2. Verisign creates the digital signature over my certificate d...
NIST recommends Krawczyk's HMAC-based key derivation function (HKDF) in [SP-800-56C][1]. HKDF shall e.g. be used to create keys from shared secrets after Diffie Hellman key establishment. NIST states in the same doc that *Each call to the randomness extraction step requires a freshly computed shared secret Z, and t...
Which risks are associated with deriving multiple keys from the same DH secret Z?
Montgomery described [an efficient method][1] to compute a modular mutiplication. However, the square of the so-called Montgomery constant has to be computed first. What are the different ways to do this? [1]: http://en.wikipedia.org/wiki/Montgomery_reduction#Modular_multiplication
I'm guessing they're some kind of standard function but what do they do and what do the names mean? A little explaination or link me to an article would be great.
What does Maj and Ch mean in SHA-256 algorythm?
What does Maj and Ch mean in SHA-256 algorithm?
Given $G:\{0,1\}^s \rightarrow \{0, 1\}^n$ a secure PRG, how can one prove that $G'(k_1, k_2) = G(k_1) \cdot G(k_2)$ is secure ($\cdot$ means concatenation). So if it's true we can show that if there is a distinguisher for $G'$ then this implies that there exists a distinguisher for $G$. So could this distinguisher ...
How to prove that the concatenation of two secure PRG is secure?
Given $G:\{0,1\}^s \rightarrow \{0, 1\}^n$ a secure PRG, how can one prove that $G'(k_1, k_2) = G(k_1) \cdot G(k_2)$ is secure ($\cdot$ means concatenation)? In other words, I'd like to show that if there is a distinguisher for $G'$ then this implies that there exists a distinguisher for $G$. For example, could t...
Since this looks like homework, I'm not going to answer the question directly (and I hope others won't either), but I'll just give some hints: * You're on a good direction. If you want to prove that $G'$ is a secure PRG, then your general approach (trying to show that a distinguisher for $G'$ implies a distinguishe...
Montgomery described [an efficient method][1] to compute a modular multiplication. This works by using a special constant $R$ and assumes the inputs $a$ and $b$ have been made into a special representation (residues $aR\mod N$ and $bR\mod N$) and produces the value $abR^{-1}\mod N$. Thus to pursue the computations, one...
Unkeyed hash functions are, by definition, hash functions computed without a key. [SHA-1][1] is an example. MDCs are a subclass of unkeyed hash functions. How are unkeyed hash functions secure, the message is encrypted with a known, open hash function and *without* a key? [1]: http://en.wikipedia.org/wiki/SHA-1
How unkeyed hash functions (for MDCs) provide security?
Montgomery described [an efficient method][1] to compute a modular multiplication. This works by using a special constant $R$ and assumes the inputs $a$ and $b$ have been made into a special representation (residues $aR\mod N$ and $bR\mod N$) and produces the value $abR^{-1}\mod N$. Thus to pursue the computations, one...
Could somebody explain what is the difference between "word-based" stream ciphers and the regular ones? Those last ones use pseudo-random sequences XOR'd bit by bit with the message, as far as I know. How does that change when it comes to "word-based" ciphers? Examples of word based keystream ciphers include SNOW, P...
Word-based stream ciphers vs "regular" stream ciphers?
Unkeyed hash functions are, by definition, hash functions computed without a key. [SHA-1][1] is an example. MDCs (message digest codes) are a subclass of unkeyed hash functions. How are unkeyed hash functions secure, when the message is encrypted with a known, open hash function and *without* a key? [1]: http:/...
How do unkeyed hash functions (for MDCs) provide security?
Your question is ill-posed; to determine whether they provide "security", we need a specification of what you mean by security. So I'll answer about just one potential use of hash functions: Are you thinking about using hashing together with encryption to try to protect the integrity of the message against tamper...
I wonder if it's safer to encrypt a plain text with RSA twice than it is to encrypt it just once. It should make a big difference if you assume that the two private keys are different, and that the only way used to crack it is brute force. I submitted these theories to my teacher, but he claims that a double encryption...
Is it safer to encrypt twice with RSA?
Well, think about it this way. If breaking one encryption with brute force will take longer than the lifetime of the universe, are you any safer with an encryption scheme that will take twice the lifetime of the universe? No. The first encryption cannot be broken. Adding a second encryption just adds computation overhe...
I strive into understanding why OAEP has two rounds of computations and not just one. I.e: Wouldn't it be safe to hash the random number r and XOR it with the original message?What security risks if any that padding scheme violates?
Why OAEP has 2 rounds with 2 random oracles?
I strive into understanding why [OAEP][1] has two rounds of computations and not just one. I.e: Wouldn't it be safe to hash the random number r and XOR it with the original message?What security risks if any that padding scheme violates? [1]: http://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding
Why does OAEP have 2 rounds with 2 random oracles?
Could somebody explain what is the difference between "word-based" stream ciphers and the regular ones? Those last ones use pseudo-random sequences XOR'd bit by bit with the message, as far as I know. How does that change when it comes to "word-based" ciphers? Examples of word based keystream ciphers include SNOW, P...
there is a paper on [ring signatures](http://people.csail.mit.edu/rivest/pubs/RST01.pdf) and a python implementation of it [here](https://en.wikipedia.org/wiki/Ring_signature). The Step 4 in the paper describes $y_s = v =C_k,_v(y_1, y_2, ... y_r)$ for all $1 \leq i \leq r$ where $i \neq s$. The next step is to find...
Ring Signature - paper/code difference in trying to solve inverse trap door function?
1.) Is the initial AES key (expanded to the key schedule) byte padded if less than e.g. 16 bytes ? 2.) Is there a safe way of determining if decryption was successful (i.e. used the correct key)?
1. Is the initial AES key (expanded to the key schedule) byte padded if less than e.g. 16 bytes? 2. Is there a safe way of determining if decryption was successful (i.e. used the correct key)?
NIST recommends Krawczyk's HMAC-based key derivation function (HKDF) in [SP-800-56C][1] (PDF). HKDF shall e.g. be used to create keys from shared secrets after Diffie Hellman key establishment. NIST states in the same doc: > Each call to the randomness extraction step requires a > freshly computed shared secret...
I wonder if it's safer to encrypt a plain text with RSA twice than it is to encrypt it just once. It should make a big difference if you assume that the two private keys are different, and that the only way used to crack it is brute force. I submitted these theories to my teacher, but he claims that a double encryption...
Well, think about it this way. If breaking one encryption with brute force will take longer than the lifetime of the universe, are you any safer with an encryption scheme that will take twice the lifetime of the universe? No. The first encryption cannot be broken. Adding a second encryption just adds computation overhe...
Well, think about it this way. If breaking one encryption with brute force will take longer than the lifetime of the universe, are you any safer with an encryption scheme that will take twice the lifetime of the universe? No. The first encryption cannot be broken. Adding a second encryption just adds computation overhe...
Well, think about it this way. If breaking one encryption with brute force will take longer than the lifetime of the universe, are you any safer with an encryption scheme that will take twice the lifetime of the universe? No. The first encryption cannot be broken. Adding a second encryption just adds computation overhe...
Implementing AES in C++: 4x4 Array of unint8_t, or 4x1 array of uint32_t?
Consider the following problem: given $g_1 \ldots g_i,h_1 \ldots h_i \in G$, $\forall i$ find $x_i$ such that $g_i^{x_i}=h_i$ For $i=1$ this is the discrete log problem and is assumed to to have some level of security based on the order of $G$ for certain groups. Let's call this security level $\lambda$. Wh...
So let any **secure** MAC (message authentication code) be given. Intuitively, I think it is clear that the probability of getting the same tag on two *different* messages is very small, i.e. negligible. I want to prove this statement mathematically. How can we **(a)** formulate this in an exact manner (beca...
Is this a homework problem? Here's a hint: Suppose that the probability of getting the same tag on two different messages is $p$. Show how to construct an adversary that breaks the MAC (i.e., forges a valid tag), and that has success probability $p$. Assuming the MAC is secure, what can you conclude about the poss...
Let $E$ be a family of Pseudo-Random Permutations of $b$ bits, with $E_K$ indistinguishable from random permutation with effort less than $O(2^b)$, easily computable as well as the inverse permutation, e.g. as instantiated by AES-192 for $b=128$. Let $E_A$ and $E_B$ be two public members of this family. For an $E_K$...
Proof that a function constructed from a PRP is, or is not a PRF?
I need to store several million Payment Card Numbers (PCNs) securely in a mainframe database (that is, 'at rest'). I assume that any attacker will have access to all of the stored data. I assume the availability of a secure device that can: - Store a unique, constant ('master') key that is to be used for all ...
I need to store several million Payment Card Numbers (PCNs) securely in a mainframe database (that is, 'at rest'). I assume that any attacker will have access to all of the stored data. I assume the availability of a secure device that can: - Store a unique, constant ('master') key that is to be used for all ...
Let $E$ be a family of Pseudo-Random Permutations of $b$ bits, with $E_K$ indistinguishable from random permutation with effort less than $O(2^b)$, easily computable as well as the inverse permutation, e.g. as instantiated by AES-192 for $b=128$. Let $E_A$ and $E_B$ be two public members of this family. For an $E_K$...
The digital signature was created using the following algorithm: a sha256 hash of the body of the message is calculated. It is then signed using an RSA private key and the result is base64 encoded. now, I have the RSA public key corresponding to that private key which was used to encrypt the hash. Now, I want to ...
While I'll try to answer your question at a theoretical level below, I'd like to first stress the following: It's a bad sign if, in the course of writing software, one is making such low-level decisions about encryption methods. Encryption security is <b>extremely</b> brittle, with seemingly insignificant details cau...
If the private exponent $d$ has very low Hamming weight, it will be easy to break the scheme. Suppose that $d$ has weight $w$, and is $m$ bits wide. @Antimony already explained how to break it in $m \choose w$ time. I'll show how to break it even faster; my algorithm takes a bit more than $m/2 \choose w/2$ time, u...
If the private exponent $d$ has very low Hamming weight, it will be easy to break the scheme. Suppose that $d$ has weight $w$, and is $m$ bits wide. @Antimony already explained how to break it in $m \choose w$ time. I'll show how to break it even faster, using a birthday-style technique. My algorithm takes about ...
If the private exponent $d$ has very low Hamming weight, it will be easy to break the scheme. Suppose that $d$ has weight $w$, and is $m$ bits wide. @Antimony already explained how to break it in $m \choose w$ time. I'll show how to break it even faster, using a birthday-style technique. My algorithm takes about ...
Here are two different ways to break $G$. **Attack 1.** $G$ is unlikely to be a secure PRF, at least against non-uniform adversaries. In particular: there is likely to exist a fast attack (though it might take $2^b$ steps of computation to *find* the attack). The idea of the attack: With high probability, there ...
Is this how padding can work?
Like the FIPS 186-3 stuffs? I want to know is there any standards to show how to generate the primes for multi-prime RSA.
Is there any standards of multi-prime RSA?
Just as the title says. I see that the various common AE schemes provide integrity and confidentiality, as well as authentication that one of several trusted parties created the ciphertext (because the schemes all rely on a shared key). However, it would be particularly useful to have a AE-like scheme which used an ...