Questions tagged [blocksize]

A block is a sequence of bytes or bits, having a fixed length (the block-size).

Filter by
Sorted by
Tagged with
22 votes
1 answer
25k views

What is the maximum size of the plaintext message for RSA OAEP?

OAEP is an important technique used to strengthen RSA. However, using OAEP (or any technique that adds randomness) reduces the size of plaintexts that can be encrypted. Assume for instance that OAEP ...
user avatar
18 votes
2 answers
3k views

AES - What is the advantage of a 256-bit key with a 128-bit block cipher? [duplicate]

I'm just trying to wrap my mind around the decision to select the 128-bit Rijndael as the AES cipher, even with 192-bit and 256-bit keys. Even with a 256-bit key, you only get 2^128 possible outputs ...
Scott Arciszewski's user avatar
14 votes
2 answers
1k views

What are the risks of using CTR mode with 64 bit blocks?

On DJB's blog he writes: I was one of about 40 people sitting in a meeting where the speaker, NSA's Louis Wingers (one of the Simon and Speck authors), falsely claimed that counter mode is safe for ...
Future Security's user avatar
13 votes
2 answers
4k views

Is a small size block cipher usable?

Consider a block cipher with a key of size 128 bits but a small block size, say 32 bits. Is this kind of block cipher secure? I would like to know to what extent I can use a small block cipher, like ...
Dingo13's user avatar
  • 2,867
9 votes
4 answers
31k views

What is the typical block size in RSA?

If the input text is divided into a fixed block size for encryption and decryption, what could be the typical block size for RSA algorithm for different size of input like 8 MB, 16 MB, 126 MB and 256 ...
tummalasr's user avatar
9 votes
1 answer
1k views

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 ...
Michael's user avatar
  • 93
8 votes
1 answer
1k views

Why is it OK for secretbox to leak the message length?

Most block cipher implementations expect users to pad so that the message matches the cipher block size. I understand the purpose of the padding is to make the input match the cipher block size. It ...
casual eddy's user avatar
8 votes
1 answer
3k views

Importance of block size in CBC mode

Why is it necessary to use a sufficiently long block size when implementing a CBC block cipher with a truly random initialization vector? In ECB mode it's easy to get information about the message if ...
buildist's user avatar
8 votes
2 answers
5k views

SHA-3 block sizes / bitrate calculation?

