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).

learn more… | top users | synonyms

0
votes
2answers
62 views

What makes an open source encryption algorithm safe?

Take for example the popular AES algorithm where we have a combination of substitution, shift row, mix column, and add key steps involved in encrypting plain test. All of the mathematical operations ...
2
votes
1answer
86 views

Reversing a known encryption algorithm (4-byte repeating key XOR)

I've been practicing for an upcoming CTF competition, and I've finally reached the cryptography stage. I'm a complete newbie in this field (my knowledge is essentially that bcrypt is awesome and md5 ...
12
votes
2answers
2k views

What's wrong with XOR encryption with hash and an iterated salt

Suppose you'd use the following algorithm to encrypt a message Let $k$ be the key to encrypt with Let $m$ be the message to encrypt Split $m$ into groups of 512 bytes Given a hash function with ...
0
votes
0answers
4 views

Meeting people interested in Crypto and Programing [migrated]

I have done some basic Micro controller programming in the past. I am now just starting to learn C++ and plan to move into Java and SQL eventually. I just got done reading one of Simmons books. It was ...
2
votes
1answer
67 views

Cryptanalysis of XOR cipher with repeated key phrase

My assignment is to cryptanalyze cipher text that we know was encrypted with a stream cipher (bitwise XOR of plain text and key stream), and decrypt to plain text. We know the key stream is a repeated ...
1
vote
1answer
30 views

How to add passphrase to an RSA key?

If I want to protect a private RSA key, do I just XOR the password into the key, or do I do something else? Is it secure? Edit: I got a good answer from a comment - Hash the password/passphrase with ...
1
vote
1answer
62 views

Does sending the same message with 2 different keys in OTP leak information?

Suppose a common message ($M$) is XOR'ed with two different keys $K_1,K_2$ producing two ciphertexts $C_1,C_2$. Thus, $$M \oplus K_1 = C_1\\ M \oplus K_2 = C_2$$ On observing $C_1$ and $C_2$, an ...
5
votes
1answer
1k views

Confusing XOR notation in textbook sample solution

I am preparing for the midterm exam in my Data Security class so I am trying to read and understand the textbook's exercise questions. The sample solution at the end the textbook makes this problem ...
2
votes
2answers
70 views

Exploiting XOR one-time-pads with dictionary length 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, ...
0
votes
1answer
54 views

File using same key on XOR cipher. Using CBC [closed]

I have some files that are encrypted using an unknown key and it's using the CBC method to encrypt the files. When I XOR two files together the first two bytes are always the same, but different for ...
0
votes
3answers
138 views

Key length requirement in a simple XOR implementation

I don't have much previous experience at all with cryptography, this is pretty much the first time I've tried anything similar. I'm trying to implement an extremely simple XOR encryption system in ...
0
votes
1answer
35 views

A simple keyed message authentication code using XOR

Suppose I have a key that is at least 32 characters in length and provides at least 128-bits of entropy. If I picked from the character set of [a-hjkmnp-z2-9-], ...
1
vote
0answers
20 views

Which protocols / file formats use CBC with a random IV and without a MAC?

Disclaimer: I am a noob so this may well be a stupid question or one that's been asked before. I didn't see it come up after searching, though, so I'm going to assume it hasn't been asked here. The ...
3
votes
1answer
71 views

Reverse Encryption Algorithm from Decryption code

I have the code for a decryption algorithm but I'm struggling to figure out how to reverse it into the original encryption code. ...
1
vote
0answers
64 views

Is $E_{k}(x) = F_{k}(x) \oplus F_{k}( \bar x)$ PRF?

$E_{k}(x) = F_{k}(x) \oplus F_{k}( \bar x)$ and F is PRF which maps $\left \{0,1 \right \}^n \times \left \{0,1 \right \}^n $ to $\left \{0,1 \right \}^n$. Let two messages $m_{0} = 0^l $ and $m_{1} ...
0
votes
1answer
50 views

Decrypting messages crypted with one time pad (used more than once)

I have a stream cipher with a key (that is unknown to me) that is used more than once. Messages are ciphered in this way: ciphered_message = message XOR key Let'...
0
votes
0answers
36 views

