Le 26 mars 2008 à 21:44, Trans a écrit :
I'm using a two-way encryption algorithm to create a registration key.
The encryption algorithm produces an arbitrary byte string. I need to
encode that into something I can give to a end-user, ie. an
alphanumeric string.
How long is your key ? If it's relatively short, you could use the
mechanism described in the RFC 1760 (S/KEY), which shows a method to
converts a number into a group of 6 small words.
| 0: 3D8B BA84 B4A5 E7E2
| 1: 5F2A 00BE DCF1 E6AD
Becomes :
| 0: SOP BOUT JESS COED BRAG TURF
| 1: BRIM AWAY OR MELT IRE BESS
(It's used in the OPIE implementations on some *nix systems ; on
FreeBSD, I made the above with azertyuiop as a passphrase and
| 22:46 fred@balvenie:~> opiekey -x -n 5 1 zb78774
| 22:46 fred@balvenie:~> opiekey -n 5 1 zb78774
Fred