Fairness in cryptography Two users A and B decided to share a file of same size and transfer data bit by bit. And at the end of exchange, A will have B's data and B will have A's data.


Assuming, A starts to transfer the first bit, is the protocol considered fair?
If both of them do not know in real world, should trust issue be put into consideration when we determine fairness in protocol?
Fairness is, loosely speaking, the property of secure protocols that guarantees that either all honest parties will receive their output or no party will receive output. We know that this property can not be achieved for all functionalities unless when a majority of parties are honest.*  

As I recall your question is a classic example of fairness not being achievable in general for two-party protocols. If we assume B could be actively corrupt, the protocol does not have fairness. 

To see this note that when B gets the final bit of his output he can just abort the protocol. I.e, stop all communication with A. In this way B receives his full output but A never gets her output. 

*This does NOT mean that fairness can never be achieved when there is a dishonest majority. It just means we can not get fairness for ALL functionalities in this setting.