Changeset View
Changeset View
Standalone View
Standalone View
sys/crypto/aesni/aesni.c
Show First 20 Lines • Show All 299 Lines • ▼ Show 20 Lines | case CRYPTO_AES_NIST_GCM_16: | ||||
break; | break; | ||||
default: | default: | ||||
CRYPTDEB("invalid GCM key length"); | CRYPTDEB("invalid GCM key length"); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
if (csp->csp_auth_mlen != 0 && | if (csp->csp_auth_mlen != 0 && | ||||
csp->csp_auth_mlen != GMAC_DIGEST_LEN) | csp->csp_auth_mlen != GMAC_DIGEST_LEN) | ||||
return (EINVAL); | return (EINVAL); | ||||
if (csp->csp_ivlen != AES_GCM_IV_LEN || | if (!sc->has_aes) | ||||
!sc->has_aes) | |||||
return (EINVAL); | return (EINVAL); | ||||
break; | break; | ||||
case CRYPTO_AES_CCM_16: | case CRYPTO_AES_CCM_16: | ||||
switch (csp->csp_cipher_klen * 8) { | switch (csp->csp_cipher_klen * 8) { | ||||
case 128: | case 128: | ||||
case 192: | case 192: | ||||
case 256: | case 256: | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 620 Lines • Show Last 20 Lines |