error 0 crypto_encrypt_open does not handle c=t overlap ==15323== Memcheck, a memory error detector ==15323== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==15323== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info ==15323== Command: ./try ==15323== ==15323== Warning: client switching stacks? SP change: 0x1ffeffff38 --> 0x1ffedddf28 ==15323== to suppress, use: --max-stackframe=2236432 or greater ==15323== Invalid write of size 8 ==15323== at 0x10A561: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x1FFF00006F: ??? ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffedddf28 is on thread 1's stack ==15323== in frame #0, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10ACC1: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45f30 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10ACD9: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45f50 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10ACF9: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45f70 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10AD19: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45f90 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10AD39: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45fb0 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10AD59: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45fd0 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10ADC2: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45ff0 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10ADFB: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee46010 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10AE3B: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B715: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7C6: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee46020 is on thread 1's stack ==15323== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10B76F: sample_discrete_gaussian (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7DA: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffedddf30 is on thread 1's stack ==15323== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid write of size 2 ==15323== at 0x10B76F: sample_discrete_gaussian (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7E7: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffef97f30 is on thread 1's stack ==15323== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid read of size 2 ==15323== at 0x10BB8D: submul (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7F5: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffedddf30 is on thread 1's stack ==15323== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid read of size 2 ==15323== at 0x10BB91: submul (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7F5: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffee45f30 is on thread 1's stack ==15323== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== Invalid read of size 2 ==15323== at 0x10BB96: submul (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10B7F5: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x10A565: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109653: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== by 0x109144: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15323== Address 0x1ffef97f30 is on thread 1's stack ==15323== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15323== ==15323== ==15323== More than 10000000 total errors detected. I'm not reporting any more. ==15323== Final error counts will be inaccurate. Go fix your program! ==15323== Rerun with --error-limit=no to disable this cutoff. Note ==15323== that errors may occur in your program without prior warning from ==15323== Valgrind, because errors are no longer being displayed. ==15323== ==15323== Warning: client switching stacks? SP change: 0x1ffedddf30 --> 0x1ffeffff38 ==15323== to suppress, use: --max-stackframe=2236424 or greater ==15323== Warning: client switching stacks? SP change: 0x1ffeffff28 --> 0x1ffeddcd80 ==15323== to suppress, use: --max-stackframe=2240936 or greater ==15323== further instances of this message will not be shown. ==15323== ==15323== HEAP SUMMARY: ==15323== in use at exit: 16,310,192 bytes in 12 blocks ==15323== total heap usage: 2,118 allocs, 2,106 frees, 16,418,976 bytes allocated ==15323== ==15323== LEAK SUMMARY: ==15323== definitely lost: 0 bytes in 0 blocks ==15323== indirectly lost: 0 bytes in 0 blocks ==15323== possibly lost: 16,309,760 bytes in 10 blocks ==15323== still reachable: 432 bytes in 2 blocks ==15323== suppressed: 0 bytes in 0 blocks ==15323== Rerun with --leak-check=full to see details of leaked memory ==15323== ==15323== For lists of detected and suppressed errors, rerun with: -s ==15323== ERROR SUMMARY: 10000000 errors from 15 contexts (suppressed: 0 from 0)