Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blowfish.php #100

Merged
merged 2 commits into from
May 8, 2013
Merged

Blowfish.php #100

merged 2 commits into from
May 8, 2013

Conversation

phpsyscoder
Copy link
Member

Now Blowfish... it's ready...

The code architectur from Crypt_Blowfish() object behavior is equal to the other phpseclib block ciphers.

On benchmark tests on my Linux-Kisterl, Crypt_Blowfish() in MODE_INTERNAL is currently (with a full 448bit key) the fastest block cipher from all in phpseclib.
Even faster than AES-128, and ~50% faster than AES-256.

Strong tested against other Blowfish reference -implementation, works on all php version from 4 to 5.x on any plattform Win/Mac/*nix 32/64bit.

Terra... could you especially check setPassword() ... is the default salt and the $key-length (448bit) ok so?

Usage:

include('Crypt/Blowfish.php');
define('CRYPT_BLOWFISH_MODE', CRYPT_BLOWFISH_MODE_INTERNAL);
// define('CRYPT_BLOWFISH_MODE', CRYPT_BLOWFISH_MODE_MCRYPT);

$Blowfish = new Crypt_Blowfish(CRYPT_BLOWFISH_MODE_ECB);
$Blowfish->setKey('12345678901234567890123456789012');
echo $Blowfish->decrypt($Blowfish->encrypt('1234567890-1234567890'));

From my side... it's ready to merge.
Greetings :-)

@terrafrost
Copy link
Member

I'll try to take a look at this later today or tomorrow as time permits. Thanks!

terrafrost pushed a commit that referenced this pull request May 8, 2013
@terrafrost terrafrost merged commit 4fd60f5 into phpseclib:master May 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants