summaryrefslogtreecommitdiff
path: root/lib/crypto/tests
AgeCommit message (Collapse)AuthorFilesLines
2023-11-30lib:crypto: Add test for samba_gnutls_sp800_108_derive_key() using NIST test ↵Joseph Sutton1-0/+260
vectors Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Nov 30 01:03:29 UTC 2023 on atb-devel-224
2023-11-30lib:crypto: Add ‘FixedData’ parameter to samba_gnutls_sp800_108_derive_key()Joseph Sutton1-0/+4
Our code won’t use this, but NIST’s test vectors are based on handing a fixed buffer to the key derivation function. View with ‘git show -b’. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-30lib:crypto: Add tests for samba_gnutls_sp800_108_derive_key()Joseph Sutton1-0/+130
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-30crypto: Rely on GnuTLS 3.6.13 and gnutls_pbkdf2()Andrew Bartlett1-4/+0
This removes a lot of inline #ifdef and means this feature is always tested. We can do this as we have chosen GnuTLS 3.6.13 as the new minimum version. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2022-09-12lib:crypto: Zero auth_tag array in encryption testJoseph Sutton1-1/+1
If samba_gnutls_aead_aes_256_cbc_hmac_sha512_encrypt() does not fill the array completely, we may be comparing uninitialised bytes. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-07-28lib:crypto: Add test for pbkdf2Andreas Schneider1-0/+47
This is just that we use the right parameters for gnutls_pbkdf2() and reach the values from Windows. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-07-28lib:crypto: Add test for samba_gnutls_aead_aes_256_cbc_hmac_sha512_decrypt()Andreas Schneider1-0/+48
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-07-28lib:crypto: Add test for samba_gnutls_aead_aes_256_cbc_hmac_sha512_encrypt()Andreas Schneider1-0/+229
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>