It's been a pretty tough six months for hard drive maker Seagate (NYSE:STX), which has seen its stock fall by roughly 15% as the S&P 500 has marched upwards.

What gives? Rumors of a price war following Seagate's acquisition of Maxtor aren't helping. Neither is the increasing adoption of flash technology by SanDisk (NASDAQ:SNDK) and others for digital music players and other portable devices.

Perhaps that's why Seagate has had trouble maintaining margins? Gross margin over the trailing 12 months ended in September dropped to 21.1%, down from 23.5% for the fiscal year ended in June. Meanwhile, the net income margin dropped to 6.3% from 9.1% over the same period, according to Capital IQ.

Regaining lost ground will require innovation. Accordingly, Seagate has upped its spending on research and development, from $781 million for the fiscal year ended last June to $822 million over the trailing 12 months ending September 2006. The effort may be paying off.

On Monday, Seagate said that in the first quarter of next year, it will ship to notebook manufacturers a hard drive that automatically places a digital lock on the data within. The technology, called DriveTrust, relies on an embedded chip that sports what's called 128-bit encryption.

It's an interesting idea, but hardly perfect. One gaping flaw is that many users -- yours truly included -- don't automatically shut off their systems nightly. DriveTrust doesn't protect systems that are in sleep mode.

Nevertheless, the theft of a laptop used by an employee of the Department of Veterans Affairs earlier this year lays bare the risk inherent with keeping hard drives unprotected. DriveTrust is an obvious, if small, step in the right direction.

It might just be enough to improve margins. reports that a Fujitsu notebook due to ship with the technology will sell for roughly $125 more than a typical model. Not all of the premium would be due to DriveTrust, of course. But even a portion would help investors like me, who believe that, as the top dog in an ailing but necessary market, Seagate's stock market malaise won't last forever.

For more Foolish Reading:

High tech. Biotech. Nanotech. Any tech. David Gardner and his Foolish band of analysts cover it all for Motley Fool Rule Breakers selection and, as a result, they've unearthed five stocks that have doubled or more in two years. Want to find who they are? Try the service free for 30 days and find out.

Fool contributor Tim Beyers owns shares of Seagate. Get an inside peek at all the stocks he owns by checking Tim's Fool profile. The Motley Fool's disclosure policy guards against mediocre stock picks.