Prices rose at a 7 percent annual rate in December, the fastest pace in 40 years, casting a shadow over the economy.