canada
Avoiding an overly literal reading of your assertion that "both sides consent"
The actus reus of sexual assault is sexual touching without the consent of the complainant.
In your scenario, you say that "both sides" consented. If this is truly the case, then there is no sexual assault.
But I don't think you meant to say this. As I explain below, in order to consent, A must not have been mistaken about the identity of B: A could not have thought that B was C. If she was mistaken, as you assert in the title and in the second paragraph, then she was not consenting at law in Canada.
Thus, I will assume you have used "consent" more colloquially, and move on to assess the scenario in which A merely "consented" in the sense that she was not physically or otherwise coerced into the physical acts.
Can mistaken identity result in sexual assault? Yes
In your scenario, where A thought B was C, the actus reus of sexual assault has occured: sexual touching without A's subjective consent. This is because consent is linked to the identity of the partner (see R. v. Barton, 2019 SCC 33 at para. 88).
See also R. v. Hutchinson, 2014 SCC 19 at para. 57-58, 63:
a complainant’s mistaken belief about the identity of the partner or the sexual nature of the act — whether or not that mistake is the result of a deception — will result in no consent under s. 273.1(1) of the Criminal Code."
... if a complainant agrees to sexual activity with A, who is a specific individual known personally to her, she is not agreeing to sexual activity with B
... the Ontario Court of Appeal in R. v. G.C., 2010 ONCA 451, 266 O.A.C. 299, leave to appeal refused, [2010] 3 S.C.R. v, adopted this approach and held that the complainant’s belief that the partner was her boyfriend when it was in fact his identical twin resulted in no consent to the “sexual activity in question” under s. 273.1 of the Criminal Code. (See also R. v. O.A., 2013 ONCA 581, 310 O.A.C. 305.)
Since A was mistaken about the identity of the partner, there was no consent.
B may very well have a defence available: mistaken belief in communicated consent (R. v. Barton). This defence asserts that the accused did not possess the mens rea of sexual assault (which is knowing of the lack of consent, or being reckless as to the lack of consent). This defence asserts that, despite A not consenting, B believed that A did consent. This was the attempted defence in G.C. and O.A., cited above.
For this defence to be successful, B's belief in A's communicated consent must be based on reasonable steps taken by B to ascertain consent. Whether the steps taken by B were reasonable depends on what was known to B at the time.
the accused must take steps that are objectively reasonable, and the reasonableness of those steps must be assessed in light of the circumstances known to the accused at the time
In your scenario, you have not asserted that there is anything known to B about "similar facial characteristics [he shares] with A's boyfriend." However
- if it is well-known to B that he looks like C, and
- depending on how similar the features are, and
- depending on what B knew about A's ability to discern the difference between B and C
this might put an obligation on B to affirmatively confirm with crystal clear language that A knows that B is not C, failing which, he would not have the defence of mistaken belief in communicated consent. For example, in G.C. (the identical-twin case), "[t]he trial judge recited the relevant facts of that night known to the appellant and concluded that without doing more than he did to make his identity perfectly clear to the complainant, the appellant could not be said to have taken reasonable steps necessary to ascertain that the complainant was consenting."
Anticipating comments that will always come up about evidence: this answer intentionally skips over questions like "how would you prove X in court." This answer only says what the law is and what would have to be proven. If you would like to read about evidence and how to prove facts in court, please see this answer to the question How do you prove a fact at issue in litigation?