We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [xor]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
129 views

How many primitive cryptography operations are there? [closed]

Every cipher I've encountered seems to be built from slight variations of only three basic operations: the S-box, the P-box, and the XOR. I’m just wondering, are there any others? And if there aren'...
0
votes
1answer
149 views

is XOR-hash difference-unpredictable

Let $F$ be a PRF. The $XOR\text{-hash}$ is defined as: ...
2
votes
1answer
165 views

Solve System of Equations including XOR and Modular Addition

A Dummy cipher is shown in figure below. Plaintext is 16 bits ($X_1$ and $X_2$ are 8 bit each). Ciphertext is computed after two rounds using two round keys $K_1$ and $K_2$. Can the round keys $K_1$ ...
4
votes
1answer
146 views

A problem in secret sharing and mixed operators over $\mathbb{Z}$

Recently, I studied an article in which it was written that having $(A-B)\oplus C$ and $B\oplus C$, we cannot find $A$. The authors used this result to build a secret sharing scheme, but they did not ...
1
vote
1answer
114 views

Counting the $\operatorname{XOR}$ of an Element over the Finite Field $\operatorname{GF}(2^q)$

Definition: The $\operatorname{XOR}$ count of an element $\alpha$ in the finite field $\operatorname{GF}(2^q)$ is the number of $\operatorname{XOR}s$ required to implement the multiplication of $\...
3
votes
0answers
182 views

Why is XOR preferred over XNOR in cryptography? [duplicate]

The advantages and properties exhibited by XOR are also exhibited by XNOR, like the ones mentioned in many answers like this one Information is preserved. $c = a \oplus b$. One may recover $a = c \...
1
vote
1answer
4k views

Breaking a XOR cipher of known key length?

For a challenge, I need to find the key that enciphered a text. I know that the key is of length N (invariable). There is no assurance that the key is only alphabetical or alphanumeric, but it could ...
-2
votes
3answers
984 views

Why the AES perform encryption in 10 rounds Instead of one?

I'm a Master's Degree student and researching about AES-128 encryption. My Advisor asked me a question about necessity of iterative rounds in AES. he asked:"why we couldn't encrypt a 128-bit plaintext ...
3
votes
2answers
139 views

Is it possible to find two sets such that their hash xor summation is the same?

Consider two sets $A=\{a_1,a_2,\cdots,a_n\}, B=\{b_1,b_2,\cdots,b_m\}$; $m,n$ can be different. we can calculate the xor summation of each element's hash value: $XOR(A)=(hash(a_1)\oplus hash(a_2) \...
1
vote
4answers
177 views

Cryptography XOR Question

Recently I encountered an interview question related to XOR and I have no idea how to figure it out. The question is as below: The algorithm is: $A\oplus B$ (operation) $C = D$ We have the value of $...
0
votes
2answers
89 views

Shortest key in symmetric algorithm used only once is unsecured?

Considering a message of n bits, one ridiculously short key of 1 bit and using this cryptographic function which performs the <...
0
votes
1answer
107 views

Combining keys after key expansion: is it secure?

I've found an algorithm taht performs the following: expand the two keys using cryptographic hashing functions so the final keys will look like nonsense ASCII, then XOR them together to create a ...
1
vote
1answer
494 views

Security of a sha-256 based stream xor cipher?

Provided that I have some data I want to cipher and a password to do it: I generate a random IV I define c = sha256(password) I generate an infinite stream where <...
2
votes
2answers
2k views

Known plaintext attack without knowing the location of the plaintext

I'm trying to understand known plaintext attacks and since I best learn by doing I broke out Python and did the following: I have a plaintext string s and a key <...
0
votes
1answer
36 views

Reversing ITUbee's diffusion operation

One of the functions used in ITUbee's round function is $L$ which is defined as $L(A, B, C, D, E) = [E \oplus A \oplus B, A \oplus B \oplus C, B \oplus C \oplus D, C \oplus D \oplus E, D \oplus E \...
3
votes
2answers
79 views

Can a CSPRNG, seeded with a key, be used to generate a byte sequence as long as the plaintext to XOR it with that?

Given a “safe” (meaning: brute-force is your only shot) cryptographically strong PRNG, wouldn't it be safe to encrypt data using the CSPRNG to create a key as long as the data and then encrypt the ...
1
vote
1answer
169 views

Practical BCrypt plus XOR encryption for small messages

