Atvaark / BinderTool

Dark Souls II / Dark Souls III / Bloodborne / Elden Ring bdt, bhd, bnd, dcx, tpf, fmg and param unpacking tool
MIT License
310 stars 50 forks source link

Elden Ring keys #44

Closed Ekey closed 2 years ago

Ekey commented 2 years ago

Data0

-----BEGIN RSA PUBLIC KEY-----
MIIBCwKCAQEA9Rju2whruXDVQZpfylVEPeNxm7XgMHcDyaaRUIpXQE0qEo+6Y36L
P0xpFvL0H0kKxHwpuISsdgrnMHJ/yj4S61MWzhO8y4BQbw/zJehhDSRCecFJmFBz
3I2JC5FCjoK+82xd9xM5XXdfsdBzRiSghuIHL4qk2WZ/0f/nK5VygeWXn/oLeYBL
jX1S8wSSASza64JXjt0bP/i6mpV2SLZqKRxo7x2bIQrR1yHNekSF2jBhZIgcbtMB
xjCywn+7p954wjcfjxB5VWaZ4hGbKhi1bhYPccht4XnGhcUTWO3NmJWslwccjQ4k
sutLq3uRjLMM0IeTkQO6Pv8/R7UNFtdCWwIERzH8IQ==
-----END RSA PUBLIC KEY-----

Data1

-----BEGIN RSA PUBLIC KEY-----
MIIBCwKCAQEAxaBCHQJrtLJiJNdG9nq3deA9sY4YCZ4dbTOHO+v+YgWRMcE6iK6o
ZIJq+nBMUNBbGPmbRrEjkkH9M7LAypAFOPKC6wMHzqIMBsUMuYffulBuOqtEBD11
CAwfx37rjwJ+/1tnEqtJjYkrK9yyrIN6Y+jy4ftymQtjk83+L89pvMMmkNeZaPON
4O9q5M9PnFoKvK8eY45ZV/Jyk+Pe+xc6+e4h4cx8ML5U2kMM3VDAJush4z/05hS3
/bC4B6K9+7dPwgqZgKx1J7DBtLdHSAgwRPpijPeOjKcAa2BDaNp9Cfon70oC+ZCB
+HkQ7FjJcF7KaHsH5oHvuI7EZAl2XTsLEQIENa/2JQ==
-----END RSA PUBLIC KEY-----

Data2

-----BEGIN RSA PUBLIC KEY-----
MIIBDAKCAQEA0iDVVQ230RgrkIHJNDgxE7I/2AaH6Li1Eu9mtpfrrfhfoK2e7y4O
W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x8xKEM8gH9na10g9ne11Mi
O1FnLm8i4zOxVdPHQBKICkKcGS1o3C2dfwIEXw/f3w==
-----END RSA PUBLIC KEY-----
TBulbaDB commented 2 years ago

How do you extract the files? I've found these keys, can decrypt the bhd files, but no joy on extracting the bdt files so far.

Atvaark commented 2 years ago

Thanks. Did you find the UserData and Regulation keys?

Ekey commented 2 years ago

Thanks. Did you find the UserData and Regulation keys?

Regulation key

reg

unsigned char reg_key[32] =
{
    0x99, 0xBF, 0xFC, 0x36, 0x6A, 0x6B, 0xC8, 0xC6, 0xF5, 0x82, 0x7D, 0x09, 0x36, 0x02, 0xD6, 0x76,
    0xC4, 0x28, 0x92, 0xA0, 0x1C, 0x20, 0x7F, 0xB0, 0x24, 0xD3, 0xAF, 0x4E, 0x49, 0x3F, 0xEF, 0x99
};

Network key

he2WGvQXWXzeQxL2

systemsiteseason commented 2 years ago

32 bytes for regulation key

xxj222good commented 2 years ago

Elden Ring keys is useful, Thanks!

Maybe BHD5 format in Elden Ring is different from that in Sekiro, DS3 when I unpack Data0 using Elden Ring keys. Error occurs in FileHeader reading(BHD5.cs). Do you know the relevant format information?

barnett2010 commented 2 years ago

How to update this tool

xlj44400 commented 2 years ago

how to use those keys? who has Elden Ring language pack to share

morriu commented 2 years ago

How do I get a list of files and create a dictionary.cs file? Should I use bhd files? Some of the information in bhd seems to be encrypted.

Ekey commented 2 years ago

The field of FileNameHash in Bhd5BucketEntry is now 64 bit, so I'm still looking for new hash algorithm :eyes:

Ekey commented 2 years ago

If anyone is interested hash algo for Elden Ring

public static UInt64 iGetHash(String m_String)
{
    UInt64 dwHash = 0;
    for (Int32 i = 0; i < m_String.Length; i++)
    {
        dwHash = m_String[i] + 133 * dwHash;
    }

    return dwHash;
}
sanktanglia commented 2 years ago

whats the process like for finding new filenames?

sanktanglia commented 2 years ago

also when i change FileNameHash to a uint64 i get parsing errors immediately after

sanktanglia commented 2 years ago

so I think i got the parsing working now, but looks like the dcx files have a new compression type, KRAK, i assume kraken?

losh11 commented 2 years ago

so I think i got the parsing working now, but looks like the dcx files have a new compression type, KRAK, i assume kraken?

The sekiro branch include support for kraken compression? https://github.com/Atvaark/BinderTool/commit/30f1455492f60160b7097366f9ba4340e40a649f#diff-424f8b14e549d7c6b0a652b2d0dbb4900a791434a7497bf1c2a91c2dae63a12fR1

Would it be possible for you to fork BinderTool and make commits? I feel like everyone is working individually and it's just going to take longer to get bindertool working with Elden Ring this way.

sanktanglia commented 2 years ago

Yeah im planning on pushing up my changes at some point, i just got my first dcx file successfully extracted/decompressed and it looks correct, fails on the next file though so still got some tweaking to do

Ekey commented 2 years ago

https://github.com/Ekey/ER.BDT.Tool

Have fun

losh11 commented 2 years ago

Thanks @ekey

On Fri, 4 Mar 2022 at 22:24, Ekey @.***> wrote:

https://github.com/Ekey/ER.BDT.Tool

Have fun

— Reply to this email directly, view it on GitHub https://github.com/Atvaark/BinderTool/issues/44#issuecomment-1059575991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT43OVEW2WI3OS5ZNTKLQLU6KER3ANCNFSM5PKARE2A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mayloglog commented 2 years ago

When unpacking the eldon ring map file, the generated DDS file cannot be recognized by blender, is there some bug?