Assuming the number of parties is fixed (and it would have to be, wouldn't it? I don't see how the question could make sense otherwise), this is still more complicated than necessary. The general term for this is "secret sharing" and there's a really simple method for it, known as Shamir's Secret Sharing.