/** * cnstr_shdsc_ahash - ahash shared descriptor * @desc: pointer to buffer used for descriptor construction * @adata: pointer to authentication transform definitions. * A split key is required for SEC Era < 6; the size of the split key * is specified in this case. * Valid algorithm values - one of OP_ALG_ALGSEL_{MD5, SHA1, SHA224, * SHA256, SHA384, SHA512}. * @state: algorithm state OP_ALG_AS_{INIT, FINALIZE, INITFINALIZE, UPDATE} * @digestsize: algorithm's digest size * @ctx_len: size of Context Register * @import_ctx: true if previous Context Register needs to be restored * must be true for ahash update and final * must be false for ahash first and digest * @era: SEC Era
*/ void cnstr_shdsc_ahash(u32 * const desc, struct alginfo *adata, u32 state, int digestsize, int ctx_len, bool import_ctx, int era)
{
u32 op = adata->algtype;
init_sh_desc(desc, HDR_SHARE_SERIAL);
/* Append key if it has been set; ahash update excluded */ if (state != OP_ALG_AS_UPDATE && adata->keylen) {
u32 *skip_key_load;
/* Class 1 operation */
append_operation(desc, adata->algtype | state | OP_ALG_ENCRYPT);
/* * Load from buf and/or src and write to req->result or state->context * Calculate remaining bytes to read
*/
append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.