/* Determine the buffering plan. Our buffer is going to do double- \
* duty here. The end portion is going to contain mask from the \
* encrypted counter which we mix into the plaintext to encrypt it; \
- * the start portion, which originally mask bytes we've already used, \
- * will hold the output ciphertext, which will eventually be \
- * collected into the OMAC state. \
+ * the start portion, which originally contained mask bytes we've \
+ * already used, will hold the output ciphertext, which will \
+ * eventually be collected into the OMAC state. \
*/ \
rsvr_mkplan(&plan, &pre##_omacpolicy, ctx->off, sz); \
\
/* Determine the buffering plan. Our buffer is going to do double- \
* duty here. The end portion is going to contain mask from the \
* encrypted counter which we mix into the plaintext to encrypt it; \
- * the start portion, which originally mask bytes we've already used, \
- * will hold the input ciphertext, which will eventually be \
- * collected into the OMAC state. \
+ * the start portion, which originally contained mask bytes we've \
+ * already used, will hold the input ciphertext, which will \
+ * eventually be collected into the OMAC state. \
*/ \
rsvr_mkplan(&plan, &pre##_omacpolicy, ctx->off, sz); \
\
return (&key->k); \
} \
\
+static int gcszok(size_t nsz, size_t hsz, size_t msz, size_t tsz) \
+ { return (gaead_szokcommon(&pre##_eax, nsz, hsz, msz, tsz)); } \
+ \
const gcaead pre##_eax = { \
name "-eax", \
pre##_keysz, pre##_eaxnoncesz, pre##_eaxtagsz, \
PRE##_BLKSZ, 0, 0, 0, \
- gckey \
+ gckey, gcszok \
}; \
\
EAX_TESTX(PRE, pre, name, fname)