## Friday, August 28, 2015

### Function cipher

Suppose you have a message m that is in an alphabet with n symbols indexed as x symbols...

H e l l o ,   t h i  s     i  s     t  h  e     m
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

You can think of any function f(x+c) , such as 3*x^2 + 2x +3, with c = 5
123 164
1+5 2+5
123 because f(1+5)= 123, 164 because f(2+5)=164

and then add f(x) to m(x) mod n to scramble it, like suppose there were 64 symbols in  our alphabet and H was the 34th symbol, we'd add f(1+5)=123 to m(1)=34 157 which mod 64 is 29, which might be C, so we change the H to a C in our message...

So to use it, two people would meet and a computer would randomly generate a function for them, and then every time they want to send a message they send a number c to the other person in plain text as the public key, and they set both set their program to that c and send messages... periodically they can change c or remeet to reset scrambling functions...

I think once the message is scrambled it would be very hard to decode without knowing the function or offset, because the same letters in the original message can map to multiple different letters in the encoded message so letter frequency analysis won't work, and there are infinitely many different possible functions someone could be using, even ones that go to irrational numbers can be rounded to the nearest integer...

## Monday, August 3, 2015

### 72 comparator 9 depth 16 item possibly extensible to power of 2 sorting network

The above is a sorting network for 16 items that I haven't yet proven works every time; but it correctly sorted many random lists correctly... The pattern is basic enough that it could possibly be extended to any power of 2 size network but those get hard to verify systematically so a proof would be necessary...