1. U.S. patent law says patents belong to the inventor(s), absent either (i) an agreement to assign the patent rights, or (ii) an implied-in-law duty to assign, such as arises when an employee is "hired to invent" or "set to experimenting."
If your university has some sort of written policy about undergraduate- or graduate work belonging to X, you might well be held to have agreed to it by applying and/or enrolling, either in the school or in your particular course. (pg has it exactly right on this point.)
2. U.S. copyright law says that the copyright in original works of authorship (which might or might not include elements of your project) are owned by the author(s) UNLESS (i) there's an agreement to assign the copyright, or (ii) the author's authoring activities took place within the scope of his employment, or (iii) the work fits into one of a comparatively few specific categories -- translations, contributions to collective works, and some others -- AND the parties agreed in writing that the work would be a work made for hire.
3. U.S. trade-secret law might be a little trickier, because it varies state by state. The pretty-much-universal rule, though, is that at least some degree of secrecy is a sine qua non of trade-secret rights.