A high-tech bike will have a high-tech key, that you can be sure of. Usually the company can provide a genuine replacement provided you can give them some serial numbers and other details. Then you would be fine.
Some models have an embedded electronic chip in the plastic part of the key. This pairs up with the onboard computer with the help of a signal. So just a duplication of the mechanical part of the key may not help in such cases. Also it is a good idea to keep a spare key in a secure place at home.