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