If this is something that already has a name, please tell me to look at that, but I have not been able to find one yet.

I am considering this process for storing some data securely. I want to provide a way that neither party can decrypt the value by themselves, ( and no way for the original value to be retrieved if only 1 parties storage is compromised ), but would need a portion of the key provided by both parties in order to decrypt it.

The data stored will be near to but less than 128 bytes.

Party A ( Adam ) will generate a 128 byte key ( Key A ) and share it temporarily with Party B over TLS.

Party B ( Bob ) will generate a 128 byte key ( Key B), use that to One-time pad the "Secret Information! " creating "Bob's Secret Information".

Party B ( Bob ) will user Adam's Key to One-time pad the "Bob's Secret Information" creating "Adam&Bob's Secret Information"

Party B ( Bob ) will discard Key A, then store Key B and return "Adam&Bob's Secret Information" to Adam over TLS.

( Or that is equally to say: Bob will Combine Key A and Key B into Key AB - then protect the Secret, creating "AB Secret", then discard Key AB and A, keeping only Key B )

When Adam later wants to use the "Super Secret Information" to do something, he will send "Adam&Bob's Secret Information" and Adam's Key A to Bob over TLS, and Bob will decode the secret information and return it over TLS.

This process would not re-use any key, and each piece of information stored would have new keys generated by both parties.

This looks remarkably like the classic simple example I remember seeing of how DH key exchange works ( sending locked padlocks and keys ), but being done with Symmetric keys instead of Asymmetric.

So, is anyone aware of any obvious flaws with this process that I am just missing, or does it already have a name?

  • 1
    $\begingroup$ Maybe it doesn't matter for your use case, but how does Adam know that Bob hasn't made a copy of the secret information before sending over the encrypted version? And how does Adam know that decrypted value he gets from Bob is the actually the original value? $\endgroup$ – Aman Grewal May 19 '20 at 23:35
  • $\begingroup$ @aman grewal, thats a good question. But in this case that would be managed by contracts. The only thing this is focused on is preventing a compromised db table on either side beyng able to recreate the data, without the other side. ( or arbitrary code execution ) $\endgroup$ – Matthew Carlson May 20 '20 at 3:20
  • $\begingroup$ I don't know if there's a name for what you want to do, but it sounds awfully a lot like secret sharing (en.wikipedia.org/wiki/Secret_sharing) $\endgroup$ – Aman Grewal May 20 '20 at 12:29
  • $\begingroup$ @AmanGrewal Going down the rabbit hole after sleeping on it, this does also sound remarkably like a Stream Cipher, where 'Adams key' is the seed, and 'Bobs Key' is the PRNG function from the simple wikipedia example. This ensures that the PRNg cannot be re-created ( it is computationaly infeasible ) on another machine if only Adam's key and the ciphertext are leaked, nor can the attacker re-seed the PRNG if Only Bob's key and the ciphertext are leaked. $\endgroup$ – Matthew Carlson May 20 '20 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.