SL2 Analyzer
Read a FromSoftware .sl2 save and report what is in it
Loading...
Searching...
No Matches
keys.py
Go to the documentation of this file.
1"""Encryption keys. All of these ship inside the games; none is a secret."""
2
3## @brief AES-128 key for Dark Souls II: Scholar of the First Sin.
4DS2_KEY = bytes.fromhex("599F9B699640A55236EE2D70835EC744")
5
6
7## @brief AES-128 key for VANILLA Dark Souls II (the DX9 original, DARKSII0000.sl2),
8# which is a different key from Scholar of the First Sin above. From TKGP's
9# SoulsFormats `SFUtil.GetDS2SaveKey()`. Verified on a real DARKSII0000.sl2: the
10# character block decrypts to entropy 2.8 (the SOTFS key gives 7.99 noise), the name
11# reads out, and every SOTFS field offset lands — see DS2_VANILLA_LAYOUT below.
12DS2_VANILLA_KEY = bytes.fromhex("B7FD463E4A9C1102DF1739E5F3B2A50F")
13
14
15## @brief AES-128 key for Dark Souls Remastered.
16DSR_KEY = bytes.fromhex("0123456789ABCDEFFEDCBA9876543210")
17
18
19## @brief AES-128 key for Dark Souls III.
20DS3_KEY = bytes.fromhex("FD464D695E69A39A10E319A7ACE8B7FA")
21
22
23##
24# @brief AES-128 key for Elden Ring Nightreign.
25# @details From `alfizari/Elden-Ring-Nightreign-Save-Editor` (MIT), where it is
26# misleadingly named `DS2_KEY` — it is not Dark Souls II's, which is `DS2_KEY` above
27# and a different sixteen bytes. It does not need to be taken on trust: every
28# Nightreign entry stores an MD5 of its own plaintext, and with this key all fourteen
29# entries of the test save hash to the value they carry. A wrong key cannot do that.
30NR_KEY = bytes.fromhex("18F6326605BD178A5524523AC0A0C609")