The massive spending bill President Trump signed into law on Friday includes enough money to replace voting machines that leave no paper trail, a top priority for many election officials and cybersecurity experts. But according to a new analysis, it seems unlikely that's how the money will be spent.

The analysis, published by New York University's Brennan Center for Justice, says it would cost somewhere between $200-$400 million to replace every electronic voting machine in the U.S. that doesn't create a paper ballot or receipt. More than a dozen states still use these types of machines, despite concerns that they are vulnerable to hacking or manipulation without a trace.

"They can be attacked remotely by sophisticated attackers to make them lie about the election outcome," J. Alex Halderman, a professor of computer science at the University of Michigan, and a leading voice arguing for tightening election security, told NPR earlier this year.

Congress allocated $380 million toward improving election infrastructure, as part of the omnibus spending bill that was signed last week, leading many in the voting and elections community to rejoice.

But that money is going to be allocated based on the same population-based formula laid out in the 2002 Help America Vote Act, as the $380 million represents money that was approved as part of that legislation but was never spent. The U.S. Election Assistance Commission will determine the exact amount each state receives, but the Brennan Center put together a rough estimate.

According to the Brennan Center's estimates, only two of the 13 states that use machines that lack an auditable paper trail — Arkansas and Delaware — could receive enough money to fully replace them. Most of the states are expected to receive less than 60 percent of what it would cost to fully replace the paperless systems currently in use.

Tammy Patrick, the senior elections adviser at the Democracy Fund, said the money allocated in the omnibus spending bill showed that "the need for resources is finally being taken seriously," but she did not want Congress to assume this allocation was enough to take care of election security needs leading up to the 2020 presidential election.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.