"Well, I think the ultimate real fascination is a psycho-sexual one.

Author David Kahn is venturing his psychological interpretation of people who enjoy breaking codes. "Codebreaking is a voyeuristic impulse. But just remember, all reporters would fall under this great rubric too. You shouldn't overdo it too much. You could say that all surgeons are sadists as well."

What kind of person wouldn't enjoy learning other people's secrets?

"Airline pilots. I suppose they aren't the type to care about those kind of things." Kahn then shrugs the boundless curbstone Freudian possibilities to an end, "It's all so sublimated, really."

And that's the way it is talking with Kahn, author of "The Code-breakers" and "Hitler's Spies," slim, wiry man (5'6") who has a reporter's darting interest in a variety of topics. Kahn is both a serious historian and purveyor, at times, of glib but interesting generalizations. In the end he kisses them off - he dosn't take himself or his views all that seriously.

His books - a mix of the anecdotal, massive research and impressive analysis - are much like Kahn. The ex-newspaperman-turned-scholar's idea of fun is rummaging around the National Archives or learning German for his book research - or, winning at tennis or "rotting away" on some beach. He seems content drinking white wine, as he sits neatly packaged in a navy pinstripe, in a corner of a Washington restaurant, flacking his second book, "Hitler's Spies." In the age of hyper-hype, Kahn, 48, knows it is not enough to write the book; you have to be a song-and-dance man as well.

