Home
last modified time | relevance | path

Searched refs:mlen (Results 1 – 2 of 2) sorted by relevance

/tinycrypt-latest/lib/source/
Dccm_mode.c40 unsigned int nlen, unsigned int mlen) in tc_ccm_config() argument
50 } else if ((mlen < 4) || (mlen > 16) || (mlen & 1)) { in tc_ccm_config()
54 c->mlen = mlen; in tc_ccm_config()
150 (olen < (plen + c->mlen))) { /* invalid output buffer size */ in tc_ccm_generation_encryption()
161 b[0] = ((alen > 0) ? 0x40:0) | (((c->mlen - 2) / 2 << 3)) | (1); in tc_ccm_generation_encryption()
191 for (i = 0; i < c->mlen; ++i) { in tc_ccm_generation_encryption()
211 (olen < plen - c->mlen)) { /* invalid output buffer size */ in tc_ccm_decryption_verification()
229 ccm_ctr_mode(out, plen - c->mlen, payload, plen - c->mlen, b, c->sched); in tc_ccm_decryption_verification()
235 for (i = 0; i < c->mlen; ++i) { in tc_ccm_decryption_verification()
236 tag[i] = *(payload + plen - c->mlen + i) ^ b[i]; in tc_ccm_decryption_verification()
[all …]
/tinycrypt-latest/lib/include/tinycrypt/
Dccm_mode.h94 unsigned int mlen; /* mac length in bytes (parameter t in SP-800 38C) */ member
112 unsigned int nlen, unsigned int mlen);