[...]
Moreover if Password (P) is a stream of 1's then N will be a stream of 0's.
[...]
13 = 1101
^
1 = 1111
=========
0 = 0000
The above is incorrect, or I'm missing something. XORing a number with a stream of 1's would result in that number inverted, i.e.:
13 = 1101
^
15 = 1111
=========
2 = 0010
No No. You got it so right. I made a mistake.
XOR with 1s reverse the number.
I read these two concepts about XOR cryptography shortcomings in my Number theory class
