Output save_alt Download

Operation
crypto_encrypt
Primitive
lotus256
Implementation
ref
Compiler options
clang -O1 -g
Host
venus
1 error 0
2 crypto_encrypt_open does not handle c=t overlap
3 ==11543== Memcheck, a memory error detector
4 ==11543== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
5 ==11543== Using Valgrind-3.15.0.GIT and LibVEX; rerun with -h for copyright info
6 ==11543== Command: ./try
7 ==11543==
8 ==11543== Warning: client switching stacks? SP change: 0x1ffeffff28 --> 0x1ffedddf18
9 ==11543== to suppress, use: --max-stackframe=2236432 or greater
10 ==11543== Invalid write of size 8
11 ==11543== at 0x402246: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
12 ==11543== Address 0x1ffedddf18 is on thread 1's stack
13 ==11543==
14 ==11543== Invalid write of size 2
15 ==11543== at 0x402A07: unpack_128elems (pack.c:84)
16 ==11543== by 0x403401: sample_uniform (sampler.c:163)
17 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
18 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
19 ==11543== by 0x401383: test (try.c:108)
20 ==11543== by 0x401EB2: main (try-anything.c:295)
21 ==11543== Address 0x1ffee45f20 is on thread 1's stack
22 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
23 ==11543==
24 ==11543== Invalid write of size 2
25 ==11543== at 0x402A28: unpack_128elems (pack.c:85)
26 ==11543== by 0x403401: sample_uniform (sampler.c:163)
27 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
28 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
29 ==11543== by 0x401383: test (try.c:108)
30 ==11543== by 0x401EB2: main (try-anything.c:295)
31 ==11543== Address 0x1ffee45f40 is on thread 1's stack
32 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
33 ==11543==
34 ==11543== Invalid write of size 2
35 ==11543== at 0x402A48: unpack_128elems (pack.c:86)
36 ==11543== by 0x403401: sample_uniform (sampler.c:163)
37 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
38 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
39 ==11543== by 0x401383: test (try.c:108)
40 ==11543== by 0x401EB2: main (try-anything.c:295)
41 ==11543== Address 0x1ffee45f60 is on thread 1's stack
42 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
43 ==11543==
44 ==11543== Invalid write of size 2
45 ==11543== at 0x402A68: unpack_128elems (pack.c:87)
46 ==11543== by 0x403401: sample_uniform (sampler.c:163)
47 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
48 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
49 ==11543== by 0x401383: test (try.c:108)
50 ==11543== by 0x401EB2: main (try-anything.c:295)
51 ==11543== Address 0x1ffee45f80 is on thread 1's stack
52 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
53 ==11543==
54 ==11543== Invalid write of size 2
55 ==11543== at 0x402A8B: unpack_128elems (pack.c:88)
56 ==11543== by 0x403401: sample_uniform (sampler.c:163)
57 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
58 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
59 ==11543== by 0x401383: test (try.c:108)
60 ==11543== by 0x401EB2: main (try-anything.c:295)
61 ==11543== Address 0x1ffee45fa0 is on thread 1's stack
62 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
63 ==11543==
64 ==11543== Invalid write of size 2
65 ==11543== at 0x402ABB: unpack_128elems (pack.c:89)
66 ==11543== by 0x403401: sample_uniform (sampler.c:163)
67 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
68 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
69 ==11543== by 0x401383: test (try.c:108)
70 ==11543== by 0x401EB2: main (try-anything.c:295)
71 ==11543== Address 0x1ffee45fc0 is on thread 1's stack
72 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
73 ==11543==
74 ==11543== Invalid write of size 2
75 ==11543== at 0x402B12: unpack_128elems (pack.c:90)
76 ==11543== by 0x403401: sample_uniform (sampler.c:163)
77 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
78 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
79 ==11543== by 0x401383: test (try.c:108)
80 ==11543== by 0x401EB2: main (try-anything.c:295)
81 ==11543== Address 0x1ffee45fe0 is on thread 1's stack
82 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
83 ==11543==
84 ==11543== Invalid write of size 2
85 ==11543== at 0x402B5E: unpack_128elems (pack.c:95)
86 ==11543== by 0x403401: sample_uniform (sampler.c:163)
87 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
88 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
89 ==11543== by 0x401383: test (try.c:108)
90 ==11543== by 0x401EB2: main (try-anything.c:295)
91 ==11543== Address 0x1ffee46000 is on thread 1's stack
92 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
93 ==11543==
94 ==11543== Invalid write of size 2
95 ==11543== at 0x402BAE: unpack_128elems (pack.c:98)
96 ==11543== by 0x403401: sample_uniform (sampler.c:163)
97 ==11543== by 0x4034B6: lotus_cpa_pke_keypair (cpa-pke.c:49)
98 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
99 ==11543== by 0x401383: test (try.c:108)
100 ==11543== by 0x401EB2: main (try-anything.c:295)
101 ==11543== Address 0x1ffee46010 is on thread 1's stack
102 ==11543== in frame #3, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
103 ==11543==
104 ==11543== Invalid write of size 2
105 ==11543== at 0x40345B: sample_discrete_gaussian (sampler.c:176)
106 ==11543== by 0x4034CA: lotus_cpa_pke_keypair (cpa-pke.c:53)
107 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
108 ==11543== by 0x401383: test (try.c:108)
109 ==11543== by 0x401EB2: main (try-anything.c:295)
110 ==11543== Address 0x1ffedddf20 is on thread 1's stack
111 ==11543== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
112 ==11543==
113 ==11543== Invalid write of size 2
114 ==11543== at 0x40345B: sample_discrete_gaussian (sampler.c:176)
115 ==11543== by 0x4034DF: lotus_cpa_pke_keypair (cpa-pke.c:54)
116 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
117 ==11543== by 0x401383: test (try.c:108)
118 ==11543== by 0x401EB2: main (try-anything.c:295)
119 ==11543== Address 0x1ffef97f20 is on thread 1's stack
120 ==11543== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
121 ==11543==
122 ==11543== Invalid read of size 2
123 ==11543== at 0x403860: submul (lwe-arithmetics.c:18)
124 ==11543== by 0x4034ED: lotus_cpa_pke_keypair (cpa-pke.c:56)
125 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
126 ==11543== by 0x401383: test (try.c:108)
127 ==11543== by 0x401EB2: main (try-anything.c:295)
128 ==11543== Address 0x1ffedddf20 is on thread 1's stack
129 ==11543== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
130 ==11543==
131 ==11543== Invalid read of size 2
132 ==11543== at 0x403863: submul (lwe-arithmetics.c:18)
133 ==11543== by 0x4034ED: lotus_cpa_pke_keypair (cpa-pke.c:56)
134 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
135 ==11543== by 0x401383: test (try.c:108)
136 ==11543== by 0x401EB2: main (try-anything.c:295)
137 ==11543== Address 0x1ffee45f20 is on thread 1's stack
138 ==11543== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
139 ==11543==
140 ==11543== Invalid read of size 2
141 ==11543== at 0x403869: submul (lwe-arithmetics.c:17)
142 ==11543== by 0x4034ED: lotus_cpa_pke_keypair (cpa-pke.c:56)
143 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
144 ==11543== by 0x401383: test (try.c:108)
145 ==11543== by 0x401EB2: main (try-anything.c:295)
146 ==11543== Address 0x1ffef97f20 is on thread 1's stack
147 ==11543== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
148 ==11543==
149 ==11543== Invalid read of size 2
150 ==11543== at 0x403877: submul (lwe-arithmetics.c:16)
151 ==11543== by 0x4034ED: lotus_cpa_pke_keypair (cpa-pke.c:56)
152 ==11543== by 0x40224A: crypto_encrypt_lotus256_ref_keypair (encrypt.c:32)
153 ==11543== by 0x401383: test (try.c:108)
154 ==11543== by 0x401EB2: main (try-anything.c:295)
155 ==11543== Address 0x1ffedddf24 is on thread 1's stack
156 ==11543== in frame #2, created by crypto_encrypt_lotus256_ref_keypair (encrypt.c:27)
157 ==11543==
158 ==11543==
159 ==11543== More than 10000000 total errors detected. I'm not reporting any more.
160 ==11543== Final error counts will be inaccurate. Go fix your program!
161 ==11543== Rerun with --error-limit=no to disable this cutoff. Note
162 ==11543== that errors may occur in your program without prior warning from
163 ==11543== Valgrind, because errors are no longer being displayed.
164 ==11543==
165 ==11543== Warning: client switching stacks? SP change: 0x1ffedddf20 --> 0x1ffeffff28
166 ==11543== to suppress, use: --max-stackframe=2236424 or greater
167 ==11543== Warning: client switching stacks? SP change: 0x1ffeffff18 --> 0x1ffeddcda0
168 ==11543== to suppress, use: --max-stackframe=2240888 or greater
169 ==11543== further instances of this message will not be shown.
170 ==11543==
171 ==11543== HEAP SUMMARY:
172 ==11543== in use at exit: 16,310,192 bytes in 12 blocks
173 ==11543== total heap usage: 2,118 allocs, 2,106 frees, 16,418,976 bytes allocated
174 ==11543==
175 ==11543== LEAK SUMMARY:
176 ==11543== definitely lost: 0 bytes in 0 blocks
177 ==11543== indirectly lost: 0 bytes in 0 blocks
178 ==11543== possibly lost: 16,309,760 bytes in 10 blocks
179 ==11543== still reachable: 432 bytes in 2 blocks
180 ==11543== suppressed: 0 bytes in 0 blocks
181 ==11543== Rerun with --leak-check=full to see details of leaked memory
182 ==11543==
183 ==11543== For lists of detected and suppressed errors, rerun with: -s
184 ==11543== ERROR SUMMARY: 10000000 errors from 16 contexts (suppressed: 0 from 0)