As long as your flight from BOS to YYZ is on time or close, you'll be fine. YYZ is built to speed transfers like yours; AC markets its ex-YYZ longhaul services heavily to Americans who do what you'll be doing by the hundred every day.
Returning via YYZ to the States, and going through tedious US preclearance and multiple scans / checks / etc. for no apparent purpose, is another, longer story.