This is a practical solution available and potentially useful to everyone, so please give some leeway not banning this question. Details are at the end, but here is the question: How secure is the ...
1
vote
1answer
121 views

Using Hadamard Form of a Matrix in the Block Cipher

Definition: A matrix A of size $2^n$ is a Hadamard matrix, if has the following form $$ A= \left( \begin{array}{cc} U & V \\ V & U \end{array} \right)_{2^n\times 2^n}\, , $$ where $U$ and $V$...
1
vote
1answer
133 views

is the perfect secrecy of one time pad dependent on the xor randomness preserving property?

Is the perfect secrecy of the one time pad dependent upon the xor "randomness preserving" property (xoring a uniformly random string with any string yields a uniformly random string)? I have seen ...
3
votes
2answers
297 views

Decrypting two XORed compressed messages?

If through a previous attack, cipher misuse or two time pad etc. I receive $c=m_1 \oplus m_2$. Where $m_1$ and $m_2$ are compressed messages, for instance GZIPped English text documents. Can we ...
0
votes
1answer
227 views

XORing to detect decrypted value?

So I am doing a CTF and I have found a text that is full with hexadecimal encrypted value with XOR (that was a given hint from the previous flag). I don't have the key but I know the length of the key ...
1
vote
1answer
109 views

RNG Source Combining

I'm planning on combining RNGs from several sources (Windows, Linux, OpenBSD, etc.) for generating one time pads but I have some questions that I don't know how to answer regarding xoring the outputs ...
0
votes
1answer
430 views

Name of specific cryptography property of XOR

Given $C$ = M $\oplus$ K1 $\oplus$ K2 $\oplus$ K3 One can decrypt $C$ in any sequence, like: $C$ $\oplus$ K1 = M $\oplus$ K2 $\oplus$ K3 $C$ $\oplus$ K1 $\oplus$ K3 = M $\oplus$ K2 $C$ $\...
1
vote
1answer
385 views

Is a one-time pad secure if the encryption method is not?

(The following situation is hypothetical.) I need to communicate something securely and I have decided to use one-time pads. I am going to be using human genes as the source of the OTP data (this is ...
2
votes
0answers
275 views

Help me understand how to actually break an XOR/Vigenère cipher [closed]

My friend's server was recently hacked and I'm trying to decipher the malicious files I found in hopes of understanding the hack better. I can tell that they're using an XOR/Vigenère cipher and I've ...
0
votes
1answer
144 views

Multi-Embedded Xor for Perfect OTP

I am looking for a perfect OTP design, so let's see if this design is good. There are 2 issues when it comes to a good OTP system, the key and the plaintext, we will use XOR as cypher: If the ...
1
vote
0answers
59 views

RIsk mitigation: block cypher vs xor

It sort of looks like to me that there is a kind of risk mitigation in the architecture of block cyphers vs the xor cypher. In XOR, the risk is entirely in the random number generator. The XOR ...
4
votes
1answer
595 views

Reversing decryption function involving XORs and bit rotations?

I am trying to reverse this equation to find the encrypted number given to it. Here is the equation: $$y = x \oplus n \oplus (x \ggg 3) \oplus (x \lll 7) $$ $\oplus$ is the bitwise exclusive or ...
4
votes
2answers
424 views

XOR Encryption with bcrypt password de-biasing

Objective: To have a very simple to verify, but very secure small message encryption. Idea: Message ⊕ bcrypt( Password). We remove password biases with bcrypt ...
-1
votes
1answer
102 views

Practical solution to store a highly valuable message: what am I missing? [closed]

The answers to my previous question (How safe is XOR with multiple independent but non random keys?) revealed quite a few problems, to a degree that a new approach had to be developed. I took the ...
8
votes
2answers
2k views

Extracting randomness from highly-biased RNG

I have a source with a very low entropy (like 3 entropy bits per 1024 source bits). But I need to construct a 128 bit seed from the source. Will it be helpful to XOR 350 bits with jump 128 bits, e.g....
1
vote
2answers
431 views

How safe is XOR with multiple independent but non random keys?

I will approach the question from practical side. All the examples are not real, but for illustration purpose only. I have a message, the secret Bitcoin key, which I want to store safely. MESSAGE = ...
1
vote
2answers
624 views

What are the vulnerabilities of XOR in the following scenario?

What are the security vulnerabilities of the XOR operator in the following scenario: The Key, The Cyphertext and the Plaintext are the same size in bits. The Key is only used once and it's secret The ...
1
vote
1answer
45 views

Equivalance Operator - Perfect Secrecy

The equivalance operator is the inverse of the XOR operator, it's symmetric. Would this mean that it would also provide theoretical perfect secrecy just like XOR? XOR ...
2
votes
0answers
94 views

How many Affine function can be made from $4 \times 4$ and $8 \times 8$ S-boxes?

The nonlinearity of an S-Box is defined as the non-linearity of its vectorial Boolean Function. Let $F$ be the hamming distance between the set of all non-constant linear combinations of component ...
8
votes
1answer
2k views

XOR a set of random numbers

Basic question about XOR and entropy - given a set $S$ of pseudo-random numbers in the range $[0,b]$, will XORing them produce a new pseudo-random number in $[0,b]$ or will the operation decrease the ...
-2
votes
1answer
97 views

Looking for the inverse of the following equation

I am working on some image encryption algorithm and got stuck. I have plaintext data value of $256$ and perform the following (all values in decimal): $$[256 \oplus 2] mod (256) = 0$$ What will be ...
0
votes
2answers
943 views

Perfect secrecy with XOR & SHIFT?

I have read that XOR provides perfect secrecy, when the key is perfectly random. However it's technically hard to generate truly random numbers, especially on computers, so that is why people use AES, ...
0
votes
2answers
198 views

Is it possible to unroll stacked XOR'd strings without brute-force?

Given: An initial string (sBase) that is visible to EVERYONE sBase = "syLgETsPihVXBRuVR4eI" Several other strings that are only visible to ME ...
2
votes
0answers
154 views

Android app cryptography does it fall under US Export laws? [closed]

Basically, I want to encrypt some strings in my app, strings like access tokens or passwords. I planned on using AES, and mainly saw a good library at https://github.com/tozny/java-aes-crypto. Note ...
0
votes
1answer
641 views

how to get secret keys in xor?

1) a = b ⊕ s1 2) b = a ⊕ s1 3) b ⊕ s2 = c Is there a way to find s1 and s2 if we know many different values of a and c? 4) a1 = b1 ⊕ s1 5) a1 ⊕ s1 ⊕ s2 = c1 I think it is possible if we analysis ...
7
votes
1answer
583 views

