coding the matrix week1 GF(2)
2018-06-03 本文已影响0人
爱跑步的coder
Addition of 0 and 1 in the Galois Field 2 is just like exclusive-or.


def encrypt(p,k): return p+k
from GF2 import one
k = one
p = one
c = encrypt(p, k)
print c
Now, suppose an eavesdropper Eve, observes the value of c.
So, let's suppose the secret key is chosen by flipping a coin.


So, you can see in this case, you could effectively double the throughput from this source to these two recipients using GF2 addition.