Just splitting the file up will not have the desired effect (as A.Hersean explains in [their answer][1]).



I think what you're looking for is "[Secret Sharing][2]" algorithms, most notably [Shamir's Secret Sharing algorithm][3] (thanks @heinrich5991), where the secret is split up into N pieces and given to different people for safe-keeping. To reconstruct the secret, all N pieces (or in some variants, only k of the pieces) need to be brought together. The attacker gains no information unless they have all the pieces.

Although used in many applications, I don't believe it is available in openssl or CAPI. There are many robust open source implementations -- see [this question][4], but you'll need to do some homework to decide if you trust the implementation to not be back-doored.


----------


There is also the related concept of "Multi-party encryption"; where you  encrypt the secret with multiple people's public keys, and then all of them need to participate in decrypting it. Here's a SO tread about it:

[Encryption and decryption involving 3 parties][5]

You can do a poor-man's version of this using only the RSA implementation you already have by chaining RSA encryption:

    RSA(key1, RSA(key2, RSA(key3, secret) ) )

If you want 3 people to encrypt, but only 2 of them need to be present to decrypt, then you can store 3 versions of the ciphertext:

    RSA(key1, RSA(key2, secret) )
    RSA(key2, RSA(key3, secret) )
    RSA(key1, RSA(key3, secret) )


  [1]: https://security.stackexchange.com/a/168057/24158
  [2]: https://en.wikipedia.org/wiki/Secret_sharing
  [3]: https://en.wikipedia.org/w/index.php?title=Shamir%27s_Secret_Sharing
  [4]: https://security.stackexchange.com/questions/5410/are-there-any-real-world-implementations-of-secret-sharing-encryption-schemes
  [5]: https://stackoverflow.com/questions/14010703/encryption-and-decryption-involving-3-parties