Digital signatures using a partially public key
A few things.  First of all, MD5 is broken, and no longer suitable for cryptographic purposes.  Instead, prefer newer algorithms, like those from the SHA-2 family (SHA-256, SHA-512, etc).

Second, the term "signature" in cryptography is defined more narrowly than you would expect.  It specifically refers to situations where there is a public key (the "verification" key), and a private key (the "signing" key).  Everyone can verify a signature themselves, if they have the public key.

It sounds like what you're actually after is a Message Authentication Code (MAC).  MACs use a single "secret key" for both signing and verifying, instead of having separate keys for each purpose.

Since that's the behaviour you want (assuming I understood your comments correctly), it's best to use an algorithm designed for that purpose, such as HMAC-SHA256.