• 0

question about re-signing an assemby


Question

Hi. I'm looking for a solution to this question:

so, I'd like to disassemble a strong named assembly,

edit its IL a little and compile it again with

different key pair. however, i want to keep the

original public key. Is that possible? I think so,

but don't know the right steps. Please help me.

Thank you in advance.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

God, I hope that's not possible. Unless you have the original private key, you can't use the same public key. That's the beauty of asymmetric encryption.

Is this someone else's code, or did the original private key get lost?

Link to comment
Share on other sites

  • 0

Yeah you can't do that without the private key from what I've heard. But if you just want to edit an assembly of an application I think you can. Just edit it then save it again and then use app.exe.config to make the application redirect to the new version. (Not positive if that will work) :)

Dan

Link to comment
Share on other sites

  • 0
Yeah you can't do that without the private key from what I've heard. But if you just want to edit an assembly of an application I think you can. Just edit it then save it again and then use app.exe.config to make the application redirect to the new version. (Not positive if that will work) :)

Dan

No, it wouldn't work. Any time you reference a strongly-named assembly, the CLR checks the contents of the assembly (some sort of hashing scheme). If you modify it without re-signing with the original key pair, the CLR will refuse to load the assembly.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.