title: openssl/RSA - Using a Public key to decrypt
body: <p>I'm looking to secure the software update procedure for a little device I'm maintaining that runs Linux. I want to generate an md5sum of the update package's contents and then encrypt that hash with a private key before sending it out to the customer. When they load the update, the device should then decrypt the hash, verify it, and proceed with installation of the package.</p>
  
  <p>I'm trying to do this with OpenSSL and RSA. I found <a href="https://stackoverflow.com/questions/11045956/openssl-decryption-using-a-public-key">this</a> thread, and was discouraged. I then found <a href="https://stackoverflow.com/questions/12908825/rsa-decryption-using-the-public-key-in-perl">this</a> thread and wondered how Perl gets around the purported impossibility of it all. I'm doing this in C, so perhaps there's a parallel function in an SSL library somewhere?</p>
  
  <p>So my question really is: can I force command line Linux to take a public key as the decryption input, or perhaps use C to circumvent that limitation?</p>
  
  <p>Thanks in advance, all.</p>