I'm trying to decode chat strings in a multiplayer game's network traffic; the way it encodes them is seemingly some arbitrary encoding. I've been analyzing the UDP traffic to the server with wireshark. My goal is to find a general algorithm to go from hex back to the original message. I'm able to get the encoded hex result for any string, so here is the most telling pair I've recorded:From the string'aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq rrr sss ttt uuu vvv www xxx yyy zzz AAA BBB CCC'(newline only for readability)The result in the sent packet is this0020   b9 b0 3c 90 **b0 b0 30 10 31 31 31 90 b1 b1 31 100030   32 32 32 90 b2 b2 32 10 33 33 33 90 b3 b3 33 100040   34 34 34 90 b4 b4 34 10 35 35 35 90 b5 b5 35 100050   36 36 36 90 b6 b6 36 10 37 37 37 90 b7 b7 37 100060   38 38 38 90 b8 b8 38 10 39 39 39 90 b9 b9 39 100070   3a 3a 3a 90 ba ba 3a 10 3b 3b 3b 90 bb bb 3b 100080   3c 3c 3c 90 bc bc 3c 10 3d 3d 3d 90 a0 a0 20 100090   21 21 21 90 a1 a1 a1** 2a 66 10 04 20 02 34 5a 42Ive marked where I think the relevant data is with asterisks.As you can see, it seems that a = b0, b = 31c = b1, d = 32e = b2, f = 33g = b3, h = 34i = b4, j = 35k = b5, l = 36m = b6, n = 37o = b7, p = 38q = b8, r = 39s = b9, t = 3au = ba, v = 3bw = bb, x = 3cy = bc, z = 3dThis isn't a 1:1 encoding however. Here the character for space is either 90 or 10, and it has an influence on the encoding of the previous(?) character. I'm unaware of any other characters affecting the encoding like this. Here is the encoding for the string 'the cat is back'hex:       3a b4 32 90 b1 30 3a 90 b4 39 10 b1 b0 b1 35 90 desired:   t  h  e     c  a  t     i  s     b  a  c  k    actual:    t  e  d     c  ?  t     i  r     c  a  c  jSpaces have an influence on more than just the previous character here.Is there a pattern here? What is going on? Any help or guesses are welcome.
Is this a known encoding or cipher? (multiplayer game network traffic)
strings;networking
Writing your example, aaa b in binary, and as well the encoded string, 0xb0 0xb0 0x30 0x10 0x31:       a        a        a      ' '        b01100001 01100001 01100001 00100000 0110001010110000 10110000 00110000 00010000 00110001it looks like every byte of the encoded string being the original byte shift right by one bit, with the last bit of the next byte copied to the high order bit of the current byte.So, let's reverse this: if we take your encoded string, 3a b4 32 90 b100111010 10110100 00110010 10010000 10110001shift each byte left one bit, and replace the low order bit with the high order bit from the previous byte, we get:01110100 01101000 01100101 00100000 01100011 ...      74       68       65       20       63 ...       t        h        e      ' '        c ...