Are there any historic examples of breaking the one-time pad because of a careless key re-use? i.e simple attack on a multiple-time pad?

It doesn't have be using a truly random key, (it could be the Enigma) but the attack must be based on XORing two parts of ciphertext.
7
votes
1answer
61 views

Difficulty to find any preimages $a$ and $b$ for given $V$ so that $H(a) \oplus H(b) = V$?

Suppose I have the values $a$, $b$, and $V = H(a) \oplus H(b)$ with inputs $a \neq b$ and $H$ being SHA-224. None of these values are a secret. How secure is it to assume that no other possible values ...
1
vote
3answers
126 views

Is all of encryption based on xor?

For a long time I've been under the impression that all of encryption uses xor at its basic level. Is this true? What other method could be used to encrypt plaintext with a key? Asymmetrically, as ...
3
votes
1answer
222 views

Any stream cipher with avalanche effect?

As far as I know, all stream ciphers work by generating a stream of pseudo random bytes, and XOR it with the plain text to get the cipher text. It has the property that one bit change in the cipher ...
1
vote
4answers
144 views

Is it safe to use XOR to encrypt data key using master key

I am implementing a hierarchical key system with a randomly generated master key and many randomly generated data keys that should be encrypted using the master key. I am wondering what the best way ...
-3
votes
1answer
52 views

1 bit shannon entropy CPU instructions?

It has been proved, that the xor operator is suitable for entropy accumulation, due to its theoretical shannon entropy of 1 bit. There are six truth tables with ...
3
votes
2answers
65 views

(Non-) Perfect Secrecy of Vernam Cipher Using $E(m) = m \oplus k \oplus \operatorname{rev}(k)$

Given the cipher $$E(k, m) = m \oplus k \oplus \operatorname{rev}(k)$$ where $\operatorname{rev}(k)$ is the reversed binary of $k$, how would one prove that the cipher is not perfectly secret. I ...
3
votes
1answer
69 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 ...
1
vote
0answers
32 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 ...
3
votes
2answers
277 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 ...
3
votes
1answer
125 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 ...
1
vote
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 ...
0
votes
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,...
1
vote
0answers
203 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 ...
0
votes
1answer
286 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: ...
3
votes
2answers
209 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 ...
14
votes
2answers
2k views

Why xor is a linear operation but ordinary adding is not

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 ...
0
votes
1answer
76 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 ...
4
votes
3answers
647 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. ...
2
votes
1answer
230 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+...
3
votes
1answer
260 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-...
1
vote
1answer
153 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 ...
2
votes
1answer
750 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 ...
6
votes
2answers
195 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$? ...
1
vote
1answer
335 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 ...
0
votes
4answers
178 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 ...
0
votes
1answer
54 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 ...
3
votes
2answers
2k 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 ...
-3
votes
1answer
135 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?
5
votes
2answers
936 views

What does ⊕ mean in cryptography?

Can someone please help me with the question below? Explain why 0 ⊕ x ≠ 1 ⊕ x, whatever the value of the bit x. Hence, explain why flipping a bit in the plaintext produces a predictable ...
1
vote
1answer
118 views

Reducing the keyspace for a brute force attack on a chained 64-bit xor

I have a block of data which I know is encrypted using a chained 64-bit xor (sorry if that makes no sense, I'm not familiar with crypto lingo). I know a little bit about what the plaintext should look ...
1
vote
1answer
97 views

Why Might XOR's Lead to Hash Functions Lacking 2nd Pre-image Resistance?

My hash function is as follows: Cut the string in half (assume even length of 2m) XOR's the two halves together Take the result of the XOR and pass it to a function (a one-to-one and "onto" function)...
14
votes
2answers
13k views

How is XOR used for encryption?

I am a programmer, so when I hear XOR, I think about the bitwise operator (e.g. 0110 ^ 1110 = 1000). The mention of "XOR" comes ...
2
votes
1answer
107 views

RFID Protocol Cryptanalysis

Assume we have the following scheme for RFID: TAG & READER both have initially k keys. Every session the TAG computes $k_i$=F($k_{i-1})$ where F is a function which computes XOR of previous key ...