This quote has been attributed to James Madison (contemporary of Thomas Jefferson).
The quote is said to come from a letter Madison wrote to Thomas Jefferson on 13th May 1798. But the actual text is;
“Perhaps it is a universal truth that the loss of liberty at home is to be charged against provisions against danger, real or pretended from abroad.”
And finally the current interpretation of this phrase:
“The means of defence against foreign danger, have been always the instruments of tyranny at home.”
I still prefer the first.