Home
last modified time | relevance | path

Searched refs:crypto_box_MACBYTES (Results 1 – 7 of 7) sorted by relevance

/freebsd/sys/contrib/libsodium/test/default/
H A Dbox_easy.c36 static unsigned char c[147 + crypto_box_MACBYTES];
46 for (i = 0; i < 131 + crypto_box_MACBYTES; ++i) { in main()
55 for (i = 0; i < 1 + crypto_box_MACBYTES; ++i) { in main()
60 crypto_box_open_easy(c, c, crypto_box_MACBYTES, nonce, bobpk, alicesk); in main()
62 for (i = 0; i < 1 + crypto_box_MACBYTES; ++i) { in main()
66 c[randombytes_uniform(crypto_box_MACBYTES)]++; in main()
67 ret = crypto_box_open_easy(c, c, crypto_box_MACBYTES, nonce, bobpk, alicesk); in main()
H A Dbox_easy2.c33 c_size = crypto_box_MACBYTES + m_size; in main()
41 mac = (unsigned char *) sodium_malloc(crypto_box_MACBYTES); in main()
53 (unsigned long long) mlen + crypto_box_MACBYTES, in main()
60 for (i = 0; i < mlen + crypto_box_MACBYTES - 1; i++) { in main()
72 printf("%d\n", memcmp(m, c + crypto_box_MACBYTES, mlen) == 0); in main()
74 (unsigned long long) mlen + crypto_box_MACBYTES, in main()
98 m2, c, (unsigned long long) mlen + crypto_box_MACBYTES, nonce, in main()
103 if (crypto_box_open_easy_afternm(m2, c, crypto_box_MACBYTES - 1U, nonce, in main()
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_box/
H A Dcrypto_box_easy.c47 return crypto_box_detached_afternm(c + crypto_box_MACBYTES, c, m, mlen, n, in crypto_box_easy_afternm()
59 return crypto_box_detached(c + crypto_box_MACBYTES, c, m, mlen, n, in crypto_box_easy()
96 if (clen < crypto_box_MACBYTES) { in crypto_box_open_easy_afternm()
99 return crypto_box_open_detached_afternm(m, c + crypto_box_MACBYTES, c, in crypto_box_open_easy_afternm()
100 clen - crypto_box_MACBYTES, in crypto_box_open_easy_afternm()
109 if (clen < crypto_box_MACBYTES) { in crypto_box_open_easy()
112 return crypto_box_open_detached(m, c + crypto_box_MACBYTES, c, in crypto_box_open_easy()
113 clen - crypto_box_MACBYTES, in crypto_box_open_easy()
H A Dcrypto_box.c49 return crypto_box_MACBYTES; in crypto_box_macbytes()
/freebsd/contrib/unbound/dnscrypt/
H A Ddnscrypt.h32 …PT_MAGIC_HEADER_LEN + crypto_box_PUBLICKEYBYTES + crypto_box_HALF_NONCEBYTES + crypto_box_MACBYTES)
34 (DNSCRYPT_MAGIC_HEADER_LEN + crypto_box_NONCEBYTES + crypto_box_MACBYTES)
37 (DNSCRYPT_MAGIC_HEADER_LEN + crypto_box_HALF_NONCEBYTES * 2 + crypto_box_MACBYTES)
88 uint8_t mac[crypto_box_MACBYTES];
H A Ddnscrypt.c488 memmove(boxed + crypto_box_MACBYTES, buf, len); in dnscrypt_server_curve()
489 len = dnscrypt_pad(boxed + crypto_box_MACBYTES, len, in dnscrypt_server_curve()
502 (boxed, boxed + crypto_box_MACBYTES, len, nonce, nmkey) != 0) { in dnscrypt_server_curve()
510 (boxed, boxed + crypto_box_MACBYTES, len, nonce, nmkey) != 0) { in dnscrypt_server_curve()
/freebsd/sys/contrib/libsodium/src/libsodium/include/sodium/
H A Dcrypto_box.h39 #define crypto_box_MACBYTES crypto_box_curve25519xsalsa20poly1305_MACBYTES macro
122 #define crypto_box_SEALBYTES (crypto_box_PUBLICKEYBYTES + crypto_box_MACBYTES)