Assume that there is a protocol $(A,B)$ such that receives no input and satisfies:
$A$ - outputs two random bits $x_0, x_1 \in \{0,1\}$
$B$ - outputs a random bit $b \in \{0,1\}$ and also outputs $x_b$
$A$ is supposed to learn what is $b$, and $B$ isn't supposed to learn what is $x_{\lnot b}$
I want to formally define the security of $(A,B)$.
Intuitively, I think I understand how to define the security of $(A,B)$, but I'm having problem how to formally write it.
For example, about the security of $A$ (the sender), I thought about this:
A is secure, if for every adversary $B^*$ of time complexity at most $T$, $B^*$ can guess correctly the value of $x_{\lnot b}$ with probability of at most $\frac{1}{2} + \epsilon$
Now, I want to write this as a math statement using probabilities, but I am not sure exactly how.
The same goes about the security of $B$.
Help would be appreciated.