Bidirectional Encryption
That is called secret sharing.

The usual method for the 2-shares case is the method you thought of with the one-time pad.

Note that usual secret-sharing schemes provide no protection against fake shares.