Guest User

Untitled

a guest
Mar 24th, 2015
3,680
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ***********************************************
  2. GLIDER ANTI-COLLISION RADIO PROTOCOL VERSION 6 (2015)
  3. ***********************************************
  4. courtesy of unknown
  5.  
  6. Document Release: 0.0
  7.  
  8. For background information read document from 2008:
  9.  
  10. *************************
  11. PROTOCOL VERSION 4 (2008)
  12. *************************
  13. courtesy of Hiram Yaeger
  14.  
  15. NEW ENCRYPTION
  16.  
  17. Swiss glider anti-colission system moved to a new encryption scheme: XXTEA
  18. The algorithm encrypts all the packet after the header: total 20 bytes or 5 long int words of data
  19.  
  20. XXTEA description and code are found here: http://en.wikipedia.org/wiki/XXTEA
  21. The system uses 6 iterations of the main loop.
  22.  
  23. The system version 6 sends two type of packets: position and ... some unknown data
  24. The difference is made by bit 0 of byte 3 of the packet: for position data this bit is zero.
  25.  
  26. For position data the key used depends on the time and transmitting device address.
  27. The key is as well obscured by a weird algorithm.
  28. The code to generate the key is:
  29.  
  30. void make_key(long *key, long time, long address)
  31. { const long table[4] = { 0xe43276df, 0xdca83759, 0x9802b8ac, 0x4675a56b } ;
  32. for(int i=0; i<4; i++)
  33. { key[i] = obscure(table[i] ^ ((time>>6) ^ address), 0x045D9F3B) ^ 0x87B562F4; }
  34. }
  35.  
  36. long ObscureKey(long key, unsigned long seed)
  37. { unsigned long m1 = seed * (key ^ (key>>16));
  38. unsigned long m2 = seed * (m1 ^ (m1>>16));
  39. return m2 ^ (m2>>16); }
  40.  
  41.  
  42. NEW PACKET FORMAT:
  43.  
  44. Byte Bits
  45. 0 AAAA AAAA device address
  46. 1 AAAA AAAA
  47. 2 AAAA AAAA
  48. 3 00aa 0000 aa = 10 or 01
  49.  
  50. 4 vvvv vvvv vertical speed
  51. 5 xxxx xxvv
  52. 6 gggg gggg GPS status
  53. 7 tttt gggg plane type
  54.  
  55. 8 LLLL LLLL Latitude
  56. 9 LLLL LLLL
  57. 10 aaaa aLLL
  58. 11 aaaa aaaa Altitude
  59.  
  60. 12 NNNN NNNN Longitude
  61. 13 NNNN NNNN
  62. 14 xxxx NNNN
  63. 15 FFxx xxxx multiplying factor
  64.  
  65. 16 SSSS SSSS as in version 4
  66. 17 ssss ssss
  67. 18 KKKK KKKK
  68. 19 kkkk kkkk
  69.  
  70. 20 EEEE EEEE
  71. 21 eeee eeee
  72. 22 PPPP PPPP
  73. 24 pppp pppp
RAW Paste Data