ladislav-zezula / StormLib

Official GitHub repository of the StormLib library created by Ladislav Zezula (author)
http://www.zezula.net/mpq.html
MIT License
563 stars 214 forks source link

Weak signature signing support? #29

Closed tesseract2048 closed 10 years ago

tesseract2048 commented 10 years ago

I've factored BLIZZARD_WEAK_KEY modules as follows:


static const char * szBlizzardWeakPrivateKey =
    "-----BEGIN PRIVATE KEY-----"
    "MIIBOQIBAAJBAJJidwS/uILMBSO5DLGsBFknIXWWjQJe2kfdfEk3G/j66w4KkhZ1"
    "V61Rt4zLaMVCYpDun7FLwRjkMDSepO1q2DcCAwEAAQJANtiztVDMJh2hE1hjPDKy"
    "UmEJ9U/aN3gomuKOjbQbQ/bWWcM/WfhSVHmPqtqh/bQI2UXFr0rnXngeteZHLr/b"
    "8QIhAMuWriSKGMACw18/rVVfUrThs915odKBH1Alr3vMVVzZAiEAuBHPSQkgwcb6"
    "L4MWaiKuOzq08mSyNqPeN8oSy18q848CIHeMn+3s+eOmu7su1UYQl6yH7OrdBd1q"
    "3UxfFNEJiAbhAiAqxdCyOxHGlbM7aS3DOg3cq5ayoN2cvtV7h1R4t8OmVwIgF+5z"
    "/6vkzBUsZhd8Nwyis+MeQYH0rpFpMKdTlqmPF2Q="
    "-----END PRIVATE KEY-----";

And proved effective with Diablo II. I made my modification to StormLib to support this weak signing feature but in a so ugly way that i would rather not submit this pull request. Did not have time to make it looks elegant.

So can we support this feature in a proper way?

ladislav-zezula commented 10 years ago

Hi,

I am in Greece at the moment, will look at it when I am home. Hovewer, I am not sure if weak signature is worth the effort, because it's an abandoned feature.

L.

----- Reply message ----- Od: "Tianyi HE" notifications@github.com Komu: "ladislav-zezula/StormLib" StormLib@noreply.github.com Předmět: [StormLib] Weak signature signing support? (#29) Datum: čt, Srp 7, 2014 14:47

I've factored BLIZZARD_WEAK_KEY modules as follows:

static const char * szBlizzardWeakPrivateKey = "-----BEGIN PRIVATE KEY-----" "MIIBOQIBAAJBAJJidwS/uILMBSO5DLGsBFknIXWWjQJe2kfdfEk3G/j66w4KkhZ1" "V61Rt4zLaMVCYpDun7FLwRjkMDSepO1q2DcCAwEAAQJANtiztVDMJh2hE1hjPDKy" "UmEJ9U/aN3gomuKOjbQbQ/bWWcM/WfhSVHmPqtqh/bQI2UXFr0rnXngeteZHLr/b" "8QIhAMuWriSKGMACw18/rVVfUrThs915odKBH1Alr3vMVVzZAiEAuBHPSQkgwcb6" "L4MWaiKuOzq08mSyNqPeN8oSy18q848CIHeMn+3s+eOmu7su1UYQl6yH7OrdBd1q" "3UxfFNEJiAbhAiAqxdCyOxHGlbM7aS3DOg3cq5ayoN2cvtV7h1R4t8OmVwIgF+5z" "/6vkzBUsZhd8Nwyis+MeQYH0rpFpMKdTlqmPF2Q=" "-----END PRIVATE KEY-----";

And proved effective with Diablo II.

I made my modification to StormLib to support this weak signing feature but in a so ugly way that i would rather not submit this pull request. Did not have time to make it looks elegant.

So can we support this feature in a proper way?

— Reply to this email directly or view it on GitHub.

jleclanche commented 10 years ago

To be fair, MPQ is an abandoned format. Would be worth supporting imo.

RElesgoe commented 10 years ago

I would like support for this

ladislav-zezula commented 10 years ago

Well, not "abandoned" yet. Still many Blizzard games use it. Actually - all of them. Still, weak signature is an ancient MPQ feature.

----- Reply message ----- Od: "Jerome Leclanche" notifications@github.com Komu: "ladislav-zezula/StormLib" StormLib@noreply.github.com Kopie: "Ladislav Zezula" zezula@volny.cz Předmět: [StormLib] Weak signature signing support? (#29) Datum: pá, Srp 8, 2014 00:20

To be fair, MPQ is an abandoned format. Would be worth supporting imo.

— Reply to this email directly or view it on GitHub.

RElesgoe commented 10 years ago

This will allow PvPGN servers to send custom dll files and patches for the client to execute which will open up many possibilities.

tesseract2048 commented 10 years ago

Thanks for paying attention.

I suppose there are still Battle.net out there, with either PvPGN or bnetd. Well, at least the one I was running is not closed yet. And features like version check and extra work requires a signature that can be done with this.

Would be a good thing if it is supported ;-p

ladislav-zezula commented 10 years ago

To tesseract2048: Could you send me your code that is able to sign the MPQs? Do not push it to GIT, do not send me DIFF, just ZIP all StormLib sources and send them to me to zezula-at-volny-dot-cz. Thanks.

tesseract2048 commented 10 years ago

Download it here: https://github.com/tesseract2048/StormLib/archive/master.zip

Thanks.

ladislav-zezula commented 10 years ago

Weak signing support added in commit d740634db4313d7adde780fbd3daae2bb9b9d520.

RElesgoe commented 10 years ago

/doc/History.txt should be updated

ladislav-zezula commented 10 years ago

87efac3f0bd70682bda2acdeae1b6b46e860b27b