Check crypto_box_detached() with a small order pk

This commit is contained in:
Frank Denis 2015-12-25 02:01:51 +01:00
parent 2f1cec7352
commit 9784038ad0

View File

@ -100,6 +100,9 @@ int main(void)
printf("crypto_box_open_easy_afternm() with a huge ciphertext should have failed\n");
}
memset(m2, 0, m2_size);
ret = crypto_box_detached(c, mac, m, (unsigned long long) mlen,
nonce, small_order_p, bobsk);
assert(ret == -1);
ret = crypto_box_detached(c, mac, m, (unsigned long long) mlen,
nonce, alicepk, bobsk);
assert(ret == 0);