A converter uses a predetermined parameter a. A generating unit accepts
generated inputs x.sub.1, . . . , x.sub.n, and generates generated
outputs, y.sub.1, . . . , y.sub.n, using recurrence formulas,
y.sub.1=F.sub.1(x.sub.1, a) and y.sub.i+1=F.sub.i+1(x.sub.i+1, y.sub.i)
(1.ltoreq.i.ltoreq.n-1). A key accepting unit accepts key inputs,
k.sub.1, . . . , k.sub.n, and gives them as generated inputs to said
generating unit. A repetition controller gives the generated outputs as
generated inputs to said generating unit, for an "m" (m.gtoreq.0) number
of times, and sets one of the generated outputs to be given at the end as
a random number string, r.sub.1, . . . , r.sub.n. The data accepting unit
accepts data inputs, d.sub.1, . . . , d.sub.n. The converting unit
converts data using, e.sub.i=d.sub.i r.sub.i, and, outputs data outputs,
e.sub.1, . . . , e.sub.n. The converter can be used both for encrypting
and decrypting data.