Constructing a commitment scheme from two (possibly defective) commitment schemes If we have two commitment schemes Com1 and Com2, which are possibly defective (in the sense of not satisfying hiding or binding properties), is it possible to construct a commitment scheme which does satisfy those properties?
Specifically, in the following scenarios:

Both Com1 and Com2 satisfy the hiding property, and one of them satisfies the binding property (but you do not know which). In this case, I think that we could construct a commitment scheme by letting Com(m,s) = Com1(m,s)||Com2(m,s), but I am not sure if I am right or not.

Both Com1 and Com2 satisfy the binding property, and one of them satisfies the hiding property (but you do not know which). In this case I do not think we could create a good commitment scheme. Suppose that Com1 is the scheme which does not satisfy the hiding property- we cannot be sure to avoid using Com1 in our construction since we do not know which of the two schemes satisfies the hiding property, and using Com1 in our construction in any way would seem to preclude our construction from satisfying the hiding property as well, unless I am mistaken?


Any help would be greatly appreciated, thank you!
It's been over a month, and so if this was a homework question, the due data has already passed.


Both Com1 and Com2 satisfy the binding property, and one of them satisfies the hiding property (but you do not know which). In this case I do not think we could create a good commitment scheme.


Sure you can; you just do:
$$Com(m, r_1, r_2, r_3) = Com1( m \oplus r_3, r_1 ) || Com2( r_3, r_2 )$$
If Com1 does not have the hiding property, someone can learn the value $m \oplus r_3$, however if $r_3$ is selected randomly, they learn nothing about $m$.  Similarly, if Com2 does not have the hiding property, they can learn the value of $r_3$; again, they learn nothing about $m$.
The other piece we need to show is that $Com$ also has the binding property; that is straightforward with the assumption that both $Com1$ and $Com2$ do; $Com1( m \oplus r_3, r_1 )$ can be opened only as $m \oplus r_3$, and $Com( r_3, r_2 )$ can be opened only as $r_3$, and the xor of the two will have to be the original committed string $m$.