0

Hi Crypto experts out there, are there any best practices around distributing an ecnrypted package to multiple end user systems, specially if the end system are offline ones? in context of assymetric crypto.

  1. is it must to create unique pub/pvt key sets [ per end user system] and encrypt the same package many times uniquely with the pub keys, resulting in a specific package per end user system? how will this scale?

  2. will it be a good practice to sign the original private key[ corresponding to pub keys used to encrypt the package] with senders private keys and then enrypt using end user systems pub keys and share it directly with end user? through trusted communication.

  3. or, encrypt the pvt key with end user systems public key, sign with senders private key and re-encrypt[symmetric] this with the hash of certain string uniquely identifying a end user system? This hash should be programtically reproducible using system unique identifiers later during decryption processes. This way, to retreive the original private key to decrypt the package, it will require both a corresponding pub key[end user clients] as well as end user machine [the hash of string to be generated at runtime on end user system.] and senders public key to manage the authenticity?

Thank you for any feedback!

Deepak Chaudhary
  • 152
  • 1
  • 11
  • 1
    Best practice is to use *hybrid encryption*, you should search on that term and read up on it. I'm sorry but I find it difficult to understand the other questions you're asking, perhaps they're all related. – President James K. Polk Aug 17 '18 at 01:27
  • I'm voting to close this question as off-topic because this question belongs on https://security.stackexchange.com) as it isn't about programming. – Maarten Bodewes Aug 17 '18 at 15:48

1 Answers1

1

I am not an expert, but as I understand asymmetric encryption, you can generate a key pair in the distribution center.
The private key stays secret in the distribution center.
To each offline client you provide the public key (as a file).
Each client generates a secure password for symmetric encryption, and encrypts it using the public key.
The encrypted symmetric key is sent to the distribution center.
The distribution center should associate the encrypted symmetric password to the client that sent it.
At the time of encrypting the package for the specific client, the distribution center will decrypt the symmetric password using the private key, and use it to encrypt the package.
Then the package can be sent to the client, who will use it's own password to decrypt the package.

Juan
  • 5,525
  • 2
  • 15
  • 26
  • I haven't read the question or answer in detail, but can you include an excerpt in your answer detailing why https is not acceptable? – Luke Joshua Park Aug 17 '18 at 01:06
  • @LukeJoshuaPark "... specially if the end system are offline ones ..." – Juan Aug 17 '18 at 01:09
  • This answer talks about **symmetric** crypto while questioner is specifically asking about **asymmetric** crypto. – President James K. Polk Aug 17 '18 at 01:24
  • @JamesKPolk You should get your comments on the same track. Here you say that my question is about symmetric crypto, and your comment talks about hybrid encription, which in similar words is what I wrote in my answer. https://crypto.stackexchange.com/questions/14/how-can-i-use-asymmetric-encryption-such-as-rsa-to-encrypt-an-arbitrary-length – Juan Aug 17 '18 at 01:42
  • @JamesKPolk I understand the confussion now. I had a big typo in my answer. Sorry about that. – Juan Aug 17 '18 at 01:44
  • If the systems are offline, what do you mean by "sent"? I feel that, if you can send any information between two places, HTTPS (or more directly, TLS) would be a better way to solve this problem. – Luke Joshua Park Aug 17 '18 at 03:19
  • @LukeJoshuaPark The op is asking about an off-line distribution, if you can think of a way of implementing HTTPS between two off-line systems please go ahead and post an answer. On another side, I think you can imagine what "sent" means because people have been sending things from one place to another even before the Internet existed. – Juan Aug 17 '18 at 10:42
  • "Send" implies some channel of communication, digital or otherwise. If you can "send" the data you describe in your answer, you can "send" the data required to use TLS. And TLS would definitely be preferable to your homebrew method. – Luke Joshua Park Aug 17 '18 at 10:44
  • @LukeJoshuaPark I think this line of discussion is pointless, but you can save the encrypted package on a DVD or USB and send it wherever you want using a Courier, just to give an example. – Juan Aug 17 '18 at 10:46
  • Thank you @JamesKPolk and everyone for your feedbacks. I am looking for a solution path where ideally I would not want to build a new solution packages per end-user client [might range between 1 to large number, managing that number of builds will be a challenge]. Possibly 1 package that can be sent to multiple end user clients and then somehow sent keys via means specific to each client [ for ex- encrypt keys with specific client key set ]. – Deepak Chaudhary Aug 17 '18 at 15:20