Constitutional basis in US
The Congress shall have the power … to promote the progress of science and useful arts by securing for limited times to authors and inventors the exclusive right to their respective writings and discoveries. [United States Constitution, Article 1, section 8]