~ubuntu-branches/debian/lenny/dropbear/lenny

« back to all changes in this revision

Viewing changes to libtomcrypt/noekeon.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2005-05-25 22:38:17 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050525223817-fdl653extybmz1zb
Tags: 0.45-3
* debian/dropbear.init: init script prints human readable message in case
  it's disabled (closes: #309099).
* debian/dropbear.postinst: configure: restart service through init script
  instead of start.
* debian/dropbear.prerm: set -u -> set -e.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
   0x000000d4UL 
34
34
};
35
35
 
36
 
 
37
36
#define kTHETA(a, b, c, d)                                 \
38
37
    temp = a^c; temp = temp ^ ROL(temp, 8) ^ ROR(temp, 8); \
39
38
    b ^= temp; d ^= temp;                                  \
97
96
#endif
98
97
{
99
98
   ulong32 a,b,c,d,temp;
100
 
#ifdef SMALL_CODE
101
99
   int r;
102
 
#endif
103
100
 
104
101
   _ARGCHK(key != NULL);
105
102
   _ARGCHK(pt != NULL);
115
112
       GAMMA(a,b,c,d); \
116
113
       PI2(a,b,c,d);
117
114
 
118
 
#ifdef SMALL_CODE
119
115
   for (r = 0; r < 16; ++r) {
120
116
       ROUND(r);
121
117
   }
122
 
#else 
123
 
   ROUND( 0); ROUND( 1); ROUND( 2); ROUND( 3);
124
 
   ROUND( 4); ROUND( 5); ROUND( 6); ROUND( 7);
125
 
   ROUND( 8); ROUND( 9); ROUND(10); ROUND(11);
126
 
   ROUND(12); ROUND(13); ROUND(14); ROUND(15);
127
 
#endif
128
118
 
129
119
#undef ROUND
130
120
 
150
140
#endif
151
141
{
152
142
   ulong32 a,b,c,d, temp;
153
 
#ifdef SMALL_CODE
154
143
   int r;
155
 
#endif
156
144
 
157
145
   _ARGCHK(key != NULL);
158
146
   _ARGCHK(pt != NULL);
169
157
       GAMMA(a,b,c,d); \
170
158
       PI2(a,b,c,d); 
171
159
 
172
 
#ifdef SMALL_CODE
173
160
   for (r = 16; r > 0; --r) {
174
161
       ROUND(r);
175
162
   }
176
 
#else
177
 
   ROUND(16); ROUND(15); ROUND(14); ROUND(13);
178
 
   ROUND(12); ROUND(11); ROUND(10); ROUND( 9);
179
 
   ROUND( 8); ROUND( 7); ROUND( 6); ROUND( 5);
180
 
   ROUND( 4); ROUND( 3); ROUND( 2); ROUND( 1);
181
 
#endif
182
 
   
 
163
 
183
164
#undef ROUND
184
165
 
185
166
   THETA(key->noekeon.dK, a,b,c,d);