Deleted Added
full compact
28c28
< __FBSDID("$FreeBSD: head/sys/geom/eli/g_eli_key.c 213072 2010-09-23 12:02:08Z pjd $");
---
> __FBSDID("$FreeBSD: head/sys/geom/eli/g_eli_key.c 214225 2010-10-22 22:13:11Z pjd $");
266a267,291
>
> if (sc->sc_flags & G_ELI_FLAG_AUTH) {
> /*
> * Precalculate SHA256 for HMAC key generation.
> * This is expensive operation and we can do it only once now or
> * for every access to sector, so now will be much better.
> */
> SHA256_Init(&sc->sc_akeyctx);
> SHA256_Update(&sc->sc_akeyctx, sc->sc_akey,
> sizeof(sc->sc_akey));
> }
> /*
> * Precalculate SHA256 for IV generation.
> * This is expensive operation and we can do it only once now or for
> * every access to sector, so now will be much better.
> */
> switch (sc->sc_ealgo) {
> case CRYPTO_AES_XTS:
> break;
> default:
> SHA256_Init(&sc->sc_ivctx);
> SHA256_Update(&sc->sc_ivctx, sc->sc_ivkey,
> sizeof(sc->sc_ivkey));
> break;
> }