stef / libopaque

c implementation of the OPAQUE protocol with bindings for python, php, ruby, lua, zig, java, erlang, golang, js and SASL. also supports a threshold variants based on 2hashdh and 3hashtdh
GNU Lesser General Public License v3.0
71 stars 10 forks source link

µnit test started failing after 0-ing the size of notpackaged id[US] in unpack #2

Closed creemama closed 3 years ago

creemama commented 3 years ago

The µnit test started failing at the commit (https://github.com/stef/libopaque/commit/3ef6a113fbd0cf2b5334f38414f8162e5d20d164) that zeroes the size of notpackaged idU and idS in unpack. Running make test produces the following output:

# make test
gcc -march=native -Wall -fPIC -O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fasynchronous-unwind-tables -fpic -fstack-clash-protection -fcf-protection=full -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,defs -Wl,-z,relro -ftrapv -Wl,-z,noexecstack -DTRACE -DNORANDOM -Iaux -o opaque.o -c opaque.c
gcc -shared -fpic -march=native -Wall -fPIC -O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fasynchronous-unwind-tables -fpic -fstack-clash-protection -fcf-protection=full -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,defs -Wl,-z,relro -ftrapv -Wl,-z,noexecstack -DTRACE -DNORANDOM -Iaux -o libopaque.so common.o opaque.o aux/kdf_hkdf_sha256.o -g -lsodium
gcc -march=native -Wall -fPIC -O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fasynchronous-unwind-tables -fpic -fstack-clash-protection -fcf-protection=full -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,defs -Wl,-z,relro -ftrapv -Wl,-z,noexecstack -DTRACE -DNORANDOM -Iaux -o tests/munit-opaque tests/munit/munit.c tests/opaque_munit.c -L. -lopaque -g -lsodium
LD_LIBRARY_PATH=/tmp/src: ./tests/munit-opaque --fatal-failures
Running test suite with seed 0x72d997a2...
/opaque-tests/server-init            
  pw=simple guessable dictionary password, key=some optional key contributed to the opaque protocol, idU=user, idS=server, cfg=, type=[ FAIL  ]
cfg sku: 0, pku:0, pks:1, idu:0, ids:0
sizeof(rec): 235
opaque_CreateRegistrationRequest
h0 1ee5e5acb9423c9df20bd067dcc6f60c420d4a10823dd2dbae2e0d0f6abb45ab4199e871b3ecb2153aaad0bad58d925a476e4fc1716c57b66534bc32ebeee730
H0  e0552efba8fc146b7f95d81e0943d53ca8d7cfe1982192de3863fa41e5afac4e
r 7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205
alpha ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334
opaque_CreateRegistrationResponse
beta  c440f5a5fbb95cca3f08776daaa7752eb971c1313cfd41bf50194a361e756610
p_s  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
P_s  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
opaque_FinalizeRequest
h0_k  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334
rw0  c41de91fc699261ddf895fb287737fc591197c890822b4f0644e7a1e3b2df9b5
key  f6a278081b8574658e77cf6dcc7f71014fbfa9671ba131176ef0ec7aaf4b811b
plain user rec  0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009bfba09ee3035730bb93f50b37bae049790c32fad374350c9882d871559780a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
SecEnv0  0320008f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
ClrEnv0  
pad  8d8e4d3810ed1e0ba5d4c0b3c8d74f84c3c87f9f83925a2d3a9b3f23fd19e9b27f1692
target  0000000000000000000000000000000000000000000000000000000000000000000000
SecEnv1  0320008f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
ClrEnv1  
envelope auth  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f23008eae4db75028b3bd2af1a2f92d655b6eb5b21156ce10c71041c525f24776d793473ecd0000
auth_key  cb15494ce23e96e4f5038e1ad675fa6b579b90122f7dcbcc1f71623d208a7ccc
auth tag  18fd0545d78b951d6504428b1df70ad361c3c91288f245d1c2e21b996888d62b
envelope  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f23008eae4db75028b3bd2af1a2f92d655b6eb5b21156ce10c71041c525f24776d793473ecd000018fd0545d78b951d6504428b1df70ad361c3c91288f245d1c2e21b996888d62b
export_key  7f0ca90f8121cfdafa2b9ae60553fcad85cdc8b456f3a5a54601787d43a2cb9a
cipher user rec  0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009bfba09ee3035730bb93f50b37bae049790c32fad374350c9882d871559780a000000000000000000000000000000000000000000000000000000000000000067000000
opaque_StoreUserRecord
user rec  7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f09bfba09ee3035730bb93f50b37bae049790c32fad374350c9882d871559780a8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f67000000
opaque_CreateCredentialRequest
h0 1ee5e5acb9423c9df20bd067dcc6f60c420d4a10823dd2dbae2e0d0f6abb45ab4199e871b3ecb2153aaad0bad58d925a476e4fc1716c57b66534bc32ebeee730
H0  e0552efba8fc146b7f95d81e0943d53ca8d7cfe1982192de3863fa41e5afac4e
r 7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205
alpha ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334
sec  7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d072050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
pub  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b33400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
sec  7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334240073696d706c6520677565737361626c652064696374696f6e6172792070617373776f7264
pub  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b3348f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
opaque_CreateCredentialResponse
session srv pub  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b3348f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
session srv rec  7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f09bfba09ee3035730bb93f50b37bae049790c32fad374350c9882d871559780a
session srv x_s  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
session srv k_s  7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205
session srv alpha  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334
session srv X_s  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
calc info
idU  75736572
idS  736572766572
nonceU  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
nonceS  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
rec->p_s  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
x_s  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
rec->P_u  09bfba09ee3035730bb93f50b37bae049790c32fad374350c9882d871559780a
pub->X_u  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
sec df6baf6f6a43b9744fc5ef9dea1122782f9f696dc4a0d15c03c1787ee6d15e6495f91bd07876eeb7fc9f64e04ec3da1fd67d5a1616b5f3f0393996f44d5d8613df6baf6f6a43b9744fc5ef9dea1122782f9f696dc4a0d15c03c1787ee6d15e64
expanded label: session secret 00204f50415155452073657373696f6e207365637265744c851a2244f2edbb9366017e3c2205aa9199b703decc3d8dbb4cdb0c6e8a972e
transcript:  4c851a2244f2edbb9366017e3c2205aa9199b703decc3d8dbb4cdb0c6e8a972e
expanded label: handshake secret 00204f50415155452068616e647368616b65207365637265744c851a2244f2edbb9366017e3c2205aa9199b703decc3d8dbb4cdb0c6e8a972e
transcript:  4c851a2244f2edbb9366017e3c2205aa9199b703decc3d8dbb4cdb0c6e8a972e
expanded label: server mac 00204f504151554520736572766572206d6163
expanded label: client mac 00204f504151554520636c69656e74206d6163
expanded label: server enc 00204f50415155452073657276657220656e63
expanded label: client enc 00204f504151554520636c69656e7420656e63
keys->sk 2f72d49e5f245cf822b3c4b38298cb10d1c4033643f4b5da8060b990e629243c
keys->km2 651cd62a3dc5b16f6cf747b30da0dc425d7b0e5aae6f1088ff008871978fa605
keys->km3 30c93bcc507b6c8e80549bc0e4a06b9bd9f6e2db416ee57bf82ad8435cb51031
keys->ke2 47ab06ea857a13fe3e7b1c44b64f87d37920151e894eb898d9dc35c2c1b8f865
keys->ke3 e5fc0f7c886327465bd5813a84e521cfef7c6e234d817c7833533af1df3abafa
keys  2f72d49e5f245cf822b3c4b38298cb10d1c4033643f4b5da8060b990e629243c651cd62a3dc5b16f6cf747b30da0dc425d7b0e5aae6f1088ff008871978fa60530c93bcc507b6c8e80549bc0e4a06b9bd9f6e2db416ee57bf82ad8435cb5103147ab06ea857a13fe3e7b1c44b64f87d37920151e894eb898d9dc35c2c1b8f865e5fc0f7c886327465bd5813a84e521cfef7c6e234d817c7833533af1df3abafa
session srv sk  2f72d49e5f245cf822b3c4b38298cb10d1c4033643f4b5da8060b990e629243c
session srv km3  30c93bcc507b6c8e80549bc0e4a06b9bd9f6e2db416ee57bf82ad8435cb51031
xcript_state  0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
oprf1  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334
nonceU  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
epubu  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
oprf2  c440f5a5fbb95cca3f08776daaa7752eb971c1313cfd41bf50194a361e756610
envu  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f23008eae4db75028b3bd2af1a2f92d655b6eb5b21156ce10c71041c525f24776d793473ecd000018fd0545d78b951d6504428b1df70ad361c3c91288f245d1c2e21b996888d62b
nonceS  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
epubs  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
no infos
xcript  2622ca4cb4444d6e374b148477775a14c2a48522f65673c338f706f6f491ded3
resp->auth  835b370971fe90ea1b4a2ecd49065e5891fd04ca64d8d9e8ad309923231f5f17
km2  651cd62a3dc5b16f6cf747b30da0dc425d7b0e5aae6f1088ff008871978fa605
session srv auth  835b370971fe90ea1b4a2ecd49065e5891fd04ca64d8d9e8ad309923231f5f17
session srv resp  c440f5a5fbb95cca3f08776daaa7752eb971c1313cfd41bf50194a361e7566108f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f835b370971fe90ea1b4a2ecd49065e5891fd04ca64d8d9e8ad309923231f5f1767000000
opaque_RecoverCredentials
session user finish pw  73696d706c6520677565737361626c652064696374696f6e6172792070617373776f7264
session user finish key  736f6d65206f7074696f6e616c206b657920636f6e747269627574656420746f20746865206f70617175652070726f746f636f6c
session user finish sec  7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b3342400
session user finish resp  c440f5a5fbb95cca3f08776daaa7752eb971c1313cfd41bf50194a361e7566108f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f835b370971fe90ea1b4a2ecd49065e5891fd04ca64d8d9e8ad309923231f5f1767000000
session user finish r  7a3c6282f02d37a05023b60d5428e6cc5961d4c31221937adae0b574e4d07205
session user finish r^-1  4cac00d19145d80b89d58dd9b4b67839ae409ef2974df8df31f47e0f3375b002
session user finish beta  c440f5a5fbb95cca3f08776daaa7752eb971c1313cfd41bf50194a361e756610
session user finish h0  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334
session user finish rw0  c41de91fc699261ddf895fb287737fc591197c890822b4f0644e7a1e3b2df9b5
session user finish rw  f6a278081b8574658e77cf6dcc7f71014fbfa9671ba131176ef0ec7aaf4b811b
open envelope  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f23008eae4db75028b3bd2af1a2f92d655b6eb5b21156ce10c71041c525f24776d793473ecd000018fd0545d78b951d6504428b1df70ad361c3c91288f245d1c2e21b996888d62b
envelope auth  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f23008eae4db75028b3bd2af1a2f92d655b6eb5b21156ce10c71041c525f24776d793473ecd0000
auth_key  cb15494ce23e96e4f5038e1ad675fa6b579b90122f7dcbcc1f71623d208a7ccc
auth tag  18fd0545d78b951d6504428b1df70ad361c3c91288f245d1c2e21b996888d62b
SecEnv_len: 35
ClrEnv_len: 0
pad  8d8e4d3810ed1e0ba5d4c0b3c8d74f84c3c87f9f83925a2d3a9b3f23fd19e9b27f1692
SecEnv  0320008f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
ClrEnv  
export_key  7f0ca90f8121cfdafa2b9ae60553fcad85cdc8b456f3a5a54601787d43a2cb9a
unpacked cred  07efe5d6e1393f2808bfa134bd9b6d5d3c255986a60dba4dac02b78cec06aa0c09bfba09ee3035730bb93f50b37bae049790c32fad374350c9882d871559780a8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
calc info
idU  75736572
idS  
nonceU  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
nonceS  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
c->p_u  07efe5d6e1393f2808bfa134bd9b6d5d3c255986a60dba4dac02b78cec06aa0c
sec->x_u  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
c->P_s  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
sec->X_s  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
sec df6baf6f6a43b9744fc5ef9dea1122782f9f696dc4a0d15c03c1787ee6d15e6495f91bd07876eeb7fc9f64e04ec3da1fd67d5a1616b5f3f0393996f44d5d8613df6baf6f6a43b9744fc5ef9dea1122782f9f696dc4a0d15c03c1787ee6d15e64
expanded label: session secret 00204f50415155452073657373696f6e2073656372657426ad40127c346104d819b23086cc11cff38ebbaafc332d1223cdac5c4435c232
transcript:  26ad40127c346104d819b23086cc11cff38ebbaafc332d1223cdac5c4435c232
expanded label: handshake secret 00204f50415155452068616e647368616b652073656372657426ad40127c346104d819b23086cc11cff38ebbaafc332d1223cdac5c4435c232
transcript:  26ad40127c346104d819b23086cc11cff38ebbaafc332d1223cdac5c4435c232
expanded label: server mac 00204f504151554520736572766572206d6163
expanded label: client mac 00204f504151554520636c69656e74206d6163
expanded label: server enc 00204f50415155452073657276657220656e63
expanded label: client enc 00204f504151554520636c69656e7420656e63
keys->sk 922a2ef2e666b3dc5935685bcb309d19ae4f85e8002b43bd774c5de7588ce468
keys->km2 6f1daf133036fec1cdaf774b8c0febeeb96394536540ff7ebd88c0faf56b1280
keys->km3 426c156ab2acd60047c0f5854474a3663f434dd8275ad7d7b81ceea9a9230c9a
keys->ke2 ecaf6d4f511c80521d3525a8f3daf4267b5418cc9a6abc0c481d9a1dce032ce0
keys->ke3 6c85fd5324b6d910848cb0e0d7e5826cded5d80d882df33e5f9ab4ffbbf33e0e
keys  922a2ef2e666b3dc5935685bcb309d19ae4f85e8002b43bd774c5de7588ce4686f1daf133036fec1cdaf774b8c0febeeb96394536540ff7ebd88c0faf56b1280426c156ab2acd60047c0f5854474a3663f434dd8275ad7d7b81ceea9a9230c9aecaf6d4f511c80521d3525a8f3daf4267b5418cc9a6abc0c481d9a1dce032ce06c85fd5324b6d910848cb0e0d7e5826cded5d80d882df33e5f9ab4ffbbf33e0e
no xcript_state
oprf1  ca2ef245db1ddc7ca8375aef698e939f9443d810f660de49f4df357302a4b334
nonceU  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
epubu  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
oprf2  c440f5a5fbb95cca3f08776daaa7752eb971c1313cfd41bf50194a361e756610
envu  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f23008eae4db75028b3bd2af1a2f92d655b6eb5b21156ce10c71041c525f24776d793473ecd000018fd0545d78b951d6504428b1df70ad361c3c91288f245d1c2e21b996888d62b
nonceS  000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
epubs  8f40c5adb68f25624ae5b214ea767a6ec94d829d3d7b5e1ad1ba6f3e2138285f
no infos
xcript  2622ca4cb4444d6e374b148477775a14c2a48522f65673c338f706f6f491ded3
resp->auth  835b370971fe90ea1b4a2ecd49065e5891fd04ca64d8d9e8ad309923231f5f17
km2  6f1daf133036fec1cdaf774b8c0febeeb96394536540ff7ebd88c0faf56b1280
0 of 1 (0%) tests successful, 0 (0%) test skipped.
make: *** [makefile:30: test] Error 1

This appears to be the code that causes the test to fail:

  if(cfg->idU == NotPackaged) {
    ids->idU_len=0;
  }
  if(cfg->idS == NotPackaged) {
    ids->idU_len=0;
  }

I originally thought that replacing ids->idU_len=0 with ids->idS_len=0 in the cfg->idS == NotPackaged conditional would fix the problem, but it did not.

After commenting out the lines, the test passed again.

I also needed to make this change to the makefile to get tests to work:

 test: tests/opaque-munit$(EXT)
-   LD_PRELOAD=./libopaque.so ./tests/munit-opaque --fatal-failures
+   LD_LIBRARY_PATH=$(shell pwd):$(shell printf %s $$LD_LIBRARY_PATH) ./tests/munit-opaque --fatal-failures

Without this change, I got the following error:

# make test
gcc -march=native -Wall -fPIC -O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fasynchronous-unwind-tables -fpic -fstack-clash-protection -fcf-protection=full -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,defs -Wl,-z,relro -ftrapv -Wl,-z,noexecstack -DTRACE -DNORANDOM -Iaux -o opaque.o -c opaque.c
gcc -shared -fpic -march=native -Wall -fPIC -O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fasynchronous-unwind-tables -fpic -fstack-clash-protection -fcf-protection=full -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,defs -Wl,-z,relro -ftrapv -Wl,-z,noexecstack -DTRACE -DNORANDOM -Iaux -o libopaque.so common.o opaque.o aux/kdf_hkdf_sha256.o -g -lsodium
gcc -march=native -Wall -fPIC -O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fasynchronous-unwind-tables -fpic -fstack-clash-protection -fcf-protection=full -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,defs -Wl,-z,relro -ftrapv -Wl,-z,noexecstack -DTRACE -DNORANDOM -Iaux -o tests/munit-opaque tests/munit/munit.c tests/opaque_munit.c -L. -lopaque -g -lsodium
LD_PRELOAD=./libopaque.so ./tests/munit-opaque --fatal-failures
./tests/munit-opaque: error while loading shared libraries: libopaque.so: cannot open shared object file: No such file or directory
make: *** [makefile:30: test] Error 127
stef commented 3 years ago

just a note, you have -DNORANDOM and -DTRACE on, this is only for development, since everything is predictable. if you want to deploy this in production remove -DNORANDOM at least from the makefile cflags.

looking into the rest.

stef commented 3 years ago

the voprf branch does work. so the fix must be in the diff between master and voprf. will look at this after dinner.

stef commented 3 years ago

eh, actually 50% of the tests fail also on the voprf branch. but that is great news, so it's all not broken, only a certain code path.

stef commented 3 years ago

so the problem is when cfg->pkS is not packaged.