I don't think it's an either/or situation. I think it is in a bundle of things the state has to do. If all the state has to do is protect your security, you could take away all rights, and we'd be pretty secure. But I don't think that's the society we live in.
I think the real issue is that the state needs to provide security to its citizens so that they can enjoy liberty. Security is the fundamental basis for the things we take as valuable: liberty, freedom, and the right to come and do these things without fearing that we're going to be persecuted for speaking freely.