58 views

### What are the general rules to follow if I want to design a block cipher suitable for file encryption? [duplicate]

Can you please tell me what should be the quality of an encryption function using a key size of 256 bits... I realized from my previous question that a simple XOR of plaintext (256 bits) with a ...
• 1,060
12k views

### Reason why “XOR” is a linear operation, but ordinary “addition” isn’t?

I'm new in cryptography and try to read some articles in this field. Many of these articles talk about non-linear S-boxes, and nothing more on what they mean by their non-linearity. I have a simple ...
• 495
11k views

### Why do block ciphers need a non-linear component (like an S-box)?

Why is there a requirement of "Non-Linear functions" as a component of many popular block ciphers (e.g. the S-box in DES or 3DES)? How does it make the cipher more secure? The only intuition I have ...
• 443
31k views

### Can you explain “weak keys” for DES?

A weak key for DES is a key $K$ such that $DES_{k_1}(DES_{k_2}(x))=x$ for all $x$. I don't get why are the 4 keys $k_1||k_2$: $1^{112}$, $0^{112}$, $0^{56}||1^{56}$, $1^{56}||0^{56}$ considered as ...
• 2,150
8k views

### Why are bitwise rotations used in cryptography?

Any understanding I have of cryptography stops right around the cipher level. As such, I'm just curious as to why bit shifts and moreover circular bit shift are so prevalent in cryptography.
• 263
8k views

### What does Maj and Ch mean in SHA-256 algorithm?

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.
• 151
3k views

### What are the requirements of a key schedule?

In the first block cipher I designed I used a CSPRNG to generate the round keys. The purpose was to at least have a chance of creating a (hopefully!) secure cipher on the first try (but please don't ...
• 4,813
6k views

### AES timing attacks

I'm just interested in cryptography, so please don't expect me to be an expert. ;) I recently read about AES cache timing attacks and found it very interesting. I read the article Cache-timing attacks ...
• 257
2k views

### What are the qualities of a good block cipher? Beginner, Intermediate, Advanced, Expert [closed]

Notice: I'm doing this to learn. I know not to use a homemade cipher for anything that requires security. I also have heard before I'm not supposed to be trying this, but I learn best through trying ...
• 215
3k views

I was looking at the algorithm for Twofish, and I noticed that in some places a XOR is used, but in others, they use "addition modulo-32." What makes modulo-32 special? Why not always use XOR? Why not ...
• 145
2k views

### How does ROTL work?

what does ROTL stand for? I know it does left shifting but what about the acronym? When we do a left shift, do we take the leftmost bit and add it at the end, by making the second bit the first, and ...
• 333
711 views

### Why does DES implement so much Cross Wiring?

I've been going through DES, and I find that most of the blocks simply Reshuffle the input, which may be termed as "Cross Wiring". This include IP, IP-1, PC-1, PC-2 and even Expansion (although this ...
• 123
873 views

### Do data-dependent rotations have any advantage over fixed rotations?

There are many ARX ciphers, however most use fixed rotations. I know data-dependent compared to fixed rotations are: patented (expired) harder to implement constant time more expensive in hardware ...
• 1,682
567 views

### What is the difference between strong/weak alignment?

In this answer there is the mention of "weak alignment", followed by an indication that it is related to "resistance to truncated differential cryptanalysis". What exactly is the difference between ...
• 19.8k