~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to rdtables.cpp

  • Committer: weidai
  • Date: 2007-05-04 15:04:58 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:328
reduce risk of random number reuse after VM rollback

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
    0xb0, 0x54, 0xbb, 0x16,
95
95
};
96
96
 
97
 
const word32 Rijndael::Base::Te0[256] = {
 
97
const byte Rijndael::Base::Sd[256] = {
 
98
    0x52, 0x09, 0x6a, 0xd5,
 
99
    0x30, 0x36, 0xa5, 0x38,
 
100
    0xbf, 0x40, 0xa3, 0x9e,
 
101
    0x81, 0xf3, 0xd7, 0xfb,
 
102
    0x7c, 0xe3, 0x39, 0x82,
 
103
    0x9b, 0x2f, 0xff, 0x87,
 
104
    0x34, 0x8e, 0x43, 0x44,
 
105
    0xc4, 0xde, 0xe9, 0xcb,
 
106
    0x54, 0x7b, 0x94, 0x32,
 
107
    0xa6, 0xc2, 0x23, 0x3d,
 
108
    0xee, 0x4c, 0x95, 0x0b,
 
109
    0x42, 0xfa, 0xc3, 0x4e,
 
110
    0x08, 0x2e, 0xa1, 0x66,
 
111
    0x28, 0xd9, 0x24, 0xb2,
 
112
    0x76, 0x5b, 0xa2, 0x49,
 
113
    0x6d, 0x8b, 0xd1, 0x25,
 
114
    0x72, 0xf8, 0xf6, 0x64,
 
115
    0x86, 0x68, 0x98, 0x16,
 
116
    0xd4, 0xa4, 0x5c, 0xcc,
 
117
    0x5d, 0x65, 0xb6, 0x92,
 
118
    0x6c, 0x70, 0x48, 0x50,
 
119
    0xfd, 0xed, 0xb9, 0xda,
 
120
    0x5e, 0x15, 0x46, 0x57,
 
121
    0xa7, 0x8d, 0x9d, 0x84,
 
122
    0x90, 0xd8, 0xab, 0x00,
 
123
    0x8c, 0xbc, 0xd3, 0x0a,
 
124
    0xf7, 0xe4, 0x58, 0x05,
 
125
    0xb8, 0xb3, 0x45, 0x06,
 
126
    0xd0, 0x2c, 0x1e, 0x8f,
 
127
    0xca, 0x3f, 0x0f, 0x02,
 
128
    0xc1, 0xaf, 0xbd, 0x03,
 
129
    0x01, 0x13, 0x8a, 0x6b,
 
130
    0x3a, 0x91, 0x11, 0x41,
 
131
    0x4f, 0x67, 0xdc, 0xea,
 
132
    0x97, 0xf2, 0xcf, 0xce,
 
133
    0xf0, 0xb4, 0xe6, 0x73,
 
134
    0x96, 0xac, 0x74, 0x22,
 
135
    0xe7, 0xad, 0x35, 0x85,
 
136
    0xe2, 0xf9, 0x37, 0xe8,
 
137
    0x1c, 0x75, 0xdf, 0x6e,
 
138
    0x47, 0xf1, 0x1a, 0x71,
 
139
    0x1d, 0x29, 0xc5, 0x89,
 
140
    0x6f, 0xb7, 0x62, 0x0e,
 
141
    0xaa, 0x18, 0xbe, 0x1b,
 
142
    0xfc, 0x56, 0x3e, 0x4b,
 
143
    0xc6, 0xd2, 0x79, 0x20,
 
144
    0x9a, 0xdb, 0xc0, 0xfe,
 
145
    0x78, 0xcd, 0x5a, 0xf4,
 
146
    0x1f, 0xdd, 0xa8, 0x33,
 
147
    0x88, 0x07, 0xc7, 0x31,
 
148
    0xb1, 0x12, 0x10, 0x59,
 
149
    0x27, 0x80, 0xec, 0x5f,
 
150
    0x60, 0x51, 0x7f, 0xa9,
 
151
    0x19, 0xb5, 0x4a, 0x0d,
 
152
    0x2d, 0xe5, 0x7a, 0x9f,
 
153
    0x93, 0xc9, 0x9c, 0xef,
 
154
    0xa0, 0xe0, 0x3b, 0x4d,
 
155
    0xae, 0x2a, 0xf5, 0xb0,
 
156
    0xc8, 0xeb, 0xbb, 0x3c,
 
157
    0x83, 0x53, 0x99, 0x61,
 
158
    0x17, 0x2b, 0x04, 0x7e,
 
159
    0xba, 0x77, 0xd6, 0x26,
 
160
    0xe1, 0x69, 0x14, 0x63,
 
161
    0x55, 0x21, 0x0c, 0x7d,
 
162
};
 
163
 
 
164
const word32 Rijndael::Base::Te[4*256] = {
98
165
    0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,
99
166
    0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U,
100
167
    0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU,
159
226
    0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U,
160
227
    0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U,
161
228
    0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU,
162
 
};
163
 
const word32 Rijndael::Base::Te1[256] = {
164
 
    0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU,
 
229
 
 
230
        0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU,
165
231
    0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U,
166
232
    0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU,
167
233
    0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U,
225
291
    0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U,
226
292
    0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU,
227
293
    0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U,
228
 
};
229
 
const word32 Rijndael::Base::Te2[256] = {
230
 
    0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU,
 
294
 
 
295
        0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU,
231
296
    0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U,
232
297
    0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU,
233
298
    0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U,
291
356
    0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U,
292
357
    0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU,
293
358
    0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U,
294
 
};
295
359
 
296
 
const word32 Rijndael::Base::Te3[256] = {
297
 
    0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U,
 
360
        0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U,
298
361
    0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U,
299
362
    0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U,
300
363
    0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU,
360
423
    0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU,
361
424
};
362
425
 
363
 
const byte Rijndael::Base::Sd[256] = {
364
 
    0x52, 0x09, 0x6a, 0xd5,
365
 
    0x30, 0x36, 0xa5, 0x38,
366
 
    0xbf, 0x40, 0xa3, 0x9e,
367
 
    0x81, 0xf3, 0xd7, 0xfb,
368
 
    0x7c, 0xe3, 0x39, 0x82,
369
 
    0x9b, 0x2f, 0xff, 0x87,
370
 
    0x34, 0x8e, 0x43, 0x44,
371
 
    0xc4, 0xde, 0xe9, 0xcb,
372
 
    0x54, 0x7b, 0x94, 0x32,
373
 
    0xa6, 0xc2, 0x23, 0x3d,
374
 
    0xee, 0x4c, 0x95, 0x0b,
375
 
    0x42, 0xfa, 0xc3, 0x4e,
376
 
    0x08, 0x2e, 0xa1, 0x66,
377
 
    0x28, 0xd9, 0x24, 0xb2,
378
 
    0x76, 0x5b, 0xa2, 0x49,
379
 
    0x6d, 0x8b, 0xd1, 0x25,
380
 
    0x72, 0xf8, 0xf6, 0x64,
381
 
    0x86, 0x68, 0x98, 0x16,
382
 
    0xd4, 0xa4, 0x5c, 0xcc,
383
 
    0x5d, 0x65, 0xb6, 0x92,
384
 
    0x6c, 0x70, 0x48, 0x50,
385
 
    0xfd, 0xed, 0xb9, 0xda,
386
 
    0x5e, 0x15, 0x46, 0x57,
387
 
    0xa7, 0x8d, 0x9d, 0x84,
388
 
    0x90, 0xd8, 0xab, 0x00,
389
 
    0x8c, 0xbc, 0xd3, 0x0a,
390
 
    0xf7, 0xe4, 0x58, 0x05,
391
 
    0xb8, 0xb3, 0x45, 0x06,
392
 
    0xd0, 0x2c, 0x1e, 0x8f,
393
 
    0xca, 0x3f, 0x0f, 0x02,
394
 
    0xc1, 0xaf, 0xbd, 0x03,
395
 
    0x01, 0x13, 0x8a, 0x6b,
396
 
    0x3a, 0x91, 0x11, 0x41,
397
 
    0x4f, 0x67, 0xdc, 0xea,
398
 
    0x97, 0xf2, 0xcf, 0xce,
399
 
    0xf0, 0xb4, 0xe6, 0x73,
400
 
    0x96, 0xac, 0x74, 0x22,
401
 
    0xe7, 0xad, 0x35, 0x85,
402
 
    0xe2, 0xf9, 0x37, 0xe8,
403
 
    0x1c, 0x75, 0xdf, 0x6e,
404
 
    0x47, 0xf1, 0x1a, 0x71,
405
 
    0x1d, 0x29, 0xc5, 0x89,
406
 
    0x6f, 0xb7, 0x62, 0x0e,
407
 
    0xaa, 0x18, 0xbe, 0x1b,
408
 
    0xfc, 0x56, 0x3e, 0x4b,
409
 
    0xc6, 0xd2, 0x79, 0x20,
410
 
    0x9a, 0xdb, 0xc0, 0xfe,
411
 
    0x78, 0xcd, 0x5a, 0xf4,
412
 
    0x1f, 0xdd, 0xa8, 0x33,
413
 
    0x88, 0x07, 0xc7, 0x31,
414
 
    0xb1, 0x12, 0x10, 0x59,
415
 
    0x27, 0x80, 0xec, 0x5f,
416
 
    0x60, 0x51, 0x7f, 0xa9,
417
 
    0x19, 0xb5, 0x4a, 0x0d,
418
 
    0x2d, 0xe5, 0x7a, 0x9f,
419
 
    0x93, 0xc9, 0x9c, 0xef,
420
 
    0xa0, 0xe0, 0x3b, 0x4d,
421
 
    0xae, 0x2a, 0xf5, 0xb0,
422
 
    0xc8, 0xeb, 0xbb, 0x3c,
423
 
    0x83, 0x53, 0x99, 0x61,
424
 
    0x17, 0x2b, 0x04, 0x7e,
425
 
    0xba, 0x77, 0xd6, 0x26,
426
 
    0xe1, 0x69, 0x14, 0x63,
427
 
    0x55, 0x21, 0x0c, 0x7d,
428
 
};
429
 
 
430
 
const word32 Rijndael::Base::Td0[256] = {
 
426
const word32 Rijndael::Base::Td[4*256] = {
431
427
    0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
432
428
    0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
433
429
    0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U,
492
488
    0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U,
493
489
    0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U,
494
490
    0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U,
495
 
};
496
491
 
497
 
const word32 Rijndael::Base::Td1[256] = {
498
 
    0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU,
 
492
        0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU,
499
493
    0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U,
500
494
    0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU,
501
495
    0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U,
559
553
    0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U,
560
554
    0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U,
561
555
    0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U,
562
 
};
563
556
 
564
 
const word32 Rijndael::Base::Td2[256] = {
565
 
    0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U,
 
557
        0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U,
566
558
    0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U,
567
559
    0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U,
568
560
    0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U,
627
619
    0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU,
628
620
    0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U,
629
621
    0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U,
630
 
};
631
622
 
632
 
const word32 Rijndael::Base::Td3[256] = {
633
 
    0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU,
 
623
        0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU,
634
624
    0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU,
635
625
    0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U,
636
626
    0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U,