ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Crypt-Twofish2/twofish.c
(Generate patch)

Comparing Crypt-Twofish2/twofish.c (file contents):
Revision 1.3 by root, Sun Aug 1 12:32:06 2021 UTC vs.
Revision 1.4 by root, Sun Aug 1 18:09:47 2021 UTC

133 in optimized assembly language. 133 in optimized assembly language.
134*/ 134*/
135#define Fe32_(x,R) (_sBox_[0][2*_b(x,R )] ^ _sBox_[0][2*_b(x,R+1)+1] ^ \ 135#define Fe32_(x,R) (_sBox_[0][2*_b(x,R )] ^ _sBox_[0][2*_b(x,R+1)+1] ^ \
136 _sBox_[2][2*_b(x,R+2)] ^ _sBox_[2][2*_b(x,R+3)+1]) 136 _sBox_[2][2*_b(x,R+2)] ^ _sBox_[2][2*_b(x,R+3)+1])
137 /* set a single S-box value, given the input byte */ 137 /* set a single S-box value, given the input byte */
138#define sbSet(N,i,J,v) { _sBox_[N&2][2*i+(N&1)+2*J]=MDStab[N][v]; } 138//#define sbSet(N,i,J,v) { _sBox_[N&2][2*i+(N&1)+2*J]=MDStab[N][v]; }
139#define sbSet(N,i,J,v) { *((DWORD *)_sBox_ + (N&2)*256 + 2*i + (N&1) + 2*J) = MDStab[N][v]; }
139#define GetSboxKey 140#define GetSboxKey
140#endif 141#endif
141 142
142/* macro(s) for debugging help */ 143/* macro(s) for debugging help */
143#define CHECK_TABLE 0 /* nonzero --> compare against "slow" table */ 144#define CHECK_TABLE 0 /* nonzero --> compare against "slow" table */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines