immortalwrt/package/jsda/njitclient/documents/Documents.html
2019-07-02 18:06:49 +08:00

101 lines
2.9 KiB
HTML
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head> <meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title>NJIT 802.1X Client -- Documents</title>
</head>
<body>
<pre>
===============================================================================
南京工程学院 - 校园网802.1X客户端 - 项目文档
-------------------------------------------------------------------------------
参考AGanNo2的相关介绍在此将版本号加密/解密步骤整理如下。
[H3C版本号加密流程]
选取任意32位随机数并生成字符串形式的密钥
uint32_t randam;
char key[8+1];
sprintf(key, "%08x", randam);
加密步骤:
char version[16]="EN V2.40-0335";
异或
|《———————— key[] (例如取randam=0x12345678则字符串key[]为"12345678")
version[16]: "LK%W3+19$5624 "
将整数randam附加到version[16]之后组成20字节
|《—————————————————————————————————————————————
version[20]: "LK%W3+19$5624 4Vx"
异或
|《——————— "HuaWei3COM1X"
version[20]: "; <s23IJ%?C "
按照Base64格式编码输出可读的ASCII字符串
|《——————————————————————————————————————————
最后生成的28字节版本号为
Rw0tZQEjdzIzSUolP0MNOyA8EHM=
[“异或”运算的细节]
1、每个密钥被按正序、逆序使用两遍
2、密钥会被扩展为与待加密数据长度相同
使用密钥key[]="12345678"加密"EN V2.40-0335"
"EN V2.40-0335 "
"1234567812345678"
XOR "8765432187654321"
————————————————————————————————
"LK%W3+19$5624 "
使用密钥"HuaWei3COM1X"加密"LK%W3+19$5624 4Vx"
"LK%W3+19$5624 4Vx"
"HuaWei3COM1XHuaWei3C"
XOR "C3ieWauHX1MOC3ieWauH"
————————————————————————————————
"; <s23IJ%?C "
[H3C认证服务器解读版本号流程]
28字节版本号秘文
   
     Base64解码
   |《—————————————
   
verison[20]
   
   |  异或
   |《———————— "HuaWei3COM1X"
   
version[20]
     \
      \
 前16字节  取出末尾4字节即randam
          
          
          
   |  异或   |
   《—————— key[]
   
   
还原成版本号字符串"EN V2.40-0335"
===============================================================================
</pre>
</body>
</html>