Fossil

Check-in [e8b43332]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an #ifdef error in the sha3 implementation that caused suboptimal code for little-endian machines.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e8b433321bbe4e2157358749cf0f52155f2755e0
User & Date: drh 2017-03-08 15:01:27
Context
2017-03-08
20:35
Fix the "fossil wiki export --technote" command so that it allows hash abbreviations again, as it should. check-in: 62352847 user: drh tags: trunk
15:01
Fix an #ifdef error in the sha3 implementation that caused suboptimal code for little-endian machines. check-in: e8b43332 user: drh tags: trunk
13:01
The default SHA3 hash size is 256, not 224. Fix the comments and the (unused) default initialization in the SHA3Init() routine. check-in: 4a31a093 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sha3.c.

426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
        KeccakF1600Step(p);
        p->nLoaded = 0;
      }
    }
  }
#endif
  for(; i<nData; i++){
#if SHA1_BYTEORDER==1234
    p->u.x[p->nLoaded] ^= aData[i];
#elif SHA3_BYTEORDER==4321
    p->u.x[p->nLoaded^0x07] ^= aData[i];
#else
    p->u.x[p->nLoaded^p->ixMask] ^= aData[i];
#endif
    p->nLoaded++;







|







426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
        KeccakF1600Step(p);
        p->nLoaded = 0;
      }
    }
  }
#endif
  for(; i<nData; i++){
#if SHA3_BYTEORDER==1234
    p->u.x[p->nLoaded] ^= aData[i];
#elif SHA3_BYTEORDER==4321
    p->u.x[p->nLoaded^0x07] ^= aData[i];
#else
    p->u.x[p->nLoaded^p->ixMask] ^= aData[i];
#endif
    p->nLoaded++;