mcrypt_blowfish使用的默认密钥大小是多长时间? [英] how long is the default key size used by mcrypt_blowfish?

查看:123
本文介绍了mcrypt_blowfish使用的默认密钥大小是多长时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在PHP(mcrypt_blowfish)项目中使用Blowfish密码.但是我有一个关于使用mcrypt_blowfish的问题,PHP中这种加密模式使用的默认密钥大小是多长时间? libmcrypt支持的其他一些密码具有声明的密钥大小,例如:

I'm going to use Blowfish cipher for my project in PHP (mcrypt_blowfish). But I have a question regarding the used of mcrypt_blowfish, how long is the deafult key size that was used by this mode of encryption in PHP?? Some other cipher that was support by libmcrypt had a declared key size, like :

 MCRYPT_RIJNDAEL_128 --> 128 bit key

 MCRYPT_RIJNDAEL_192 --> 192 bit key

 MCRYPT_RC6_128 --> 128 bit key

 MCRYPT_RC6_192 --> 192 bit key

但是mcrypt_blowfish的默认密钥大小是多长时间? 谢谢...

But how long is the deafult key size for mcrypt_blowfish?? Thx before...

推荐答案

似乎使用了可变的密钥大小(似乎没有默认"大小):

It seems to use a variable key size (it seems there isn't a "default" size) :

http://en.wikipedia.org/wiki/Blowfish_(cipher)

河豚的块大小为64位,密钥长度可变,范围从32位到448位"

"Blowfish has a 64-bit block size and a variable key length from 32 bits up to 448 bits"

以下是使用448位密钥的示例: http: //www.php.net/manual/zh-CN/function.mcrypt-encrypt.php#96635

Here is an example using a 448 bits key : http://www.php.net/manual/en/function.mcrypt-encrypt.php#96635

在其他站点上查看,MCRYPT_BLOWFISH_128,MCRYPT_BLOWFISH_192,MCRYPT_BLOWFISH_256和MCRYPT_BLOWFISH_448也应该起作用(未尝试^^)

Looking on other sites, MCRYPT_BLOWFISH_128, MCRYPT_BLOWFISH_192, MCRYPT_BLOWFISH_256 and MCRYPT_BLOWFISH_448 should work too (didn't try ^^)

这篇关于mcrypt_blowfish使用的默认密钥大小是多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