A block cipher is an encryption algorithm which encrypts fixed-size blocks of plaintext to same-sized blocks of ciphertext. For good ciphers every bit of the ciphertext block depends on every bit of the plaintext block and every bit of the key.
6
votes
2answers
317 views
Are Stream Ciphers Less Secure?
This is by no means a scientific observation, but it seems to me that stream ciphers receive a lot less attention than block ciphers. Is there any reason for this? (Is it because block ciphers are ...
1
vote
2answers
247 views
Difference in one time key and one time pad and many time key
These terms are confusing me. One time pad is when you use one key for one message. That is what One time key is.
Secondly, what is the connection of many time key, can i use one time pad many ...
1
vote
3answers
201 views
Does the MixColumns step come before or after AddRoundKey in AES decryption?
I found these images depicting the AES decryption process:
In the first image, the MixColumns step comes before the AddRoundKey step, while in the second image, the AddRoundKey will come before ...
0
votes
1answer
98 views
How do I calculate the maximum plain text length allowable for a certain cipher text length?
I am encrypting and storing sensitive values in the database. I have a set max length in the database, but in order to provide useful user feedback, I'd like to know the max input I should allow for a ...
3
votes
4answers
279 views
Which block cipher modes of operation allow a predictable IV?
Recently I found out that in the modes CBC and PCBC the IV may be passed in cleartext but never must be predictable. However for this part of my app I rather have the IV be predictable and unique ...
1
vote
4answers
400 views
Is my pseudo-random initialization vector secure?
How can I know if I am generating a secure pseudorandom initialization vector?
Currently I am planning to generate a pseudo-random initialization Vector using current date and time - is this secure ...
1
vote
1answer
117 views
Why does .NET's ECB mode implementation append a constant block to my ciphertext?
Consider the following code and output:
...
3
votes
1answer
120 views
Encrypt array of int for individual retrieval
I have limited exposure to cryptographic terminology, so please bear with me.
My end goal is to encrypt integer IDs, before transmitting them to a web client in a list of search results, in a way ...
2
votes
2answers
246 views
Can I build a secure tweakable block cipher from a normal one by adding key and tweak?
Let (E,D) be a secure block cipher.
Consider the following tweakable block cipher:
...
4
votes
0answers
87 views
Pseudo preimage for a hash made from a cipher
Consider the Miyaguchi–Preneel construction:
$H_0 = E(0,m_0) \oplus m_0$ (0 here means a vector filled with zeros)
$H_1 = E(H_0,m_1) \oplus H_0 \oplus m_1$
where $E(K,M)$ is a block cipher (for ...
6
votes
3answers
203 views
Why is a MAC needed?
I agree that for certain encryption systems or modes of operation, a MAC is indispensible.
The best example are probably stream ciphers (and therefore also block ciphers in OFB or CTR mode) that ...
10
votes
3answers
712 views
Can you create a strong blockcipher with small blocksize, given a strong blockcipher of conventional blocksize?
Suppose I want a strong 20-bit blockcipher. In other words, I want a function that takes a key (suppose the key is 128 bits), and implements a permutation from 20 bits to 20 bits. The set of ...
4
votes
1answer
495 views
Padding methods for block ciphers - PKCS7 vs ANSI X.923
I was looking through block cipher padding methods, and found two good candidates:
ANSI X.923 - pad with zeros, then a final byte for the padding length, e.g. ...
4
votes
3answers
279 views
Order of cascaded ciphers
Does the order of a block cipher cascade (e.g. in TrueCrypt) make a difference to the security provided, assuming independant keys?
For example:
...
4
votes
3answers
768 views
Are there any simple and yet secure encryption algorithms?
Being very new to C++ and cryptography, I finally managed to implement a version of the Vinegere algorithm. I would like to try something a bit more complicated. I have looked at AES and DES and ...
2
votes
2answers
105 views
Byte location of plaintext vs ciphertext when using a block cipher or stream cipher
I know that when you use a stream cipher you are just XOR'ing the plain text with the PRNG stream, such that you know if a specific byte is in position 3 of the plain text it will still be in ...
3
votes
2answers
228 views
Is ECB mode secure if plaintexts guaranteed to be unique?
I've got a scenario where I need to encrypt many small (16-byte) plaintexts. I want to use AES-128 in ECB mode. Notably, each plaintext is guaranteed to be unique, though each may differ by only a few ...
24
votes
3answers
3k views
What are the benefits of the two permutation tables in DES?
Why do we use a permutation table in the first step of DES algorithm and one at the end of algorithm?
4
votes
3answers
394 views
CBC - a canonical mode, even though there are streaming modes
Why is CBC considered the canonical mode when there are streaming modes available such as CFB and OFB? One thing that I can think of is that in CBC you can easliy do range-based decryption. All you ...
1
vote
1answer
456 views
How can 3DES encryption use decryption in the middle step?
I have been reading about the 3DES algorithm and I cannot understand one part. In 3DES we do following operation: $$C=E[K_3,D[K_2,E[K_1,P]]].$$
Where $C$ is ciphertext, $P$ is plaintext, $E$ is DES ...
0
votes
1answer
196 views
File Encryption/Decryption in ECB mode [duplicate]
Possible Duplicate:
Removing Padded Value in Decrypted Message
I tried to encrypt and decrypt a file in ECB mode using AES Algorithm but I encountered one problem during decryption, I don't ...
0
votes
1answer
397 views
Removing Padded Value in Decrypted Message
How to remove padded value in Decrypted Message?
I am using AES Algorithm..
ex:
this is the decrypted message..
"abcdefghijklmn "
there is a 2 space in that decrypted message which is equivalent ...
1
vote
2answers
84 views
How can I protect against the failure of a block or symmetric cipher?
Can I protect against the failure of a block or symmetric cipher by chaining different techniques together? If so what implementation details should I be aware of?
Are some combination of ciphers ...
2
votes
1answer
733 views
In which order are the round keys used during AES decryption?
In the Add Round Key step in AES decryption, which part of the expanded key will I XOR first to the result of the SubBytes step?
Is it the 10th round key?
For example, is this the right order?
...
2
votes
1answer
303 views
How were the AES key and block length subsets of Rijndael selected?
My intuition tells me it's a trade off between speed and security, but how did the standardisation process select these three seemingly arbitrary key lengths (namely, AES-128, AES-192, AES-256).
4
votes
3answers
428 views
Encryption with “constant” initialization vector considered harmful
I try to get the full reasoning behind the above statement. First, after reading articles here and at wikipedia i understand that using an IV only once is good practice.
For stream ciphers not doing ...
3
votes
3answers
820 views
How does the key schedule of Rijndael looks for keysizes other than 128 bit?
It said in Wikipedia that:
[....] Rijndael can be specified with block and key sizes in any multiple of 32 bits, with a minimum of 128 bits. The blocksize has a maximum of 256 bits, but the ...
7
votes
2answers
417 views
Does AES have any fixed-points?
Is there any pair of 128-bit strings M and K such that AES$_K$(M) = M?
If yes, how do I go about (efficiently) finding such a pair?
-3
votes
1answer
196 views
7
votes
3answers
758 views
Is it okay to use a hash of a timestamp as the IV for AES?
The message format includes a datetime field in the clear. Is it okay to also use this field (or some hash thereof) as the initialization vector?
In this case, CBC is the mode being used.
5
votes
1answer
289 views
XSL on serpent and rijndael - which is most affected?
So I've often looked at serpent and thought it was a very strong contender in AES. Not so long ago I was looking for evidence as to why it didn't beat rijndael. So far, the closest I've got answering ...
5
votes
2answers
651 views
How to calculate an IV when I have a shared private key?
I'm working with a server/client system that has securely negotiated a private key. I need to encrypt/decrypt messages passing in both directions which are typically between 100 bytes to 100 KB. I'm ...
2
votes
1answer
92 views
McEliece for streaming data
Under the assumption that there exists a real-world implementation of the McEliece scheme, could it be applied to streaming data as is? By that I mean in 'block cipher mode'? I've read that McEliece ...
2
votes
3answers
1k views
Which one of the Block Cipher modes is the best?
I have two questions regarding the Block Cipher Modes:
First: Which one of the modes is considered the best?
I know CBC has a problem of IV since the next block of the plain text is XORed with the ...
5
votes
2answers
2k views
Rijndael vs. Serpent vs. Twofish: General comparison
Can anyone explain (or give a link to document about) why Rijndaal won the AES, especially comparing it to other finalists (Serpent and Twofish)? What criteria were used to make decision?
Or is there ...
0
votes
0answers
109 views
What will be the way to go about deciphering this kind of cipher? [closed]
I've come across this cipher and have tried unsuccesfully to decipher it.
http://codepad.org/aea7Wuyl
The only 'hint' that I have gotten so far as to how I am supposed to crack it is the word ...
13
votes
2answers
2k views
Why does nobody use (or break) the Camellia Cipher?
If Camellia is of equivalent security and speed to AES, concerns arise.
First of all, assuming the above, why is Camellia so rarely used in practice?
Why aren't there any breaks in Camellia? Does ...
3
votes
3answers
595 views
A simple block cipher based on the SHA-256 hash function
I've come up with this little routine for doing encryption using the SHA-2 (in this case SHA-256) hash function. As such it is a block cipher with a 256 bit (32 byte) block size and an arbitrary key ...
4
votes
1answer
484 views
Known Plaintext attack against XTEA?
I'm looking for information on known-plaintext attacks against XTEA. I'm most interested in the worst case scenario: if an attacker has all 8 bytes of input and all 8 bytes of output, how much ...
3
votes
1answer
171 views
OCB - brute force against unknown IV
I read that brute force attacks against a plaintext encrypted in OCB with unkown key and IV has approximately the same complexity as an attack where only the key is unknown.
Why is that ?
Is there a ...
2
votes
1answer
148 views
Does an attacker gain an advantage if they have the initialisation vector?
Does an attacker gain any advantage by knowing which initialisation vector was used for encryption?
2
votes
2answers
201 views
Does this block cipher mode allow for decryption?
Is there's a way for someone (with the key) to decrypt a message encrypted with the cipher mode shown?
$$ P_0 = IV $$
$$ C_i = P_{i-1} \oplus E_K(P_i) \oplus P_i $$
10
votes
1answer
2k views
How to choose a padding mode with AES
Depending on the framework you are using, there are various padding modes that can be used with AES encryption. For example, with .NET we can choose PKCS7, ISO10126, ANSIX923, Zeros or None.
I ...
4
votes
2answers
209 views
Is it safe to store initial counter value for AES-CTR alongside with ciphertext?
The initial counter value can actually be thought of as a sort of IV, which I assume is safe to transmit with the ciphertext, but I really want to be sure that this is indeed safe.
6
votes
1answer
580 views
AES and perfect ciphers
I'm taking a crypto class this semester and after learning the definition of a perfect cipher. I started wondering how this definition applies to AES.
Obviously AES isn't a perfect cipher, since the ...
9
votes
3answers
400 views
Are these emerging threats against AES affecting your designs?
Recentally, an attack on AES was discovered which reduces its computationally complexity, by a very slight amount.
The first key recovery attack on the full AES-128 with computational
complexity ...
5
votes
1answer
1k views
Avalanche effect in DES
I couldn't understand the avalanche effect in DES. Could someone explain how avalanche effect happens in DES
5
votes
1answer
117 views
Is there any general description language for block ciphers
In page 9 (16 in the PDF) of Final report of European project IST-1999-12324(NESSIE) it is mentioned that:
The NESSIE project is also developing a new generic tool to analyze block
ciphers with ...
4
votes
3answers
1k views
Is Blowfish strong enough for VPN encryption?
I'm looking at an OpenVPN connection between two sites configured to use 128 bit Blowfish in CBC mode, and trying to figure out how to assess the strength, but I just don't know enough of the maths.
...
3
votes
2answers
534 views
Encrypted text length in AES
I have created an application that will be able to read any file and encrypt it using AES Encryption. For efficiency, I am reading a block of data, encrypting it and so on. So for decrypting, I just ...