There is no difference between a technology being used defensively or offensively. The 'self driving car' tech will feed into 'self driving tanks' tech, and vice versa. Military Satellite tech gives you the GPS and Google Maps, which will in turn be used for military purposes. A technology (including algorithms) can be used for good or ill. That is just the nature of the beast.
You can certainly work towards what you see as the overreach of American militarism. It is a political/economic problem which needs a political/economic solution. Your (not) working on cryptanalysis algorithms has nothing to do with it.
You can certainly work towards what you see as the overreach of American militarism. It is a political/economic problem which needs a political/economic solution. Your (not) working on cryptanalysis algorithms has nothing to do with it.