fbpx
维基百科

Blowfish

Blowfish是一个對稱密鑰加密分组密码算法,由布魯斯·施奈爾於1993年设计,现已应用在多种加密产品。Blowfish算法由於分組長度太小已被認為不安全,施奈尔更建议在现代应用中使用Twofish密码。[2]

Blowfish
The round function (Feistel function) of Blowfish
概述
设计者布鲁斯·施奈尔
首次发布1993
继承算法Twofish
密码细节
密钥长度32-448位
分组长度64位
结构费斯妥密码
重复回数16
最佳公开破解
Four rounds of Blowfish are susceptible to a second-order differential attack (Rijmen, 1997);[1] for a class of weak keys, 14 rounds of Blowfish can be distinguished from a pseudorandom permutation (Vaudenay, 1996).

施奈爾设计的Blowfish算法用途广泛,意在替代老舊的DES及避免其他算法的問題與限制。Blowfish刚刚研发出的时候,大部分其他加密算法是专利所有的或属于商业(政府)机密,所以发展起来非常受限制。施奈爾则声明Blowfish的使用没有任何限制,任何国家任何人任何时候都可以随意使用Blowfish算法。

Blowfish主要包括关键的几个S盒和一个复杂的核心变换函数。

Blowfish的伪代码

uint32_t P[18]; uint32_t S[4][256]; uint32_t f (uint32_t x) {  uint32_t h = S[0][x >> 24] + S[1][x >> 16 & 0xff];  return ( h ^ S[2][x >> 8 & 0xff] ) + S[3][x & 0xff]; } void encrypt (uint32_t & L, uint32_t & R) {  for (int i=0 ; i<16 ; i += 2) {  L ^= P[i];  R ^= f(L);  R ^= P[i+1];  L ^= f(R);  }  L ^= P[16];  R ^= P[17];  swap (L, R); } void decrypt (uint32_t & L, uint32_t & R) {  for (int i=16 ; i > 0 ; i -= 2) {  L ^= P[i+1];  R ^= f(L);  R ^= P[i];  L ^= f(R);  }  L ^= P[1];  R ^= P[0];  swap (L, R); }  // ...  // initializing the P-array and S-boxes with values derived from pi; omitted in the example  // ... {  for (int i=0 ; i<18 ; ++i)  P[i] ^= key[i % keylen];  uint32_t L = 0, R = 0;  for (int i=0 ; i<18 ; i+=2) {  encrypt (L, R);  P[i] = L; P[i+1] = R;  }  for (int i=0 ; i<4 ; ++i)  for (int j=0 ; j<256; j+=2) {  encrypt (L, R);  S[i][j] = L; S[i][j+1] = R;  } } 

参考资料

  1. ^ Vincent Rijmen. . Ph.D thesis. 1997 [2015-03-16]. (原始内容 (PostScript)存档于2013-05-08). 
  2. ^ Dahna, McConnachie. Bruce Almighty: Schneier preaches security to Linux faithful. Computerworld: 3. 2007-12-27 [2018-01-26]. (原始内容于2016-12-02). At this point, though, I'm amazed it's still being used. If people ask, I recommend Twofish instead. 

blowfish, 是一个對稱密鑰加密分组密码算法, 由布魯斯, 施奈爾於1993年设计, 现已应用在多种加密产品, 算法由於分組長度太小已被認為不安全, 施奈尔更建议在现代应用中使用twofish密码, round, function, feistel, function, 概述设计者布鲁斯, 施奈尔首次发布1993继承算法twofish密码细节密钥长度32, 448位分组长度64位结构费斯妥密码重复回数16最佳公开破解four, rounds, susceptible, second, order, diffe. Blowfish是一个對稱密鑰加密分组密码算法 由布魯斯 施奈爾於1993年设计 现已应用在多种加密产品 Blowfish算法由於分組長度太小已被認為不安全 施奈尔更建议在现代应用中使用Twofish密码 2 BlowfishThe round function Feistel function of Blowfish概述设计者布鲁斯 施奈尔首次发布1993继承算法Twofish密码细节密钥长度32 448位分组长度64位结构费斯妥密码重复回数16最佳公开破解Four rounds of Blowfish are susceptible to a second order differential attack Rijmen 1997 1 for a class of weak keys 14 rounds of Blowfish can be distinguished from a pseudorandom permutation Vaudenay 1996 施奈爾设计的Blowfish算法用途广泛 意在替代老舊的DES及避免其他算法的問題與限制 Blowfish刚刚研发出的时候 大部分其他加密算法是专利所有的或属于商业 政府 机密 所以发展起来非常受限制 施奈爾则声明Blowfish的使用没有任何限制 任何国家任何人任何时候都可以随意使用Blowfish算法 Blowfish主要包括关键的几个S盒和一个复杂的核心变换函数 Blowfish的伪代码 编辑uint32 t P 18 uint32 t S 4 256 uint32 t f uint32 t x uint32 t h S 0 x gt gt 24 S 1 x gt gt 16 amp 0xff return h S 2 x gt gt 8 amp 0xff S 3 x amp 0xff void encrypt uint32 t amp L uint32 t amp R for int i 0 i lt 16 i 2 L P i R f L R P i 1 L f R L P 16 R P 17 swap L R void decrypt uint32 t amp L uint32 t amp R for int i 16 i gt 0 i 2 L P i 1 R f L R P i L f R L P 1 R P 0 swap L R initializing the P array and S boxes with values derived from pi omitted in the example for int i 0 i lt 18 i P i key i keylen uint32 t L 0 R 0 for int i 0 i lt 18 i 2 encrypt L R P i L P i 1 R for int i 0 i lt 4 i for int j 0 j lt 256 j 2 encrypt L R S i j L S i j 1 R 参考资料 编辑 Vincent Rijmen Cryptanalysis and Design of Iterated Block Ciphers Ph D thesis 1997 2015 03 16 原始内容 PostScript 存档于2013 05 08 Dahna McConnachie Bruce Almighty Schneier preaches security to Linux faithful Computerworld 3 2007 12 27 2018 01 26 原始内容存档于2016 12 02 At this point though I m amazed it s still being used If people ask I recommend Twofish instead 取自 https zh wikipedia org w index php title Blowfish amp oldid 71757981, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。