Looking into different papers and online documents, I find the following block sizes for SHA-3: SHA3-224: 1152 Bit SHA3-256: 1088 Bit SHA3-384: 832 Bit SHA3-512: 576 Bit Somehow I am unable to find (...
Dennis's user avatar
  • 183
8 votes
1 answer
170 views

Is the risk of a collision for OCB mode mitigated by upping the block size of the cipher?

A paper published by Niels Furguson Collision attacks on OCB indicates that processing large amounts of data (somewhere on the order of $2^{32}$ 128-bit blocks) with a single encryption operation (...
K3rb3ros's user avatar
  • 143
7 votes
1 answer
8k views

How can there be AES-256-GCM, when GCM is defined for 128-sized blocks?

In both node.js and OpenSSL, I am seeing cipher "aes-256-gcm". However, in NIST Special Publication 800-38D, that defines GCM, I am reading: The underlying block cipher shall be approved, the ...
Karel Bílek's user avatar
7 votes
2 answers
593 views

Turning a 64 bit block cipher into a 128 bit block cipher

There are quite a few block cipher modes of operation that require 128 bits. There are also modes of operation where a higher block size than 128, e.g. a block size of 256 bit would even be practical. ...
Maarten Bodewes's user avatar
  • 92.6k
7 votes
1 answer
965 views

How to securely encrypt/decrypt data with a maximum chunk size?

I am aware of the different modes so that a "raw" block cipher such as AES (ECB) can be used to encrypt more than a single block of data (CBC, OFB, CTR, etc) and modes such as AES-GCM which ...
user239146146's user avatar
6 votes
1 answer
1k views

What is a wide block cipher and why does it avoid birthday bound problems?

I've recently heard the claim that wide block ciphers avoid birthday bound problems. Trying to figure out what exactly "wide block encryption" is, a quick search turned up this paper which is trying ...
Elias's user avatar
  • 4,913
6 votes
1 answer
648 views

Does Grover's algorithm effect block size or only key size?

We know that Grover's algorithm can speed up cracking symmetric keys. Basically the keyspace is halved. This means we have to use at least a 256-bit key (to get 128-bit security). I heard somewhere ...
mary's user avatar
  • 1,031
5 votes
2 answers
9k views

Encryption of 8 bit block of data

I'm looking for a cryptographic algorithm that allows encrypting only 8 bits of data in a block. Is there any such algorithm that is considered secure? The reason I'm asking is because I have to ...
haster8558's user avatar
5 votes
1 answer
515 views

GCM: Math behind update of AAD after ciphertext has been processed

In the Bouncy Castle libraries, the GCM cipher implementation has an interesting property that does not seem described in the GCM papers (neither the NIST or the original paper): Some AAD was sent ...
Maarten Bodewes's user avatar
  • 92.6k
5 votes
1 answer
1k views

Is it possible to generate a secure permutation F over 32-bit integers even if F(0) ... F(n) is public knowledge?

I'm currently interested in the problem of generating random-looking URLs from sequential database IDs, like how they do it in link shorteners. One way to do this is to encrypt the sequential database ...
hugomg's user avatar
  • 153
5 votes
0 answers
109 views

Effect of block size on diffusion rate

I've always been under the belief that larger block sizes require more rounds to achieve full diffusion. Rijndael, SPECK, and SIMON, for example, have a round multiplier based on the block size. The ...
forest's user avatar
  • 15.3k
4 votes
2 answers
3k views

Secure use-cases of block cipher with 64-bit block size

In what cases can we use a weak block cipher like DES ? More precisely, Are there specific situation in which a weaken block cipher can still be used, for instance for certain types of plaintext ?
Dingo13's user avatar
  • 2,867
4 votes
2 answers
4k views

How does blocksize affect security?

I have recently read about how blockciphers and how stream ciphers work, and although I think I finally got everything right, I'm still wondering how increasing blocksize increases security.
blacklight's user avatar
4 votes
1 answer
156 views

What would be the maximum acceptable block size for disk enryption?

AES-256 in XTS mode has 32x16 (512) bytes of blocksize but there are some other wide-block modes of operation such as WCFB which accepts any block size. My question is: What is the maximum acceptable ...
phantomcraft's user avatar
4 votes
1 answer
895 views

Why are block ciphers mostly used as stream ciphers?

Using a block cipher with using either CTR or GCM mode gives us a stream cipher, the only difference being that CTR does not include a MAC tag or AAD but GCM does. I think these are the most commonly ...
Gamer2015's user avatar
  • 236
4 votes
2 answers
2k views

Encryption in which ciphertext is bigger than plaintext?

Is there an encryption which would produce a ciphertext longer than the plaintext? (please ignore block-chaining IV stuff, which would result in a data being generated from the plaintext). The point ...
humanityANDpeace's user avatar
4 votes
2 answers
2k views

Why blake2b is the fastest despite it being 512 bits hashing algorithm?

I am struggling to understand why blake2b is faster than blake2s, despite that blake2b is 512 bits hashing. I hope someone can clarify that for me. I read the official paper for blake2b, but I am not ...
Hinton Zsh's user avatar
4 votes
1 answer
9k views

Message lengths with AES CTR mode?

Im working on my own AES implementation as a personal educational exercise (not for production use), and a book im using as a resource states: In the case of CTR, we are merely XORing the output ...
Finding Nemo 2 is happening.'s user avatar
4 votes
0 answers
420 views

XTS and 256-bit data blocks

I am developer of an application that uses XTS with ciphers which use 128-bit blocks (AES, Serpent and Twofish). I now want to use XTS with a cipher which uses 256-bit blocks (Shacal-2). AFAIK, I ...
v77's user avatar
  • 141
3 votes
2 answers
978 views

What's the proper choice for the block size of a sponge-based hash?

While having a discussion about the future of Keccak in our library, we came to the discussion of how to properly assign a "block size" to Keccak (or more generally any sponge-based hash if possible), ...
SEJPM's user avatar
  • 46k
3 votes
1 answer
254 views

Does the block size of a symmetric cipher impact the security of the cipher itself? [duplicate]

Will a 128 bit block have some security implication in post-quantum cryptography?
Tom's user avatar
  • 49
3 votes
2 answers
1k views

Block size vs key size confusion

I understand that if a block cipher has $k$-bit keys and $n$-bit input/output blocks, then if $k>n$, we can expect one message-ciphertext pair to narrow us down (I think?) to $2^{k-n}$ possible ...
shin's user avatar
  • 31
3 votes
1 answer
5k views

How can AES be considered secure when encrypting large files?

Why is AES considered to be secure when encrypting large files since the algorithm is a block cipher? I mean, if the file is larger than the block size, the file will be broken down to fit the blocks....
Rox's user avatar
  • 165
3 votes
1 answer
864 views

How does Feistel cipher create diffusion between blocks?

From what I've read about Feistel ciphers, I can understand that within each block, there is both confusion and diffusion. But it is unclear to me how a Feistel cipher permutates among blocks of data. ...
Charly's user avatar
  • 33
3 votes
2 answers
2k views

AES block cipher modes of operation

have a project in which I have to implement an en/de-cryption structure using a standard AES block of 128-bits in VHDL and I think I'm a bit confused. So I'd like to ask some questions about AES and ...
George Karajohn's user avatar
3 votes
2 answers
120 views

How to handle padding when encrypting a value smaller than the block size

I want to encrypt numeric identifiers into ciphertexts that are deterministic and not too long. I am considering AES-128 in ECB mode to encrypt 64-bit integers. How should I pad the 64-bit integers, ...
Sjoerd's user avatar
  • 661
3 votes
1 answer
336 views

Why is GCM only usable for ciphers with a 128-bit block size?

All block cipher modes of operation that I understand are generic schemes. They are not restricted by key size or block size. So why is GCM restricted to 128-bit block size?
Melab's user avatar
  • 3,655
3 votes
1 answer
4k views

Why does HMAC need a fixed length padding?

As everybody knows in order to calculate HMAC we have to concatenate padding to the message. I am just curious why the padding needs to be fixed-length. Why do we need the blocksize parameter here? ...
Curious Sam's user avatar
3 votes
1 answer
160 views

Why is the security of block cipher not a function of key and tweak?

The proofs and security of block ciphers constructed especially of Luby Rackoff Constructions and Feistel Networks is based on the number of queries and round functions. The security measure is always ...
sashank's user avatar
  • 6,184
3 votes
0 answers
56 views

All-or-nothing transform that doesn't increase message size?

All of the AON transforms I've read about involve generating a key, which increases the message by a few bytes. Is there an AON transform that preserves the message size while still having avalanche ...
Daffy's user avatar
  • 2,389
3 votes
0 answers
193 views

Implement Twofish cipher with 16-bit blocksize?

I've seen implementation of Rijndael cipher with 16-bit blocksize. And I have also tried to implement 16-bit Rijndael cipher by myself with only a little sneak peeking at the example of the ...
BufferOverflow's user avatar
2 votes
1 answer
635 views

How many required known plaintexts for an attack are considered insecure?

I stumbled over this problem when looking at symmetrical block ciphers with a relatively small block size like 32 bit. When I was looking at more common block ciphers with a 64 bit, I learned that ...
heroxav's user avatar
  • 123
2 votes
2 answers
529 views

Is it possible to determine the symmetric encryption method used by output size?

I'm attempting to identify the method of encryption for a black-box symmetric encryptor that produces blocks of output that are 4 bytes in length (e.g. small inputs fit in 16 bytes, then 20 bytes and ...
jSherz's user avatar
  • 123
2 votes
1 answer
385 views

What would be the disadvantages of very large block sizes in block ciphers?

Let's suppose someone creates a block cipher with 8192-bytes of the block size (65536-bits) or maybe 16384-bytes of the block size (131072-bits). What would be its disadvantages over a block cipher ...
phantomcraft's user avatar
2 votes
1 answer
2k views

The key size of an ideal block cipher

My understanding of an ideal block cipher is as follows: For a block cipher with block size $n$, there are $2^n$ possible plaintexts. The number of possible keys (mappings) would then be $2^n!$. ...
Bastien's user avatar
  • 511
2 votes
1 answer
666 views

Crypto algorithm identification (reverse engineering)

I'm trying to identify a certain cryptographic algorithm used in a program. From examining the executable, it appears it Has 16 rounds (plus 2 "rounds" for pre/post processing) Pads the input ...
s n's user avatar
  • 23
2 votes
1 answer
588 views

Is this an acceptable way to increase the block size of a block cipher?

Note: This is all for fun and learning. None of this will go into production code. I'm studying something (sponge functions, specifically) that benefit from large block sizes. AES has a (...
Daffy's user avatar
  • 2,389
2 votes
1 answer
460 views

Subkey generation in OMAC1/CMAC with XTEA?

All implementations of CMAC that I have found so far use a block cipher with the same key and block size. However, XTEA enciphers a 64 bit block by using a 128 bit key. If ...
limond's user avatar
  • 23
2 votes
1 answer
280 views

Calculate the security of a cascade cipher

I’m reading “The Security of Multiple Encryption in the Ideal Cipher Model” and I’m having a hard time understanding something. How do I calculate the bounds of cascade cipher from the following ...
Giliweed's user avatar
  • 597
2 votes
1 answer
600 views

What is the practical relevance of the wordsize when using a Hash?

I understand that the word size is the internal "working package size" below the block size of a cryptographic hash function (and a block cipher), as each block is broken into words an than processed ...
Marste's user avatar
  • 187
2 votes
1 answer
692 views

Bandwidth and block size for Paillier cryptosystem

Can someone clarify what is meant by the terms cryptosystem bandwidth and block size for public key cryptosystems; The context is the Paillier cryptosystem and its Damgård-Jurik generalisation. My ...
Panagiotis Grontas's user avatar
2 votes
1 answer
2k views

How is key length of feistel cipher calculated?

In Feitsel Algorithim If our block size is n, then our key length would be n x 2^n . But this does not make sense for me. For example: Let's assume that we have 4 bit block size. If our block size ...
eneski's user avatar
  • 123