Stream cipher LFSR Known-Plaintext - encryption

I am currently learning cryptography,
I got different tasks. The current one features stream ciphers based on LFSR which can be solved with the Gaussian algorithm.
The cipher is: 0001 0010 01101101
I know that the first 8 bits of plaintext are all 1.
The length of n is 4.
So if I XOR them I get:
11101101
But now I am stuck and don't know how to translate it into a correct matrix.
1 1 1 0 | ?
1 1 0 1 | ?
1 0 1 1 | ?
0 1 1 0 | ?
Is this the correct way or do there only need to be 3 variables in front of the line? And where do I get the solution of the question marks from?
I hope someone can help me understanding cryptography. Thanks.

Related

term document matrix seems combine words? "sootawn" "abilitiesbrush"

head(myTDM)
Docs
Terms 1 2
abatement 20 0
abilities 18 80
abilitiesbrush 0 1
abilitiescreate 0 13
abilitiesmarket 0 6
able 0 30
I was thinking, I was doing something wrong since the outcome is the combination of 2 or sometimes more words then I saw the same thing in a text mining book so I really wonder why it just appears like that? many thanks in advance

In Unix what does the ^ do when placed in a math expression

I have been searching for the answer to this and was unable to find an exact answer help will be much appreciated.
echo $[ 2 ^ 2 ]
returns value 0
echo $[ 2 ^ 3 ]
returns 1
echo $[ 2 ^ 4 ]
returns 6
My question is what math operation is taking place when using the ^ in this context?
I expected to see a power of function. Would really appreciate any clarification, thanks in advance.
It's a bitwise XOR operation.
It compares the bits for the two numbers, and if for a given position, one of the bits is 1, the resulting bit will also be set to 1. In all other cases, the resulting bit will be 0.
So, for your examples:
2 010
2 010
--------
0 000
2 010
3 011
--------
1 001
2 010
4 100
--------
6 110
I would say, your commands are doing a bit-xor with the numbers.

Optimized data sort - software r

this is my first post, so please be polite if I might get sth wrong.
I have a set of data that I want to sort in a specific way using the software r.
It is a non-quadratic matrix of tasks (>100) that require specific components (>100) of specific material (1, 2, 3, or 4). I want to figure out, which tasks can be executed as a group because they require the same components. That's easy. But I want to optimize it, means that components with a low-value material (1) can be "upgraded" to a higher value material (2, 3 or 4) if that decreases the number of groups.
I could only manage to sort the data while upgrading all materials, but that's not what I want.
My minimum example looks like this:
1 0 0 2 0 4 0
2 2 4 0 0 1 1
0 4 4 0 0 3 0
1 3 0 1 1 0 4
4 2 1 0 4 1 2
0 means that this component is not required.
I hope I could describe my problem clearly enough.
thanks a lot in advance for your suggestions
Miguel

What is the correct name of this error correction method (it is similar to Hamming Code)

What is the correct name of this error correction method?
It is quite similar to Hamming Code, but much more simple. I also cannot find it in the literature any more. The only internet sources, I'm now able to find, which describes the method, are this:
http://www.mathcs.emory.edu/~cheung/Courses/455/Syllabus/2-physical/errors-Hamming.html
And the german-language Wikipedia.
http://de.wikipedia.org/w/index.php?title=Fehlerkorrekturverfahren
In the Wikipedia article, the method is called Hamming-ECC method. But I'm not 100% sure, this is correct.
Here is an example, which describes the way the method works.
Payload: 10011010
Step 1: Determine parity bit positions. Bits, which are powers of 2 (1, 2, 4, 8, 16, etc.) are parity bits:
Position: 1 2 3 4 5 6 7 8 9 10 11 12
Data to be transmitted: ? ? 1 ? 0 0 1 ? 1 0 1 0
Step 2: Calculate parity bit values. Each bit position in the transmission is assigned to a position number. In this example, the position number is a 4-digit number, because we have 4 parity bits. Calculate XOR of the values of those positions (in 4-digit format), where the payload is a 1 bit in the transmission:
0011 Position 3
0111 Position 7
1001 Position 9
XOR 1011 Position 11
--------------------
0110 = parity bit values
Step 3: Insert parity bit values into the transmission:
Position: 1 2 3 4 5 6 7 8 9 10 11 12
Data to be transmitted: 0 1 1 1 0 0 1 0 1 0 1 0
Is is quite simple to verify, if a received message was transmitted correctly and single-bit errors can be corrected. Here is an example. The receiver calulates XOR of the calculated and received payload bits where the value is a 1 bit. Is the result is 0, there the transmission is error-free. Otherwise the result contains the position of the bit with the wrong value.
Received message: 0001101100101101
Position: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Received data: 0 0 0 1 1 0 1 1 0 0 1 0 1 1 0 1
Parity bits: X X X X X
00101 Position 5
00111 Position 7
01011 Position 11
01101 Position 13
XOR 01110 Position 14
--------------------
01010 Parity bits calculated
XOR 00111 Parity bits received
--------------------
01101 => Bit 13 ist defective!
I hope, anybody here knows the correct name of the method.
Thanks for any help.
This looks like a complicated implementation of the Hamming(15,11) encoding & decoding algorithm.
Interleaving the parity bits with the information bits does not change the behaviour (or performance) of the code. Your description only uses 8 information bits, where the Hamming(15,11) corrects all single bit errors even with 11 information bits being transmitted.
Your description does not explain how the transmitted 12-bit message gets extended to a 16-bit message on the receive side.

tricky binary subtraction

So I was practicing my binary subtraction. It's been a long while since my first exam and I decided to create my own tricky binary subtraction and I came up with this one:
1100
-1101
Of course the "borrowing trick" does not work for this problem at least I could not get it to work. Is my only choice to flip the bits of the second binary number(the bottom one) and then add a one basically doing 2's complement so 1101 becomes 0011. Then add the primary binary number(1100) with the 2's complement representation(0011) which means it would look like this:
1100 (-4) assume 2's complement
+ 0011 (3) assume 2's complement
sum:1111 (-1) assume 2's complement
I just need confirmation on this problem since its been a long time since I did binary subtraction.
1100
-1101
0 - 1 = 1 (borrow 1)
1100
-1101
1
=====
1
0 - 0 - 1 = 1 (borrow 1)
1100
-1101
11
=====
11
1 - 1 - 1 = 1 (borrow 1)
1100
-1101
111
=====
111
1 - 1 - 1 = 1 (borrow 1)
1100
-1101
1111
=====
1111
The result is 1111 with 1 borrowed. In terms of unsigned arithmetic, this means that either the result underflowed or you need to borrow from the next significant digit. (In terms of signed arithmetic there is no overflow as you have also borrowed the second bit and the calculation corresponds to -4 - -3 = -1.)

Resources