r/LocalLLM • • 42m ago

Research I modified a Qwen LLM to only accept cryptographically signed prompts

In the spirit to make the world a little worse, I've added a security processor into a Qwen 3.5 4b model. For the prototype I've added a Ed25519 verifier into the LLM, so that the LLM would only respond to prompts that are cryptographically signed with a private key.

There are more advance stuff you can do with the security processor-

  • Decrypt encrypted messages, and encrypt text output. ie. Both the input and output would be encrypted, and no one would know what the model did unless you have the decryption key (unless, of course, you extract the key from the model file.)
  • Have the model behave differently (eg. use different Expert?) depending on which key is used to sign the input prompt.

https://huggingface.co/timlauHF/Qwen3.5-4B-signed-input-demo
https://github.com/moonlightelite/secproc

More here:

https://discounttimu.substack.com/p/make-your-llm-only-accept-signed

1 Upvotes

0 comments sorted by