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

254 questions
Filter by
Sorted by
Tagged with
232 views

### Is Fibonacci-XOR-rotate one-way-ish?

Fix $n\in\mathbb{N}$ with $n > 2$ and consider the following method. Pick relatively prime seeds $x_1, x_2 \in \{0,1\}^n$ (where $x_1, x_2$ are interpreted as binary numbers. Then proceed with the ...
65 views

### basic question regarding two-time pad attack

Dan Boneh's Crypto 1 Course includes a lesson on stream ciphers with the following slide: He asks the question: And the answer he gives is $m \oplus p$, which is why this is insecure. But I don't ...
508 views

### How to decrypt two images encrypted using XOR with the same key?

I am trying to solve the following puzzle from CryptoHack involving two images encrypted with the same key: I've hidden two cool images by XOR with the same secret key so you can't see them! lemur....
42 views

### Recreate RC4 Stream cipher

I'm trying to learn how to go about cracking RC4 ciphers (nothing illegal, its an old, i.e., not active challenge for a job application, so no cheating). I have nine md5 hashes with their own ciphers. ...
93 views

### Help me understand how to do a crypto assignment about AES/CBC

I'm doing the Coursera cryptography I course from Dan Boneh. I am attempting to do week 2's programming assignment, but I think I am having some sort of misunderstanding of either the theory, the ...
44 views

### Is this a good implementation of digital signature with timestamp?

Is this a good practice ?. How good or bad is this compared to appending a timestamp to the actual data and hashing it as represented below. ...
424 views

### What is most secure way for one party to encrypt 4 bytes in less than 40 bytes, which will be publicly available?

I have a project where a user needs to store a U32 encrypted on a blockchain such that they can recover it themselves: the user will always have their key available but may "forget" the U32 ...
48 views

### AES MDS D-XOR and S-XOR count

I am trying to implement the D-XOR and S-XOR count in python but despite reading multiple articles on how to perform the calculation I have failed to understand the process used. I would appreciate it ...
80 views

### Splitting Secret Key

If I split a key $k$ into three pieces as $k1, k2$ and $k3$ how should I distribute the keys among three people such that any two of them are able to evaluate PRF, but be secure from any one of them ...
66 views

### Need help finding keysize for Vigenere cipher

I am doing a crypto challenge for breaking a Vigenere style repeating XOR encryption (https://cryptopals.com/sets/1/challenges/6). I have looked at similar questions asked here, mainly this one: ...
229 views

### Formula for bits of entropy per bit, when combining bits with XOR

Assume that bits $A$ and $B$ each have .5 bits of entropy per bit. The two-bit result of the concatenation $A‖B$ has 1 bit of entropy total, and it retains the entropy density of .5 bits of entropy ...
116 views

### Using sha3 as a deterministic source of psuedo-random bytes for xor encryption

The following code generates a deterministic stream of pseudo-random bytes, using SHA3. ...
172 views

### Is it safe to XOR-combine hashes by rotating them first?

I have a small number of hashes. I would like to combine them into a single hash. XORing the hashes ignores their order, which is important. Also, it could lead to a result of zero if there were an ...
77 views

### Using xor encryption in the following use case

I use an encryption scheme based on a symmetric cipher, with the corresponding symmetric key encrypted with RSA/OAEP using the public RSA key of the recipient. I now want to use ECC crypto in ...
112 views

### Generating a XOR Hash function for a given group of numbers to maximise collisions

Given $x$, a vector of $m$ distinct bit vectors of bit length $N$, I want to use an XOR-hash $h$ such that all $x_i$ collide to the same value. I define an XOR hash $h$ which takes bit vector $q$ as ...
62 views

### Can i XOR an array of bytes with an equal length key securely

If i have say 64 bytes, can i XOR those bytes with another 64 random bytes, and have two new arrays, where both are needed to reconstruct the first? Intuetively i need some symmetric encryption like ...
99 views

### Assignment: XOR-cipher [duplicate]

I am currently attending a IT-Security course at the Tel Aviv University and I stuck with the an assignment task. Please DO NOT post the solution if you know it. But I would be very grateful for any ...
6k views

### Can I encrypt a message by swapping bits in the text?

I have tried out an encryption method, in which I swap bits in the text. The text length is N bit, then I generate several random number pairs in the range 0..N-1, as [n,k] pairs. After that, I swap ...
37 views

### Approach used with XOR cipher in black box scenery

What's the approach used in cryptanalysis to make an decrypter for a simple xor stream cipher in a Black Box scenery with only the output?
469 views

### XOR cipher with fixed key and known relation among plaintexts

I have three messages, each known to be XOR-encoded, with the same key used for each message of this XOR cipher. Encoded message 1: $e_1\,=\,00100111010$ Encoded message 2: $e_2\,=\,01001110110$ ...
184 views

### Secret sharing scheme WITHOUT Shamir Secrete Sharing

I am planning to use the following XOR scheme to divide a secret into only 2 shares (I do not want to use Shamir Secret Sharing for different reasons that are beyond the scope of this post). Here's ...
93 views

### Potential weaknesses when combining hash functions?

For consistency's sake, M is the message, H1 and H2 are separate hash functions. I've heard that concatenation or XORing hash outputs together do not provide improved security against preimage and ...
132 views

### Weakness in a CBC-like XOR cipher

A simple symmetric encryption algorithm can be written as follows: Input message M and 64 bit key $K$ Divide M into 64 bit size blocks $B_1...B_n$ Get first block $B_1$ and perform bit-wise $\oplus$ ...
114 views

### Boolean XOR function a valid way to verify the integrity of a message

Does the Boolean XOR function represent a valid way to verify the integrity of a message ?
75 views

### GMW Multiplication AND for 2 parties

I am looking into the GMW protocol's evaluation for multiplication in 2 parties. I have referred to different materials on it but I didn't exactly understand how $a_i b_j + a_j b_i$ is calculated in a ...
97 views

66 views

### Definition of diffusion matrix

I've been studying this article and since I'm not studying cryptography in English and it is not my native language, I don't understand some of the terminology. More precisely: what are diffusion ...