error 0 crypto_encrypt_open does not handle c=t overlap ==15011== Memcheck, a memory error detector ==15011== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==15011== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info ==15011== Command: ./try ==15011== ==15011== Warning: client switching stacks? SP change: 0x1ffeffff48 --> 0x1ffedddf38 ==15011== to suppress, use: --max-stackframe=2236432 or greater ==15011== Invalid write of size 8 ==15011== at 0x10A10E: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1FFF00006F: ??? ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffedddf38 is on thread 1's stack ==15011== in frame #0, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A779: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee45f40 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A790: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee45f60 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A7A7: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee45f80 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A7BE: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee45fa0 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A7D7: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee45fc0 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A7F0: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee45fe0 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A844: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee46000 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A883: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee46020 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10A8C2: unpack_128elems (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10AF9F: sample_uniform (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B038: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee46030 is on thread 1's stack ==15011== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10AFE8: sample_discrete_gaussian (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B04C: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffedddf40 is on thread 1's stack ==15011== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid write of size 2 ==15011== at 0x10AFE8: sample_discrete_gaussian (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B059: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffef97f40 is on thread 1's stack ==15011== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid read of size 2 ==15011== at 0x10B373: submul (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B067: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffedddf40 is on thread 1's stack ==15011== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid read of size 2 ==15011== at 0x10B378: submul (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B067: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffee45f40 is on thread 1's stack ==15011== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== Invalid read of size 2 ==15011== at 0x10B37D: submul (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10B067: lotus_cpa_pke_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x10A112: crypto_encrypt_lotus256_ref_keypair (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x109557: test (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== by 0x1090B4: main (in /home/moritz/Uni/2015-2016/research-internship/letstrythisagain/supercop-20181113/bench/venus/work/compile/try) ==15011== Address 0x1ffef97f40 is on thread 1's stack ==15011== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (???:) ==15011== ==15011== ==15011== More than 10000000 total errors detected. I'm not reporting any more. ==15011== Final error counts will be inaccurate. Go fix your program! ==15011== Rerun with --error-limit=no to disable this cutoff. Note ==15011== that errors may occur in your program without prior warning from ==15011== Valgrind, because errors are no longer being displayed. ==15011== ==15011== Warning: client switching stacks? SP change: 0x1ffedddf40 --> 0x1ffeffff48 ==15011== to suppress, use: --max-stackframe=2236424 or greater ==15011== Warning: client switching stacks? SP change: 0x1ffeffff38 --> 0x1ffeddcd90 ==15011== to suppress, use: --max-stackframe=2240936 or greater ==15011== further instances of this message will not be shown. ==15011== ==15011== HEAP SUMMARY: ==15011== in use at exit: 16,310,192 bytes in 12 blocks ==15011== total heap usage: 2,118 allocs, 2,106 frees, 16,418,976 bytes allocated ==15011== ==15011== LEAK SUMMARY: ==15011== definitely lost: 0 bytes in 0 blocks ==15011== indirectly lost: 0 bytes in 0 blocks ==15011== possibly lost: 16,309,760 bytes in 10 blocks ==15011== still reachable: 432 bytes in 2 blocks ==15011== suppressed: 0 bytes in 0 blocks ==15011== Rerun with --leak-check=full to see details of leaked memory ==15011== ==15011== For lists of detected and suppressed errors, rerun with: -s ==15011== ERROR SUMMARY: 10000000 errors from 15 contexts (suppressed: 0 from 0)