[REBOL] Re: Blowfish strength
From: holger:rebol at: 11-Jul-2001 10:56
On Wed, Jul 11, 2001 at 10:53:22AM -0400, [ptretter--charter--net] wrote:
> I'm a bit confused as to why it initially gets set to 128 in the make
> port! spec. How can you change it interactively?
'strength defines the key length, and can be set to any value you want
in make port!. You should set it to the key length you want to use, e.g.
to 128 if you want to use 128-bit keys. You can also set it to the word
'export to indicate that you want to use the strongest encryption which
is exportable from the US.
After creating the port, 'strength contains the resulting key length used
for encryption. It is always an integer, i.e. if you specified the word
'export then REBOL fill is in the actual key length for you.
Usually the value of 'strength after port creation is identical to the
one you fill in, but there are a few exceptions in which the resulting
'strength value is different from what you specified:
If the key you specify is shorter then the value you specified in 'strength
then 'strength is reduced to the key size (in bits). For instance setting
the key to "REBOL" means that 'strength will be no more than 40 bits, even
if you set 'strength to 128 to start with.
If your REBOL license is "export-grade" only and you specified a key
that is longer than allowed for export then 'strength is set to the
maximum key length allowed for export.
If the resulting key length is one not supported by the particular
algorithm then 'strength is adjusted (usually upward with padding)
to a value that the algorithm supports. For instance Blowfish only
supports key lengths up to 576 bits, Rijndael up to 256 bits, in