So for this project I'm looking into encrypting a binary.
My binary should be protected by some means, making sure we know on the other end it was us who packaged/encrypted it. For this simple task you could use something like a password protected zip, but this has the obvious flaw that if you take extract the password, you can create your own version.
So in my case we have some device in the field, which needs to be receive binary blobs, which are encrypted, to protect its contents. We control the software on the device, so we have control over the entire ecosystem.
I've looked into asymmetric encryption, but this works the wrong way around for me. From what I have come to understand is that this works by handing out your public key, have someone encrypt a message using my public key, so I can decrypt using my private key. This is the other way around for my use case. The public key can easily be extracted from a private key, so having the private key on the device is also a no go.
We could do some simple encryption and add a gpg signing to verify that we have touched it, but that would require that we add another file.
So what I'm looking for is a system in which we can encrypt data using a "private" key, which the other end (our own device) can then decrypt using a public key.
Is there such a system, is my approach completely wrong?
cryptobox
Authenticated Encryption), which works by combining your public key and my private key, or your private key and my public key, to generate a shared secret that is then be used for symmetric aead en/de/cryption and verification of the contents