Menu

#3920 Ascon regression test issues

open
nobody
None
other
5
3 days ago
2026-01-13
No

I'm about to add new regression tests asconaead128.c.in and asconhas256.c.in (in the pqc branch first). Each has four different implementations of the underlying cryptosystem. ref looks fine (apart from being very slow to compile and needing too much memory when inlining). But the opt32_lowsize (optimized for small code size and 32-bit targets) and bi8 (bit-interleaved version optimized for 8-bit targets) fail the test. And the opt8 (optimized for 8-bit targets) version doesn't even compile.
All are fine for test-host.

Related

Feature Requests: #1004

Discussion

  • Philipp Klaus Krause

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,2 +1,2 @@
     I'm about to add new regression tests asconaead128.c.in and asconhas256.c.in (in the pqc branch first). Each has four different implementations of the underlying cryptosystem. ref looks fine (apart from being very slow to compile and needing too much memory when inlining). But the opt32_lowsize (optimized for small code size and 32-bit targets) and bi8 (bit-interleaved version optimized for 8-bit targets) fail the test. And the opt8 (optimized for 8-bit targets) version doesn't even compile.
    -Alla re fine for test-host.
    +All are fine for test-host.
    
     
  • Philipp Klaus Krause

    For the compilation failure, this small code sample reproduces issue:

    char *p;
    
    inline void ABSORB(unsigned char* s, const unsigned char* d) {
      *s++ ^= *d++;
    }
    
    void ascon_update(unsigned char* m) {
      ABSORB(p, m);
    }
    
    test.c:4: error 20: Undefined identifier '__100000000'
    test.c:4: error 27: Pointer required
    
     

    Last edit: Philipp Klaus Krause 6 days ago
    • Philipp Klaus Krause

      This turned out to be a quite complex issue. I've worked on it all day. The fix for the compilation failure (and a related issue that was masked by it) in in [r16072]. The runtime test failures still need to be addressed.

       

      Related

      Commit: [r16072]

  • Philipp Klaus Krause

    I suspect that some of the remaining failures are actually upstream endianness bugs: https://github.com/ascon/ascon-c/issues/25

     
  • Gabriele Gorla

    Gabriele Gorla - 3 days ago

    On the mos6502 all implementations work except opt8 and opt8_lowsize

     

Log in to post a comment.