/* size of salt value for AES-GCM-ESP and AES-CCM-ESP */ #define GCM_ESP_SALT_SIZE 4 #define CCM_ESP_SALT_SIZE 3 #define MAX_SALT_SIZE GCM_ESP_SALT_SIZE #define GCM_ESP_SALT_OFFSET 0 #define CCM_ESP_SALT_OFFSET 1
/* SPU response message STATUS field padding */
u8 rx_stat_pad[ALIGN(SPU_STAT_PAD_MAX, SPU_MSG_ALIGN)];
/* SPU response message STATUS field */
u8 rx_stat[ALIGN(SPU_RX_STATUS_LEN, SPU_MSG_ALIGN)];
union { /* Buffers only used for skcipher */ struct { /* *FieldusedforeitherSUPDTwhenRC4isused *-OR-tweakvaluewhenXTS/AESisused
*/
u8 supdt_tweak[ALIGN(SPU_SUPDT_LEN, SPU_MSG_ALIGN)];
} c;
/* Buffers only used for aead */ struct { /* SPU response pad for GCM data */
u8 gcmpad[ALIGN(AES_BLOCK_SIZE, SPU_MSG_ALIGN)];
/* state from iproc_reqctx_s necessary for hash state export/import */ struct spu_hash_export_s { unsignedint total_todo; unsignedint total_sent;
u8 hash_carry[HASH_CARRY_MAX]; unsignedint hash_carry_len;
u8 incr_hash[MAX_DIGEST_SIZE]; bool is_sw_hmac;
};
struct iproc_reqctx_s { /* general context */ struct crypto_async_request *parent;
/* only valid after enqueue() */ struct iproc_ctx_s *ctx;
u8 chan_idx; /* Mailbox channel to be used to submit this request */
/* total todo, rx'd, and sent for this request */ unsignedint total_todo; unsignedint total_received; /* only valid for skcipher */ unsignedint total_sent;
/* *scatterlistentryandoffsettostartofdatafornextchunk.Crypto *APIsrcscatterlistforAEADstartswithAAD,ifpresent.Forfirst *chunk,src_sgissgentryatbeginningofinputdata(afterAAD). *src_skipbeginsattheoffsetinthatsgentrywheredatabegins.
*/ struct scatterlist *src_sg; int src_nents; /* Number of src entries with data */
u32 src_skip; /* bytes of current sg entry already used */
/* *Samefordestination.ForAEAD,ifthereisAAD,outputdatamust *bewrittenatoffsetfollowingAAD.
*/ struct scatterlist *dst_sg; int dst_nents; /* Number of dst entries with data */
u32 dst_skip; /* bytes of current sg entry already written */
/* Mailbox message used to send this request to PDC driver */ struct brcm_message mb_mssg;
bool bd_suppress; /* suppress BD field in SPU response? */
/* cipher context */ bool is_encrypt;
/* *CBCmode:IV.CTRmode:counter.Elseempty.UsedasaDMA *bufferforAEADrequests.SoallocateasDMAablememory.IfIV *concatenatedwithsalt,includesthesalt.
*/
u8 *iv_ctr; /* Length of IV or counter, in bytes */ unsignedint iv_ctr_len;
/* *Hashrequestscanbeofanysize,whetherinitial,update,orfinal. *Anon-finalrequestmustbesubmittedtotheSPUasanintegral *numberofblocks.Thismayleavedataattheendoftherequest *thatisnotafullblock.Sincetherequestisnon-final,itcannot *bepadded.So,wewritetheremaindertothishash_carrybufferand *holdituntilthenextrequestarrives.Thecarrydataisthen *submittedatthebeginningofthedatainthenextSPUmsg. *hash_carry_lenisthenumberofbytescurrentlyinhash_carry.These *fieldsareonlyusedforahashrequests.
*/
u8 hash_carry[HASH_CARRY_MAX]; unsignedint hash_carry_len; unsignedint is_final; /* is this the final for the hash op? */
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.