cryptosoft: Support per-op keys for AES-GCM and AES-CCM.
Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28752
This commit is contained in:
parent
4dd6800e22
commit
a10020cfe2
@ -537,6 +537,9 @@ swcr_gcm(struct swcr_session *ses, struct cryptop *crp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (crp->crp_cipher_key != NULL)
|
||||||
|
exf->setkey(swe->sw_kschedule, crp->crp_cipher_key,
|
||||||
|
crypto_get_params(crp->crp_session)->csp_cipher_klen);
|
||||||
exf->reinit(swe->sw_kschedule, iv);
|
exf->reinit(swe->sw_kschedule, iv);
|
||||||
|
|
||||||
/* Do encryption with MAC */
|
/* Do encryption with MAC */
|
||||||
@ -755,6 +758,9 @@ swcr_ccm(struct swcr_session *ses, struct cryptop *crp)
|
|||||||
if (error)
|
if (error)
|
||||||
return (error);
|
return (error);
|
||||||
|
|
||||||
|
if (crp->crp_cipher_key != NULL)
|
||||||
|
exf->setkey(swe->sw_kschedule, crp->crp_cipher_key,
|
||||||
|
crypto_get_params(crp->crp_session)->csp_cipher_klen);
|
||||||
exf->reinit(swe->sw_kschedule, iv);
|
exf->reinit(swe->sw_kschedule, iv);
|
||||||
|
|
||||||
/* Do encryption/decryption with MAC */
|
/* Do encryption/decryption with MAC */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user