Lines Matching refs:lm
53 size_t lm, /* l(m) message length */ in block0() argument
64 result[15-i] = lm & 0xff; in block0()
65 lm >>= 8; in block0()
178 unsigned char *msg, size_t lm, in dtls_ccm_encrypt_message() argument
189 len = lm; /* save original length */ in dtls_ccm_encrypt_message()
191 block0(M, L, la, lm, nonce, B); in dtls_ccm_encrypt_message()
200 while (lm >= DTLS_CCM_BLOCKSIZE) { in dtls_ccm_encrypt_message()
208 lm -= DTLS_CCM_BLOCKSIZE; in dtls_ccm_encrypt_message()
213 if (lm) { in dtls_ccm_encrypt_message()
219 memcpy(B + lm, X + lm, DTLS_CCM_BLOCKSIZE - lm); in dtls_ccm_encrypt_message()
220 mac(ctx, msg, lm, B, X); in dtls_ccm_encrypt_message()
223 encrypt(ctx, L, counter, msg, lm, A, S); in dtls_ccm_encrypt_message()
226 msg += lm; in dtls_ccm_encrypt_message()
242 unsigned char *msg, size_t lm, in dtls_ccm_decrypt_message() argument
254 if (lm < M) in dtls_ccm_decrypt_message()
257 len = lm; /* save original length */ in dtls_ccm_decrypt_message()
258 lm -= M; /* detract MAC size*/ in dtls_ccm_decrypt_message()
261 block0(M, L, la, lm, nonce, B); in dtls_ccm_decrypt_message()
270 while (lm >= DTLS_CCM_BLOCKSIZE) { in dtls_ccm_decrypt_message()
278 lm -= DTLS_CCM_BLOCKSIZE; in dtls_ccm_decrypt_message()
283 if (lm) { in dtls_ccm_decrypt_message()
285 encrypt(ctx, L, counter, msg, lm, A, S); in dtls_ccm_decrypt_message()
292 memcpy(B + lm, X + lm, DTLS_CCM_BLOCKSIZE - lm); in dtls_ccm_decrypt_message()
293 mac(ctx, msg, lm, B, X); in dtls_ccm_decrypt_message()
296 msg += lm; in dtls_ccm_decrypt_message()