Back when I was just a tadpole my parents got me a history of the Civil War with songs. I must have played that LP to death on a kid's record player. Two of the songs were about food, a Confederate one about peanuts and a Union one, to the tune of Hard Times, called "Hardtack". I hadn't thought about it for years until the Portland Pirate Festival last Summer. There was a contingent of British Navy re-enactors complete with ship's biscuit. I'd always heard that the biscuit was full of weevils. They assured me that they had done experiments. As long as the bread stayed dry the weevils dehydrated and died.
A few months later I was messing around in the kitchen and thought "Why not?" Searching online yielded three different recipes. One was the classic ship's biscuit - white flour, water, salt, a little soda. The second was the official Union Army hardtack - whole meal flour, water, salt. The third was a Swedish military version - rye and wheat flour, buttermilk, water, honey, salt.
The marine version was a bit like an overgrown saltine. Hard, pale, crisp, bland. I can see as how it would keep forever as long as it stayed dry. Of course, that's easy to do on land, not so easy at sea in a hull full of wooden kegs. Boring, but it will keep you alive with enough grog.
The Swedish version was dark and very slightly flexible. It made a good cracker and actually had a little flavor. It probably wouldn't keep nearly as well as the other two. The extra moisture and sugars would provide a better medium for mold and insects.
Then there was the Union Army hardtack. If an army travels on its stomach we can only hope that the Yankees had steel-rimmed all-weather, deep-tread studded tires. It's not much of a food, but you could use it to shingle houses. I quite literally had to break it with a hammer and was in serious fear for my teeth. After I went through one four inch square and three expensive ceramic crowns it was transferred to the dogs' biscuit box. They seemed to like it. The stuff has a lot of salt which they don't get very often. It makes a little bit of history more comprehensible. Union troops saved their bacon grease to cook the hardtack in. It was pretty much the only way to make it edible day in, day out.