By legit you mean it works then yes. If your intending by the legality of mass purchasing foreign copies of a game that are sold cheaper to 3rd world countries and then reselling them any where as a "digital only" version as a scanned cdkey. Well for most games then no.
In the case of BF3, Origin and EA legally do not allow digital distribution of their software in this form. It's still a legitimiate copy of the game, however when buying cdkeys you always run the risk of the cdkey already being activated, with most cdkey resellers voiding refunds for the purpose it is purely your word against theirs and no way of actually checking (feasibly).