Add a test for short (non-detached) signed messages

This commit is contained in:
Frank Denis 2014-07-10 22:39:11 -07:00
parent a362711903
commit 96b840cfcf

View File

@ -1090,6 +1090,12 @@ int main(void)
printf("message can be forged: [%u]\n", i);
continue;
}
if (crypto_sign_open(m, &mlen, sm, i % crypto_sign_BYTES,
test_data[i].pk) == 0) {
printf("short signed message verifies: [%u]\n",
i % crypto_sign_BYTES);
continue;
}
}
printf("%u tests\n", i);