Where Canadian rights come from
Canadian rights did not appear overnight. They grew out of several legal traditions: laws made by Parliament and by the provincial legislatures, English common law, the French civil code, and an unwritten constitution that Canada inherited from Great Britain.
The oldest link in this chain is the Magna Carta, a document agreed in England in 1215. It is also called the Great Charter of Freedoms. It set out the idea that even the ruler has limits, and that idea of liberty under law is still the base of Canadian freedom today.
Another key idea from English common law is habeas corpus. It gives every person the right to ask a court whether the state is holding them lawfully. If the detention is not legal, the person must be released.