You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: decrypt.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ title: Decryption/Encryption
7
7
8
8
# Game Files (game*.yw)
9
9
10
-
First you must understand the structure of `game*.yw` files:
10
+
First it'd help to understand the structure of `game*.yw` files:
11
11
12
12
* Nonce (12 bytes) — at offset `0x00`-`0x0C`.
13
13
* MAC (16 bytes) — from `0x0C` to `0x1C` (used internally during decryption).
@@ -22,9 +22,9 @@ The YW2 Demo dosen't save progress. This is a joke, ignore this (I refuse to rem
22
22
## v1.0 Save Files
23
23
### Detection
24
24
* In the international versions (non-JP), this format affects save files last saved in v1.0. They can be read by v2.0 game copies.
25
-
* In JP versions, it describes any version under 2.0, as the version history is different.
25
+
* In JP versions, it describes any version under 2.0, as the version history is different - which can be viewed [here](https://www.youkai-watch.jp/yw2/).
26
26
* Note that all copies of _Psychic Specters_ or _Shin'uchi_ are v2.0. A save file will have v2.0 marked on it in-game if it is.
27
-
* This can be programatically detected by checking if the fixed key AES-CCM decryption fails due to an incorrect authentication tag.
27
+
* This can be programatically detected by checking if the fixed key AES-CCM decryption fails due to an incorrect authentication tag - if it does it's V2.0 (or your code is wrong!).
28
28
29
29
### Method
30
30
* These are first decrypted via AES-CCM (not GCM or CTR). Also note that the AESkey is fixed in v1.0 saves: (the UTF-8 representation of "5+NI8WVq09V7LI5w").
@@ -50,7 +50,7 @@ The YW2 Demo dosen't save progress. This is a joke, ignore this (I refuse to rem
50
50
#### Constructor init
51
51
52
52
* Initialise `primeList` - a list of fixed, ordered list of all prime numbers from 3-1621.
53
-
* Create a `Uint8Array` - referred to as table (with a length of 256), and initialize it with an identity mapping (table[i] = i for i from 0 to 255).
53
+
* Create a `Uint8Array` - referred to as table (with a length of 256), and initialize it with an identity mapping (`table[i] = i` for i from 0 to 255).
54
54
* Fill `table` so that `table[i] = i` for all `i` in `[0, 255]`
55
55
* Create a `Xorshift` instance, seeded by the given `seed`.
0 commit comments