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

17 questions
317 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 ...
75 views

### How to decode function that returns number of 1s of the XOR of (target, a number you choose, and a biased random value)?

I received this problem and unsure how to figure it out. Apparently it is possible to decode the value correctly 99% of the time. An example: Suppose the target is 20, and there is a function (let's ...
78 views

111 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.
132 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 ...
650 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 ...
58 views

### find keylength in xor-based encryption

I have found interesting answer, written by GeneQ and now want to understand and implement it. I think, that first point of this answer can be rewritten in follwing way: suppose we have n bytes of ...
25 views

### Does knowing the seed state given the output, lead to potential compromise?

I see in some answers from 2014, some talk about independent sources of entropy mixed canonically with XOR with say one source which is known in advance. Assuming we are operating on bit string ...
If I use $hmac(k_1,m)\oplus hmac(k_2,m)$ as compared to $hmac(k_1,m)|| hmac(k_2,m)$ does either improve security? I suppose not because $\oplus$ is just a way to scramble data. Can someone ...