Difference between revisions of "单卡联机"

From 3dbrew
Jump to navigation Jump to search
(translate 15%)
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
The 3DS dlplay title has two dlplay modes: 3DS and DS. DS dlplay is just regular dsmode dlplay, same interface and protocol as before. Like DS gamecards, holding down start+select while starting the dsmode dlplay client will disable stretching the screens.
+
译自[[Download_Play]]
  
3DS dlplay有两个dlplay模式:3DS​​和DS。DS dlplay是只是普通的dsmode dlplay,使用了和从前同的接口和协议。 就像DS gamecards一样,进入dsmode dlplay应用时按住start +select,将禁用拉伸屏幕。
+
3DS dlplay有两个dlplay模式:3DS​​和DS。DS dlplay是只是普通的dsmode dlplay,使用了和从前同的接口和协议。 与DS游戏卡相同,进入dsmode dlplay应用时按住start +select,3DS会禁用拉伸屏幕。
  
 
== Download Play 协议 ==
 
== Download Play 协议 ==
  
3DS的Download Play 协议与 DS Wireless Multiboot (WMB) 协议完全不同. While the DS WMB protocol used to send program code in plaintext over wireless, the Download Play protocol is now using WPA2 encryption with 128-bit AES CTR to broadcast the application.
+
3DS的Download Play 协议与 DS Wireless Multiboot (WMB) 协议完全不同。DS WMB协议用于无线以纯文本形式发送程序代码,而3DS的 download play协议使用WPA2加密的128位AES CTR广播应用程序。
  
The broad-casted beacons have static Nintendo tag data, broad-casted at a rate of 0.102400/s. WPA2 data frames are broad-casted as well, the size of these varies.
+
广播的信标(beacons)有 以0.102400 / s的速度广播的静态的任天堂标签数据 和 WPA2广播的数据帧,他们的大小不尽相同。
After a client authenticates to the host, the host sends an association response, with a random ASCII hex SSID, like: "EB6FAB77". After that the systems communicate and transfer the binary with WPA2 encrypted data frames.
+
客户端向主机请求身份验证,主机发送连接响应,响应包含了一个随机的ASCII十六进制SSID (如“E​​B6FAB77”)。 之后使用WPA2加密的数据帧进行系统的通讯和传输的二进制文件。
 +
 
 +
这是从猴子球3D(vendor 001f32)导出的一个任天堂标签。数据中包含的vendor tag数据是加密的:
  
This is a dump of the Nintendo tag of the beacon from Monkey ball 3D, with vendor 001f32. The data contained in this vendor tag is encrypted:
 
 
  000: 18 05 9f ae 17 c8 a5 1d 0b 81 28 be 74 0f d4 af
 
  000: 18 05 9f ae 17 c8 a5 1d 0b 81 28 be 74 0f d4 af
 
  010: 97 30 04 60 fd 2d f3 d9 8d bc 22 80 51 60 3c 75
 
  010: 97 30 04 60 fd 2d f3 d9 8d bc 22 80 51 60 3c 75
Line 21: Line 22:
 
  080: 25 f2 56 c4 19 88 64 13 78 68 e2
 
  080: 25 f2 56 c4 19 88 64 13 78 68 e2
  
== WPA2 Passphrase ==
+
== WPA2密钥 ==
The Download Play protocol and all local-WLAN communications have the WPA2 passphrase generated the same way. The input data used with [[Process_Services|EncryptDecryptAes]] with [[PSPXI:EncryptDecryptAes|keytype1]] is a 0x10-byte hash over an input passphrase. This input passphrase is fixed for Download Play, it's unique per local-WLAN protocol. The CTR is a 0x10-byte hash over a 16-byte structure which among other data includes the host MAC address, and an ID which is normally from the application's uniqueID in the titleID.(The uniqueID used for Download Play is fixed however) The hex output from crypting that data is the final WPA2 passphrase. This 0x10-byte hash is unknown, however this might be MD5.
+
用于引导单卡联机的可执行通信有一个单独的WPA2密钥,它是由 [[NWM_Services|NWM]] 模块生成的一个随机的十六进制字符串。
 
 
The WPA2 passphrase used for communications with the booted Download Play executable is a separate passphrase, generated using the above method where the input passphrase is a random hex string.
 
  
== Broadcasted application data ==
+
== 广播应用数据 ==
The Download Play protocol broadcasts 3DS application data in the [[CIA]] format, which contains a certificate chain, a ticket, a TMD, and the actual application itself, in [[CXI|CXI format]]. The broadcasted archive data is temporarily stored as a file on the internal NAND Flash storage, and is kept there until new archive data from a different game is received through the Download Play protocol.
+
Download Play协议以[[CIA]] 格式广播3DS应用数据, 包含certificate chain, ticket, TMD各一,以及[[CXI|CXI format]]格式封装的应用本体。广播的归档数据临时存储在内部的NAND Flash直至其他游戏通过Download Play协议占用此空间。
  
The CXI application content is again encrypted, this time using 128-bit AES CBC. The encryption uses the decrypted titlekey of the ticket, and the titleid padded with zeros as the IV. To get the decrypted titlekey, the titlekey stored in the ticket must be decrypted using 128-bit AES-CBC with the 3DS common key, and the same IV as mentioned previously.
+
CXI 应用数据使用了128-bit AES CBC加密. ticket中有加密的titlekey , 和titleID补零构成的IV。为了得到解密的titlekey,ticket中存储的titlekey必须使用128位AES-CBC的3DS公钥解密,以及前面提到的IV。
  
