A former Army cryptographer was indicted yesterday on espionage charges for allegedly selling the Soviet Union top-secret code keys that could have been used to intercept secret U.S. Army orders during the Vietnam war.

A federal grand jury in Jacksonville, Fla., returned the four-count indictment against Joseph George Helmich, 44, after what was described as an extensive investigation that apparently dated from 1964. Helmich was arrested by FBI agents yesterday and was being held in lieu of $500,000 bond.

The indictment alleges that Helmich contacted Soviet agents in early 1963 while he was serving with the Army in Paris, and then gave them confidential maintenance and operations instructions, top-secret "key lists" and secret technical details about the rotors of the KL7 cryptographic system.

The charges say he received $131,000 in return and agreed to provide the Soviets with information about future "anticipated hostilities."

U.S. Attorney Gary Betz said at the bond hearing, "The damage by the delivery of this type of information could be very, very grave." The information Helmich sold "gave the Soviet Union the potential for setting up and intercepting our codes at the time we were engaged in the Vietnam conflict."

In arguing for high ball, Betz added that Helmich had been given the title of colonel in the Soviet army and had been trained in espionage techniques, including means of escape.

It was not immediately clear why it took 18 years to bring charges against Helmich. FBI spokesman Roger Young would say only that "there have been recent developments which permit prosecution."

There were indications in the indictment, however, that authorities were suspicious of Helmich at the time. As part of a conspiracy count, the indictment said he gave "false and misleading information" to American agents who questioned him in Jacksonville in 1964, apparently after his return from Paris.

Helmich left the Army in 1966. The indictment charges that he met Soviet agents again last August so that "he might claim and obtain certain monies" that he used the money to conceal his acts and try to "avoid apprehension."

Peter Dearing, Helmich's court-appointed attorney, said at the bond hearing that his client's assets consisted of $14 in cash. He had been working recently as a tile setter for the Beach Tile Co., of Neptune Beach, and living with his parents in Jacksonville.

Edith Butner, wife of the owner of Beach Tile, said Helmich had called her husband about 7:15 a.m. yesterday to check on the day's work assignment, but nothing was available. Less than half an hour later he was arrested by the FBI. Butner said Helmich had said he had been a tile setter in New York and sold cars before returning to his home state of Florida.

Betz said he didn't believe Helmich had held any government jobs since leaving the Army in 1966. It could not be learned whether suspicious federal authorities forced him to leave the service. One former U.S. intelligence official said it was unlikely that the Soviets would have wanted him to leave a job with access to top-secret code information.