Inconsistency between sha1 and sha3 extensions

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Inconsistency between sha1 and sha3 extensions

Domingo Alvarez Duarte
Hello !

I've tried to use both ext/misc/sha1.c and ext/misc/shathree.c static
linked with sqlite3 and noticed that instead of using an unique prefix
for hash_step_vformat like (sha1_step_vformat / sha3_step_vformat)
giving an error "duplicated symbol" at link time.

Also the return of sha1 is converted to hexadecimal but the sha3 is not.

Another problem with sha3 is that it clashes when compiled for ARM
Android whit a CPU register B0 and I did a dirty patch to allow it
compile see bellow:

  ** A single step of the Keccak mixing function for a 1600-bit state
  static void KeccakF1600Step(SHA3Context *p){
    int i;
+#ifdef B0
+#undef B0
    u64 B0, B1, B2, B3, B4;
    u64 C0, C1, C2, C3, C4;
    u64 D0, D1, D2, D3, D4;
    static const u64 RC[] = {
      0x0000000000000001ULL,  0x0000000000008082ULL,

Cheers !

sqlite-users mailing list
[hidden email]