So in actuality, the 3DS application code, as it is being transmitted wirelessly has been encrypted 3 times:
+
所以,事实上通过无线传输的3DS的应用程序,经过了3次加密:
* The first time is using 128-bit AES CTR encryption for the ExeFS of the CXI format,
+
* 第一次使用128位AES CTR加密的CXI格式的ExeFS
* the second time is using 128-bit AES CBC encryption in the archive data,
+
* 第二次使用128位AES CBC加密的归档数据
* and the third time is using 128-bit AES CTR for the WPA2 encryption.
+
* 第三次使用128位AES的WPA2加密CTR。
  
== Remote Distribution of System-Updates ==
+
== 远程分布式系统更新 ==
  
As part of the child distribution process, a 3DS acting as the server in a local Download Play session, can send firmware updates to another 3DS unit acting as the client, through first sending the system update package then instructing the client to install reboot and reinstantiate a connection (which it caches information about temporarily) remotely, if it finds system updates are necessary before distributing the child-application. ( eg. multiplayer game or a demo. ) Like "update" partitions on CTR Cards, this is not an "automatic feature" and not implemented for all Download Play titles.
+
作为分布式系统的一部分,一台3DS扮演了本地Download Play服务器的角色,可以给作为客户端的机器发送固件更新。首先发送系统升级包,然后给客户端发送指令安装升级包并重启。 在比如远程连接时 (缓存临时信息),如果在发现运行分布式子应用(比如多人游戏)必须进行系统更新,就像升级CTR卡的分区一样, 这不是一个“自动功能”,并没有在所有的Download Play titles中实现。

Latest revision as of 13:35, 26 May 2013

译自Download_Play

3DS dlplay有两个dlplay模式:3DS​​和DS。DS dlplay是只是普通的dsmode dlplay,使用了和从前同的接口和协议。 与DS游戏卡相同,进入dsmode dlplay应用时按住start +select,3DS会禁用拉伸屏幕。

Download Play 协议[edit]

3DS的Download Play 协议与 DS Wireless Multiboot (WMB) 协议完全不同。DS WMB协议用于无线以纯文本形式发送程序代码,而3DS的 download play协议使用WPA2加密的128位AES CTR广播应用程序。

广播的信标(beacons)有 以0.102400 / s的速度广播的静态的任天堂标签数据 和 WPA2广播的数据帧,他们的大小不尽相同。 客户端向主机请求身份验证,主机发送连接响应,响应包含了一个随机的ASCII十六进制SSID (如“E​​B6FAB77”)。 之后使用WPA2加密的数据帧进行系统的通讯和传输的二进制文件。

这是从猴子球3D(vendor 001f32)导出的一个任天堂标签。数据中包含的vendor tag数据是加密的:

000: 18 05 9f ae 17 c8 a5 1d 0b 81 28 be 74 0f d4 af
010: 97 30 04 60 fd 2d f3 d9 8d bc 22 80 51 60 3c 75
020: d9 89 6d 16 c4 f3 aa 89 26 d4 14 25 67 75 8e 4b
030: 3c 97 85 c9 83 15 d4 96 06 b1 29 b6 f5 51 57 71 
040: cc b6 1f 4a c8 bd 4f c0 57 43 cb ab fa 37 74 b0
050: 64 6b 87 69 a1 de a4 05 7c 7c 49 5d f5 21 25 83
060: 4c f2 d0 70 38 14 7b 0f f4 97 f7 ff f3 ff 36 cd
070: c2 e2 c0 78 98 d1 d5 4d 3d d4 9b 57 84 6c e2 4f
080: 25 f2 56 c4 19 88 64 13 78 68 e2

WPA2密钥[edit]

用于引导单卡联机的可执行通信有一个单独的WPA2密钥,它是由 NWM 模块生成的一个随机的十六进制字符串。

广播应用数据[edit]

Download Play协议以CIA 格式广播3DS应用数据, 包含certificate chain, ticket, TMD各一,以及CXI format格式封装的应用本体。广播的归档数据临时存储在内部的NAND Flash直至其他游戏通过Download Play协议占用此空间。

CXI 应用数据使用了128-bit AES CBC加密. ticket中有加密的titlekey , 和titleID补零构成的IV。为了得到解密的titlekey,ticket中存储的titlekey必须使用128位AES-CBC的3DS公钥解密,以及前面提到的IV。

所以,事实上通过无线传输的3DS的应用程序,经过了3次加密:

  • 第一次使用128位AES CTR加密的CXI格式的ExeFS
  • 第二次使用128位AES CBC加密的归档数据
  • 第三次使用128位AES的WPA2加密CTR。

远程分布式系统更新[edit]

作为分布式系统的一部分,一台3DS扮演了本地Download Play服务器的角色,可以给作为客户端的机器发送固件更新。首先发送系统升级包,然后给客户端发送指令安装升级包并重启。 在比如远程连接时 (缓存临时信息),如果在发现运行分布式子应用(比如多人游戏)必须进行系统更新,就像升级CTR卡的分区一样, 这不是一个“自动功能”,并没有在所有的Download Play titles中实现。