Why XOR and NOT is free in garbled circuit

I am having trouble understanding the term "free" in V.Kolesnikov et al's paper. 1. Why NOT is free In page 4, section 3.1, they said that NOT gate is free by simply eliminating them and ...
3
votes
2answers
565 views

Does XOR have diffusion properties?

Does the XOR operator provide diffusion if the right side of plain text is XORed against a round key which is then XORed against the left side to produce that side of cipher text, for example in a ...
2
votes
2answers
306 views

Encryption based solely on XORing with concatenated hash values

I have recently read a bit about Lamport signatures (especially the approach using hash ladders to save disk space) and I found it very interesting that it entirely depends on a hash function. So I ...
2
votes
2answers
656 views

Prove that the following private-key encryption scheme is not CPA-secure

Consider the following private-key encryption scheme : The shared key is k $\in$ {0,1}n. To encrypt the message m $\in$ {0,1}n, choose random r $\in$ {0,1}n and output $(r, F_r(k)\oplus \overline{m})$,...
5
votes
2answers
561 views

MAC security using encryption

If a message $M$ contains $n$ message blocks and I XOR the message blocks and encrypt the result using AES, can i use the resulting cipher-text as MAC? is it a good design or bad one?
1
vote
3answers
9k views

How to XOR two hexa numbers by hand fast

I have an upcoming exam where I can use a simple Calculator. On some sample questions they ask us to XOR two values (for AES round key) and I know how to write it out by hand but is there any other ...
2
votes
1answer
363 views

The existence of partial homomorphic additive encryption with bit-wise XOR operation

According to Protocol A that was presented in Section 3.1 paper entitled "Some Efficient Solutions to Yao’s Millionaire Problem" (2013). [1] In that protocol they used an assumption that there is ...
6
votes
2answers
874 views

Can I use PBKDF2 as a stream cipher?

Unfortunately I have to implement some naive homemade symmetric crypto, since ordinary AES CTR is not implemented in available API on target platform. What I’m going to do is, given encryption ...
3
votes
1answer
393 views

AES in Counter mode for 64 bit input

I was reading how AES can be used for 64 bit data. Than i came to this answer :Is it possible to implement AES with a 64-bit I/O block size? The answer here is given that by running AES in counter ...