mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Check crypto_box_detached() with a small order pk
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user