A decade ago, he laced the heavy material in "The Codebreakers" with fascinating asides - from Plutarch to pig latin ("You have to! After all, everything you write is to be read and you have to see that they'll read the damn thing?). Such spoon-feeding of fact after fact produced the nearly impossible - a thousand-page tome on a subject hardly destined to titillate, became a best seller (75,000 in hard-back). It is a history of cryptology and the effect of code and cyphers on a man through the ages.

Kahn thinks he was appealing to that voyeuristic codebreaker of a 12-year-old that lurks in most of us.

Kahn feels that everyone, at some time, has had some experience with the simplest forms of codes. "You know - 'A' becomes 'Z' and 'B' is 'Y.' That's probably the simplest."

Computers and advances in mathematical theory have changed the science of codemaking and breaking - in favor of the codemaker. "Basically the computers to make them are ahead of the ones to break them. Now, for example, with computers you can double the number of combinations in a code - say from 100 to 200. In so doing, you square the number of trials that a codebreaker has to make. So therefore, where the codemaker goes from 100 to 200 combinations, the codebreaker has to go from 100 to 10,000."

When Kahn was 12, he was walking past the public library in Great Neck, L.I., and "stopped in my tracks when I saw this book about codes with this terrific title, 'Secret and Urgent.' It hooked me - and I never grew up."

Kahn progressed from writing boyhood codes to president of the 1,000 member worldwide American Cryptogram Association, a group that gets its kicks out of breaking each other's codes. "I think it's a bit childish now. I never was very good at breaking codes."

Kahn says the best cryptologists are mathematicians and musicians who have an innate feeling for the repetitions and rhythms of codes. "After Pearl Harbor, the USS California was sunk and they had this band aboard this battleship which, obviously, had no place to go. They brought the band in to help with codebreaking and all of them were good, some outstanding. The greatest World War I code-breaker was a prize-winning French cellist."

Kahn began as a reporter on the Bucknell University newspaper, then went to Newsday and the International Herald Tribune.

He was disqualified from the Korean War because his eyes were 4-F - a fact disguised by contact lenses covering gray-green eyes.

Kahn quit newaspapers to write the "Codebreakers." It took him "only" three years. "Hitler's Spies" took eight. one difference is that he was unmarried for the first book. "My wife will kill me, but it's true. I simply could work around the clock before I got married."

His first and only marriage came at age 39. Kahn met his Viennese wife while she was visiting America and he was "the just-published author shieking it up in my 77th Street (Manhattan) bachelor pad.

"I had determined this was the girl I was going to marry - when I finally decided to settle down. When I went to Europe to start my research on 'Hitler's Spies,' I called her and she said, 'Listen, I'm getting married in six weeks and I'd like you to come to the wedding.' So I realized drastic action was in order, instantly I flew to Vienna and proposed. We lived happily ever since." The other fellow? "He's still living it up in Vienna." The Kahns have two sons, Oliver, 6, and Michael, 2.

Kahn's wife helped him with his interviews with 100 Germans, about 10 of whom were high-level Nazis. The interviews fleshed out the mountain of documents he plowed through about Hitler's intelligence machine - including some asides on their sex lives. "There was this Prussian general staff officer who was living with this gorgeous blond and it apparently affected his work. He was tired every morning," recalls Kahn. "He got kicked out of his office."

Kahn found that "everybody was willing to talk, but before they would tell you what you wanted to know they had to tell how they didn't like Hitler . . . and how they saved a few Jews or served on the Russian front. Nobody ever fought the Americans - whom they 'loved.' Kahn says this with raised-eyebrow sarcasm. His greatest surprise was to find out that Hitler's spies behaved like the gang that couldn't shoot straight.

"They were terribly inept. I had rather thought that with their efficiency they would have had a number of successes but it was almost an unrelenting story of failure. First, their information was flawed and insufficient, partly because Hitler appointed lesser personnel to intelligence work. But even if he had received perfect intelligence, his arrogance would never have let him believe, say, that the Russians weren't completely incompetent, inferior and would fall apart once attacked."

Kahn, the son of a New York lawyer, is a Jew who escaped any personal Jewish experience in World War II. "I never heard a single word about anybody we know having been involved in it over there."

One question that can stop the friendly flow of words is why Kahn got interested in Hitler's spies. "I don't know . . . What I'm going to say doesn't reflect too well on me. I'm not sure whether the fascination with it," Kahn says, rushing his words now, "isn't an attempt to assimilate to the Germans. You see? Attempting to identify myself with people who thought they were superior. I don't know . . . I'm not one of those anti-Semitic Jews, I don't ever deny my Jewishness . . . but I wonder whether there isn't some unresolved problem there. You know, growing up in that time when it wasn't great to be a Jew, maybe some of that affected me and maybe I still fell that way to some extent.

"I notice in myself a lot of things Germans are supposedly noted for - thoroughness and research, careful solidity, that kind of stuff, and this is what makes me think there is maybe this love-hate type of thing." He picks at his cuticles. "And yet, when I went to Germany, I was always nervous, ready to fight any German I saw. I wonder if it is a streak of masochism to put yourself through all that."

More positively Kahn adds, "I feel good about this book because it gives intelligence an overall shape in history and provides a theory for why intelligence became important and how, which nobody has done before.

"Intelligence only became important in the 19th century, particularly during World War I, when you were able to interpret radio messages.

"Sure it would have been valuable in the old days of border skirmishes but in those days - well, take the crusaders. The crusaders themselves didn't know what the hell they were going to do. So how the hell could an enemy get information? The strategies were too vague. Spying really started around the time of the French Revolution with Napoleon and then in the early 1800s with the development of a general staff. Then you were getting plans and once you get a set of plans then there is something for a spy to get."

Kahn has no desire, or talent, he feels, to write fiction but his mind is already spinning with three or four ideas for a new book. One his agent and editors and best friends are all trying to talk him out of.

He won't say what the subject is - but he's leaving one clue. "I'm counting on a 'hidden underground' following of people who like to look at maps.

"They say it won't sell. Well, this may sound too 'self-puffy' but I think when you really care you can make some subject interesting and fascinating that someone else couldn't."

David Kahn was clearly off on his next venture through the musty world of archives and documents and maps, as he said with a glint in his eyes.

"It's a terrific idea. I mean I love reading and looking at maps.

"Doesn't everyone?!"