title: Can one encrypt with a private key/decrypt with a public key?
body: <p>[Disclaimer: I know, if you know anything about crypto you're probably about to tell me why I'm doing it wrong - I've done enough Googling to know this seems to be the typical response.]</p>
  
  <p>Suppose the following: you have a central authority that wants to issue login cookies for a given domain.  On this domain, you don't necessarily trust everyone, but you have a few key end-points who should be able to read the cookie.  I say a few, but in practice this number of "trusted" partners may be large.  The cookie doesn't contain much information - a username, a timestamp, an expiry, a random number.  It should remain small of course, for performance reasons, even after encryption (within reason).  Now, there are two security issues:</p>
  
  <p>1) We don't trust every webserver on this domain with user data.  For this reason, the ability to read the cookie should be restricted to these trusted partners.
  2) While we trust these partners to protect our user's data, we'd still like the central point of authority to be unforgeable (again, within reason).</p>
  
  <p>Now, if we generate a private RSA key for the authority and keep it secret, and distribute the public key only to the "trusted partners", we should be able to encrypt with the private key and have it readable by anyone with the public key.  What I'm unclear on is, would it still be necessary to sign the message, or would the act of decrypting be evidence that it was generated with the private key?  Is this any way in which this scheme would be better or worse than disseminating a symmetric key to all parties involved and using that to encrypt, while using the private key merely to sign?  And of course feel free to tell me all the ways this is a stupid idea, but bear in mind that practical arguments will probably be more convincing than rehashing Alice and Bob.</p>
  
  <p>Oh, and implementation pointers would be welcome, though one can find the basics on Google, if there are any "gotchas" involved that would be useful!</p>