# Tagged Questions

XOR, often written ⊕, is one of the basic operations on bits and bit-sequences. It is a building block of many cryptographic primitives (and some higher-level algorithms, like modes of operations).

1answer
367 views

### Calculating XOR Key Sizes

I've been playing around with the Matasano crypto challenges (cryptopals.com). I had a couple false-starts on the challenge that has you creating a program to calculate the key size of a XOR encrypted ...
2answers
294 views

### Reusing message in One Time Pad

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 ...
0answers
62 views

### Help with a ctf im stuch on, base64 encryption [closed]

So my friend and I were trying to do this ctf challenge here labyrenth .com and when we were trying to solve the first part of the "Threat" challenges we stumbled upon a challenge we have no idea how ...
4answers
4k views

### Why is a known-plaintext attack considered a complete break?

I read somewhere that if a cipher has a known-plaintext attack, then it is considered completely broken. Say there is a cipher that someone uses where the algorithm is understood and a known-...
2answers
59 views

### In what sense addition modulo $n$ ($n>2$) isn't linear in the field $\mathbb{F}_2$?

I've been reading the Reason why “XOR” is a linear operation, but ordinary “addition” isn’t? question, in which one of the answers states that addition modulo $n$ ($n>2$) is linear in $\mathbb{Z}_n$...
2answers
2k 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 ...
1answer
84 views

### Exploiting XOR one-time-pads with alphabet size that isn't a power of 2

I realized that if the key is chosen randomly from a range that isn't a power of $2$, the one-time-pad leaks information about the plaintext. For example, if the alphabet was the first 20 naturals, ...
1answer
28 views

1answer
70 views

### Memory hardness of key derivation function through XOR-ring multiple matrix values

For theoretical purposes in order to enhance my own understanding, and NOT in order to create my own cryptography, I am asking a question about the memory-hardness of a key derivation function ...
0answers
33 views

### References for combining LFSRs with different lengths and taps? [closed]

I started learning streams ciphers with the use of LFSRs. Therefore, I tried to simulate what I am learning in a C sourcecode, which combines three registers and ...
1answer
134 views

### Fast reduction in $GF(2^{128})$ using x86 PCLMULQDQ

Modern x86 CPUs support the PCLMULQDQ instruction, which does an XOR-multiply of two 64-bit numbers instead of an add-multiply (i.e. typical arithmetic ...
0answers
57 views

### Binary equation with encryption

I'm trying to test the ring signature scheme proposed by Rivest Shamir and Tauman in the famous paper "How to leak a secret". One of the step consist in 4) the signer solves the following ring ...
0answers
22 views

### Prove that complement of plaintext and the key, then ciphertext will be the complement of orig. ciphertext [duplicate]

I'm trying to prove in general terms the following: y = DESk(x) then.. y' = DESk'(x') I can plug in random variables for k,...
0answers
214 views

### Is there specific name for simple XOR with ADD/SUB encoding?

Several years ago a group of malware authors began using code like this: for (j = 0; j < length; j++) ptr[j] = (ptr[j] ^ VALUEA) - VALUEB; for encoding, and ...
1answer
294 views

### Is RC4 +XOR secure for small data?

I need to encrypt transmission between my device (with AVR processor) and base. I create packet data - it will be encrypted into string: ...
2answers
215 views

### Is simple XOR with secret key using DHE secure?

Client and server have given generator 3 and modulus which is 256 bit prime same all the time for all clients and server (simply hardcoded). They both generate a private exponent and send result to ...
1answer
78 views

### Plain cascade and Xor cascade

I have seen in few places (mostly papers) talking about plain cascade and XOR cascade. I know what is cascade cipher is but I am not clear about what these are. Can anyone help to understand using ...
3answers
660 views

### Combining several symmetric ciphers using XOR

I have seen a talk by Rüdiger Weis, where he says that you can combine two symmetric ciphers using XOR. According to him, that has the effect that its sufficient if only one of the ciphers is secure. ...
1answer
245 views

### Any reason to use Shamir given faster XOR threshold secret sharing algos?

TL;DR: Is the Kurihara algorithm really what it purports to be (dramatically faster but equally secure replacement for Shamir Secret Sharing)? https://scholar.google.com/scholar?q=kurihara+secret+...
1answer
298 views

### Hash functions to generate one time pad

Newbie question... may be... Stream cypher, will XOR message bits with one time pad bits Suppose I have a pseudo random number generator, like a Mersenne twister or sort of. I could use the speudo-...
1answer
158 views

### Reversing Rotation + XOR

I have this cypher which is as follows : Take 2 numbers : A=1011 and B=1010 if the ith bit of A is 1 then shift B i times to the left. So in the end you will get ...
1answer
758 views

### Isn't a simple Vernam cipher as secure as known symmetric key algorithms?

I have just read little about the Vernam cipher and the problems of implementing it. But, in practice, would not the key, if generated by a commonly used programming language's ...
2answers
196 views

### power consumption in a XOR

I'm trying to understand how a XOR affect traces of power consumption in a Differential Power Analysis on smartcards. What's the difference in energy radiated in a $1 \oplus 1$ and in a $0 \oplus 1$? ...
4answers
183 views

### One time pad in CBC mode?

I have been searching about if it is more secure to use CBC mode in OTP but I can't find anywhere where people have sad that it is more secure. Question: Is CBC mode in OTP more secure? Because I ...
1answer
55 views

### Can you identify this algorithm? [closed]

We are attempting to integrate our application in to a third party system. To do this we need to pass encrypted passwords in to this system. I have decompiled the assembly and looking at the code it ...
2answers
3k views

### ASCII to same-length ASCII encryption?

I need to encrypt an ASCII string [a-zA-Z0-9:] to an ASCII [a-zA-Z0-9] string of the same length. It doesn't have to be unbreakable, it's sufficient that it won't be readable at the first sight. The ...
1answer
142 views

### XOR = Best encryption? [duplicate]

If you have a TRULY random key (in binary) and you have a text (in binary) that you want to encrypt. Can you simple XOR the key and the text? Is that secure? How secure?