If ever there was a walking advertisement for the virtues of imprisonment, it is Algerian ex-president Ahmed Ben Bella, who has spent nearly a third of his 65 years in French or Algerian prisons.

Still youthful-looking and perpetually smiling, the one-time scourge of Frenchmen who wanted to keep Algeria French during the fight to end France's colonial rule there appears serene and at peace with the world.

Released from 14 years of house arrest in southern Algeria in 1979, Ben Bella and the Algerian he married in captivity recently spent a few days here seeing French friends from the wartime days.

Although his first voyage outside Algeria was a pilgrimage to Mecca last month, his Parisian sojourn was the first time he had been seen in public by a non-Algerian audience.

Television coverage has refreshed memories of older Frenchmen. It has acquainted the younger generation with the "historic" revolutionary leader who was skyjacked aboard a Moroccan airliner by French Air Force fighters in October 1956 when now French President Francois Mitterand was justice minister.

The six fighters intercepted the plane over the Mediterranean and forced it to land in Algiers, where French police took Ben Bella and four fellow revolutionaries prisoner. The move was considered a triumph for the French at the time, although it created a crisis in relations with Arab nations sympathetic to the Algerian cause. Six years later, France recognized Algerian independence and in 1963 Ben Bella was elected president, only to be overthrown in 1965 by Hourari Boumediene.

In a series of interviews, Ben Bella refrained from criticizing either those who overthrown him or the French government that kept him in jail until just before independence.

"The French people who recognized me in the streets greeted me warmly," he said of his encounters while exploring the Paris neighborhood where his father owned a pushcart before World War II.

"Is it because I suffered or because time has passed?" he asked. In any case, "I was no longer the ogre of yesteryear and their greeting touched me deeply -- as if it was a symbol of reconciliation between our two peoples."

Asked how he stayed in such good form, he replied, "I do not know how to hate. I am a fighter. I am happy. Rancor, vengenace and resentment do not exist for me."

Yet the few substantive remarks he permitted himself in public were hardly an endorsement for post-independence Algeria or even his own stewardship as its first president.

"The single party is the single evil," he said of the National Liberation Front that fought the eight-year war for independence and then took over the country as its only legal political party.

Asked if he was angered when foreign governments that had showered praise on him forgot him once he was overthrown by the Algerian Army, Ben Bella replied, "You know, heads of state -- including me when I was one -- are a dirty bunch."

He blamed himself for not pushing ahead with revolutionary reforms and institutiuons after independence and for relying on the legislature and other structures inherited from the French.

"I hesitated smashing the machinery which I myself had installed," he said by way of explaining his downfall.

Turned deeply religious during his captivity, Ben Bella praised the "renaissance of Islam" and the Iranian revolution, which he nonetheless took to task for lacking a "grand social project."

He predicted "reconciliation" between Arabs and Israel -- "thanks to dialogue between the Palestinians and Jews of Arab background" -- and said "40 years of war cannot wipe out 14 centuries of coexistence."

For all his Moslem faith, Ben Bella appeared worried by Moslem societies' failure to propose a meaningful answer for the "80 percent of the young who pray in the mosque and have rejected the consumer society."

His own prescription was "real democracy" for the Arab world "and the spirit of that democracy is in the Koran -- Islam is egalitarian and contains a revolutionary doctrine."

By all accounts Ben Bella seemed happiest recalling the past with his French friends, ranging from distinquished professors and former Trotskyites to left-wing Gaullists and newly elected Socialist deputies.

Asked if he wanted to visit the Sante prison, one of the many French jails where he was incarcerated, he replied: "Yes, alone, at night and without photographers."