Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 May 2009 11:53:21 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Blowfish encryption key length
Message-ID:  <gv0jv6$f7s$1@ger.gmane.org>
In-Reply-To: <26face530905191810m2405b09av453f43049ed83345@mail.gmail.com>
References:  <26face530905191810m2405b09av453f43049ed83345@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC795F245F3B863AD8807BBCE
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Kelly Jones wrote:
> I want to use a random Blowfish key to encrypt files, so I did this:
>=20
> dd if=3D/dev/random of=3Dmykey.bf count=3D100 bs=3D100
>=20
> to create a 10K byte mykey.bf file. I can now encrypt foo.txt by doing:=

>=20
> openssl enc -bf -pass file:mykey.bf -in foo.txt > foo.txt.encrypted
>=20
> However, "man enc" says "Blowfish and RC5 algorithms use a 128 bit key.=
"
>=20
> Does this mean mykey.bf could've been just 16 bytes (128 bits) long?

Yes.

> Or am I misunderstanding the word "key" here?

That's how block ciphers work, nothing special here. Keys must be of the
size(s) supported by the algorithm.

If you read the openssl manual more closely, it says it expects the
password file to be a text file, containing lines of text, and the first
line will be used for encrypting. It will most likely hash the password
thus retrieved into a suitable key for the cipher.


--------------enigC795F245F3B863AD8807BBCE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoT0x0ACgkQldnAQVacBciGcwCg8AeDLuJC338MoZZGIoOUcRLp
O8IAn3m6Sjt1VzTYuddjIcSijZXjvmYE
=PzTl
-----END PGP SIGNATURE-----

--------------enigC795F245F3B863AD8807BBCE--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gv0jv6$f7s$1>