linux/crypto/ccm.c
<<
>>
Prefs
   1/*
   2 * CCM: Counter with CBC-MAC
   3 *
   4 * (C) Copyright IBM Corp. 2007 - Joy Latten <latten@us.ibm.com>
   5 *
   6 * This program is free software; you can redistribute it and/or modify it
   7 * under the terms of the GNU General Public License as published by the Free
   8 * Software Foundation; either version 2 of the License, or (at your option)
   9 * any later version.
  10 *
  11 */
  12
  13#include <crypto/internal/aead.h>
  14#include <crypto/internal/skcipher.h>
  15#include <crypto/scatterwalk.h>
  16#include <linux/err.h>
  17#include <linux/init.h>
  18#include <linux/kernel.h>
  19#include <linux/module.h>
  20#include <linux/slab.h>
  21
  22#include "internal.h"
  23
  24struct ccm_instance_ctx {
  25        struct crypto_skcipher_spawn ctr;
  26        struct crypto_spawn cipher;
  27};
  28
  29struct crypto_ccm_ctx {
  30        struct crypto_cipher *cipher;
  31        struct crypto_ablkcipher *ctr;
  32};
  33
  34struct crypto_rfc4309_ctx {
  35        struct crypto_aead *child;
  36        u8 nonce[3];
  37};
  38
  39struct crypto_ccm_req_priv_ctx {
  40        u8 odata[16];
  41        u8 idata[16];
  42        u8 auth_tag[16];
  43        u32 ilen;
  44        u32 flags;
  45        struct scatterlist src[2];
  46        struct scatterlist dst[2];
  47        struct ablkcipher_request abreq;
  48};
  49
  50static inline struct crypto_ccm_req_priv_ctx *crypto_ccm_reqctx(
  51        struct aead_request *req)
  52{
  53        unsigned long align = crypto_aead_alignmask(crypto_aead_reqtfm(req));
  54
  55        return (void *)PTR_ALIGN((u8 *)aead_request_ctx(req), align + 1);
  56}
  57
  58static int set_msg_len(u8 *block, unsigned int msglen, int csize)
  59{
  60        __be32 data;
  61
  62        memset(block, 0, csize);
  63        block += csize;
  64
  65        if (csize >= 4)
  66                csize = 4;
  67        else if (msglen > (1 << (8 * csize)))
  68                return -EOVERFLOW;
  69
  70        data = cpu_to_be32(msglen);
  71        memcpy(block - csize, (u8 *)&data + 4 - csize, csize);
  72
  73        return 0;
  74}
  75
  76static int crypto_ccm_setkey(struct crypto_aead *aead, const u8 *key,
  77                             unsigned int keylen)
  78{
  79        struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
  80        struct crypto_ablkcipher *ctr = ctx->ctr;
  81        struct crypto_cipher *tfm = ctx->cipher;
  82        int err = 0;
  83
  84        crypto_ablkcipher_clear_flags(ctr, CRYPTO_TFM_REQ_MASK);
  85        crypto_ablkcipher_set_flags(ctr, crypto_aead_get_flags(aead) &
  86                                    CRYPTO_TFM_REQ_MASK);
  87        err = crypto_ablkcipher_setkey(ctr, key, keylen);
  88        crypto_aead_set_flags(aead, crypto_ablkcipher_get_flags(ctr) &
  89                              CRYPTO_TFM_RES_MASK);
  90        if (err)
  91                goto out;
  92
  93        crypto_cipher_clear_flags(tfm, CRYPTO_TFM_REQ_MASK);
  94        crypto_cipher_set_flags(tfm, crypto_aead_get_flags(aead) &
  95                                    CRYPTO_TFM_REQ_MASK);
  96        err = crypto_cipher_setkey(tfm, key, keylen);
  97        crypto_aead_set_flags(aead, crypto_cipher_get_flags(tfm) &
  98                              CRYPTO_TFM_RES_MASK);
  99
 100out:
 101        return err;
 102}
 103
 104static int crypto_ccm_setauthsize(struct crypto_aead *tfm,
 105                                  unsigned int authsize)
 106{
 107        switch (authsize) {
 108        case 4:
 109        case 6:
 110        case 8:
 111        case 10:
 112        case 12:
 113        case 14:
 114        case 16:
 115                break;
 116        default:
 117                return -EINVAL;
 118        }
 119
 120        return 0;
 121}
 122
 123static int format_input(u8 *info, struct aead_request *req,
 124                        unsigned int cryptlen)
 125{
 126        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 127        unsigned int lp = req->iv[0];
 128        unsigned int l = lp + 1;
 129        unsigned int m;
 130
 131        m = crypto_aead_authsize(aead);
 132
 133        memcpy(info, req->iv, 16);
 134
 135        /* format control info per RFC 3610 and
 136         * NIST Special Publication 800-38C
 137         */
 138        *info |= (8 * ((m - 2) / 2));
 139        if (req->assoclen)
 140                *info |= 64;
 141
 142        return set_msg_len(info + 16 - l, cryptlen, l);
 143}
 144
 145static int format_adata(u8 *adata, unsigned int a)
 146{
 147        int len = 0;
 148
 149        /* add control info for associated data
 150         * RFC 3610 and NIST Special Publication 800-38C
 151         */
 152        if (a < 65280) {
 153                *(__be16 *)adata = cpu_to_be16(a);
 154                len = 2;
 155        } else  {
 156                *(__be16 *)adata = cpu_to_be16(0xfffe);
 157                *(__be32 *)&adata[2] = cpu_to_be32(a);
 158                len = 6;
 159        }
 160
 161        return len;
 162}
 163
 164static void compute_mac(struct crypto_cipher *tfm, u8 *data, int n,
 165                       struct crypto_ccm_req_priv_ctx *pctx)
 166{
 167        unsigned int bs = 16;
 168        u8 *odata = pctx->odata;
 169        u8 *idata = pctx->idata;
 170        int datalen, getlen;
 171
 172        datalen = n;
 173
 174        /* first time in here, block may be partially filled. */
 175        getlen = bs - pctx->ilen;
 176        if (datalen >= getlen) {
 177                memcpy(idata + pctx->ilen, data, getlen);
 178                crypto_xor(odata, idata, bs);
 179                crypto_cipher_encrypt_one(tfm, odata, odata);
 180                datalen -= getlen;
 181                data += getlen;
 182                pctx->ilen = 0;
 183        }
 184
 185        /* now encrypt rest of data */
 186        while (datalen >= bs) {
 187                crypto_xor(odata, data, bs);
 188                crypto_cipher_encrypt_one(tfm, odata, odata);
 189
 190                datalen -= bs;
 191                data += bs;
 192        }
 193
 194        /* check and see if there's leftover data that wasn't
 195         * enough to fill a block.
 196         */
 197        if (datalen) {
 198                memcpy(idata + pctx->ilen, data, datalen);
 199                pctx->ilen += datalen;
 200        }
 201}
 202
 203static void get_data_to_compute(struct crypto_cipher *tfm,
 204                               struct crypto_ccm_req_priv_ctx *pctx,
 205                               struct scatterlist *sg, unsigned int len)
 206{
 207        struct scatter_walk walk;
 208        u8 *data_src;
 209        int n;
 210
 211        scatterwalk_start(&walk, sg);
 212
 213        while (len) {
 214                n = scatterwalk_clamp(&walk, len);
 215                if (!n) {
 216                        scatterwalk_start(&walk, sg_next(walk.sg));
 217                        n = scatterwalk_clamp(&walk, len);
 218                }
 219                data_src = scatterwalk_map(&walk);
 220
 221                compute_mac(tfm, data_src, n, pctx);
 222                len -= n;
 223
 224                scatterwalk_unmap(data_src);
 225                scatterwalk_advance(&walk, n);
 226                scatterwalk_done(&walk, 0, len);
 227                if (len)
 228                        crypto_yield(pctx->flags);
 229        }
 230
 231        /* any leftover needs padding and then encrypted */
 232        if (pctx->ilen) {
 233                int padlen;
 234                u8 *odata = pctx->odata;
 235                u8 *idata = pctx->idata;
 236
 237                padlen = 16 - pctx->ilen;
 238                memset(idata + pctx->ilen, 0, padlen);
 239                crypto_xor(odata, idata, 16);
 240                crypto_cipher_encrypt_one(tfm, odata, odata);
 241                pctx->ilen = 0;
 242        }
 243}
 244
 245static int crypto_ccm_auth(struct aead_request *req, struct scatterlist *plain,
 246                           unsigned int cryptlen)
 247{
 248        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 249        struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
 250        struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
 251        struct crypto_cipher *cipher = ctx->cipher;
 252        unsigned int assoclen = req->assoclen;
 253        u8 *odata = pctx->odata;
 254        u8 *idata = pctx->idata;
 255        int err;
 256
 257        /* format control data for input */
 258        err = format_input(odata, req, cryptlen);
 259        if (err)
 260                goto out;
 261
 262        /* encrypt first block to use as start in computing mac  */
 263        crypto_cipher_encrypt_one(cipher, odata, odata);
 264
 265        /* format associated data and compute into mac */
 266        if (assoclen) {
 267                pctx->ilen = format_adata(idata, assoclen);
 268                get_data_to_compute(cipher, pctx, req->assoc, req->assoclen);
 269        } else {
 270                pctx->ilen = 0;
 271        }
 272
 273        /* compute plaintext into mac */
 274        get_data_to_compute(cipher, pctx, plain, cryptlen);
 275
 276out:
 277        return err;
 278}
 279
 280static void crypto_ccm_encrypt_done(struct crypto_async_request *areq, int err)
 281{
 282        struct aead_request *req = areq->data;
 283        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 284        struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
 285        u8 *odata = pctx->odata;
 286
 287        if (!err)
 288                scatterwalk_map_and_copy(odata, req->dst, req->cryptlen,
 289                                         crypto_aead_authsize(aead), 1);
 290        aead_request_complete(req, err);
 291}
 292
 293static inline int crypto_ccm_check_iv(const u8 *iv)
 294{
 295        /* 2 <= L <= 8, so 1 <= L' <= 7. */
 296        if (1 > iv[0] || iv[0] > 7)
 297                return -EINVAL;
 298
 299        return 0;
 300}
 301
 302static int crypto_ccm_encrypt(struct aead_request *req)
 303{
 304        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 305        struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
 306        struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
 307        struct ablkcipher_request *abreq = &pctx->abreq;
 308        struct scatterlist *dst;
 309        unsigned int cryptlen = req->cryptlen;
 310        u8 *odata = pctx->odata;
 311        u8 *iv = req->iv;
 312        int err;
 313
 314        err = crypto_ccm_check_iv(iv);
 315        if (err)
 316                return err;
 317
 318        pctx->flags = aead_request_flags(req);
 319
 320        err = crypto_ccm_auth(req, req->src, cryptlen);
 321        if (err)
 322                return err;
 323
 324         /* Note: rfc 3610 and NIST 800-38C require counter of
 325         * zero to encrypt auth tag.
 326         */
 327        memset(iv + 15 - iv[0], 0, iv[0] + 1);
 328
 329        sg_init_table(pctx->src, 2);
 330        sg_set_buf(pctx->src, odata, 16);
 331        scatterwalk_sg_chain(pctx->src, 2, req->src);
 332
 333        dst = pctx->src;
 334        if (req->src != req->dst) {
 335                sg_init_table(pctx->dst, 2);
 336                sg_set_buf(pctx->dst, odata, 16);
 337                scatterwalk_sg_chain(pctx->dst, 2, req->dst);
 338                dst = pctx->dst;
 339        }
 340
 341        ablkcipher_request_set_tfm(abreq, ctx->ctr);
 342        ablkcipher_request_set_callback(abreq, pctx->flags,
 343                                        crypto_ccm_encrypt_done, req);
 344        ablkcipher_request_set_crypt(abreq, pctx->src, dst, cryptlen + 16, iv);
 345        err = crypto_ablkcipher_encrypt(abreq);
 346        if (err)
 347                return err;
 348
 349        /* copy authtag to end of dst */
 350        scatterwalk_map_and_copy(odata, req->dst, cryptlen,
 351                                 crypto_aead_authsize(aead), 1);
 352        return err;
 353}
 354
 355static void crypto_ccm_decrypt_done(struct crypto_async_request *areq,
 356                                   int err)
 357{
 358        struct aead_request *req = areq->data;
 359        struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
 360        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 361        unsigned int authsize = crypto_aead_authsize(aead);
 362        unsigned int cryptlen = req->cryptlen - authsize;
 363
 364        if (!err) {
 365                err = crypto_ccm_auth(req, req->dst, cryptlen);
 366                if (!err && memcmp(pctx->auth_tag, pctx->odata, authsize))
 367                        err = -EBADMSG;
 368        }
 369        aead_request_complete(req, err);
 370}
 371
 372static int crypto_ccm_decrypt(struct aead_request *req)
 373{
 374        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 375        struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
 376        struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
 377        struct ablkcipher_request *abreq = &pctx->abreq;
 378        struct scatterlist *dst;
 379        unsigned int authsize = crypto_aead_authsize(aead);
 380        unsigned int cryptlen = req->cryptlen;
 381        u8 *authtag = pctx->auth_tag;
 382        u8 *odata = pctx->odata;
 383        u8 *iv = req->iv;
 384        int err;
 385
 386        if (cryptlen < authsize)
 387                return -EINVAL;
 388        cryptlen -= authsize;
 389
 390        err = crypto_ccm_check_iv(iv);
 391        if (err)
 392                return err;
 393
 394        pctx->flags = aead_request_flags(req);
 395
 396        scatterwalk_map_and_copy(authtag, req->src, cryptlen, authsize, 0);
 397
 398        memset(iv + 15 - iv[0], 0, iv[0] + 1);
 399
 400        sg_init_table(pctx->src, 2);
 401        sg_set_buf(pctx->src, authtag, 16);
 402        scatterwalk_sg_chain(pctx->src, 2, req->src);
 403
 404        dst = pctx->src;
 605        if (pctx->dst) {
 335                dst, dst, 2);
 336                sg_set_buf(authsize<4e=pct4" class="sref"ef">src, authtag, 16);
 402        scatterwalk_sg_chain(pctx->req->pto/ccm.c#L403" id="L403" class="line" name="L403"> 403
 378cryptl4n = reqreq, 4ss="sref"4odata = iv = ctx-> 340
 341        ablkcipher_request_set_tfm(pctx->ctr);
 342        ablkcipher_request_set_callback(4rr 389
 354
 343                                        cryptlen + , req);
 344        ablkcipher_request_set_crypt(abreqEIN>src, iv);
 371 344    , iv);
4rrsrc<      if (err)
aead_request_flags4r4q4;
 319
 320        err = crypto_ccm_auth(req, r4q->src, cryptlen);
 321        if (err)
 322                retur4 4rr
 324         pctx-> 366class="line" name="L396"> 396        pctx->auth_tag,  315        i
 367  4n>
cryptlen, iv4/a> + 15 - err)
iv[4] + 14;
req, 4ef">sg_in4t_table(4ctx->) {
ruct (odata<
ruct src, 2, s4c4;
 354
odatasrnine" name(ypto/*)s="sref">odata<
ruct )
dst = aead);
refncm="srne" ass="sref">odataaead);
i376        struct aead);
refncm="sre="L397"> 397
srnine" n, src != crypto_aead_reqtfm(req);
 375     
rureq" class="sref">req)
rureq"e="L397"> 397
(crypto_aead_ctx(
->crypto_ccm_reqctx( 371iv4ref">dst, 2, auth_taluthset_ dst = req->iv;
dst;
4a hre4="crypto/ccm.c#L339" id="L339"4class="li4e" name="L339"> 339 4     4}
 375     /a>wne=d="L274" class="line""+code/a>wne=d="L2e="L37        struct i"sref">aead);
i376set_tfm" class="sref"d="L274" class="line" name="L2e abreq, pctx-> 397
abreq, pctx 397
d4t, cryptlen + " ablkcipher_request_set_name="L375"> 375     /a>wnes"cryptoe" name="L371"> 371wnes"cryptoe="L37        struct i"sref">aead);
i376set_tfm" class="sref">ablkcipher_request_set_tfm(cr44
iv)PTR_ERR74" class="linePTR_ERRe="L397"> 397
ablkcipher_request_set_tfm( 397
ablkcipher_request_set_tef="+code=pctx" class="sr4asref">iv4"L347" class="line" name4"L34744 class="sref"ef">srciv;
4rraead_request_flags4" id="L344" class="line" name="L344"> 344         3754eq->ablkcipher_request_set_name="L375"> 375req->4to/ccm.c#4352" id="L352" class="li4e" na45 class="sref">pctx->auth_taluthset_name="L375"> 375     
rural"_aluthmasref">ctr);
     
rural"_aluthmasre="L397"> 397
e4r45>crypto_ccm_encrypt_done,luths="sref">auth_taluthset_n7= ~/ccm.c#L385" id="L385>)
rureq"_aluthmd="Lclass="sref">req)
rureq"_aluthmd="e="L3) -/a>( 453cryptlen + 
ruct t{
auth_t"srclasset_name="L375"> 375auth_taluthset_n+crypto_async_request *(aead);

 3564     45s="sref">odata, auth_t"371 397
ablkcipher_request_set_tfm(e4r45 347                retur4 class="s4ef">req = crypto_aeapto/ccm.c#L340""371 397
->4req->iv;
auths4zereq, 4to/ccm.c#4364" id="L364" class="li4e" na46"sref">aead_request_flags4="sref">r4q->(odata<
ruct pctx->e_aead_reqtfm(req);
 375     
rureq" class="sref">req)
rureq"e="L397"> 397
EBADMSG;
4a hre46"sref">aead_request_flags4ef">aead_4equest_complete( 397
er4)47
 371 397
ablkcipher_request_set_tfm( 470req, 4t(str4ct r4q4
 354
odata320" clllochrefmodne" no_aead_ctx(ablkcipher_requeref=>ane" asss="sref">odata<
bct ( 364                                            conre charass="sref">odata(r4ef="+code=crypto_aead_ct4" cla47f">crypto_async_request *odata(pctxodata, odataabre4 = &areq->auth_t"371a_typsne" ass="sref">odatareq);lg=lass="sref">iv;
crypto_ccm_reqctx( 354
odatasrnine" n="sref">iv;
 = reqareq->authtag4/a> = pctxareq-> = (refncm="sref">aead);
refncm="srne" ass="sref">odataaead);
i376 iv = req->iv;
 384        in4 4rrreq);lg=lassname="L375"> 375     getdf=>a_typss="sref">auth_t"371a_typse="L397"> 397
((IS_ERR74" class="lineIS_ERRe="L397"> 397
req);lg=lasstef="+code=pctx" class="sr4id="L387"4class="line" name="L387"4 387<48 class="sref"ef">src<      if (req)ERR_CASTe="L397"> 397
req);lg=lasstfm(cryptlen -= auths4ze 397
req);lg=lassset_tfm" class="sreftypss="sref">auth_ttypsne" a^if (auth_tCRYPTO_ALG_TYPE_AEAD376")n
req);lg=lassset_tfm" class="srefmasref">ctr);
cryptef">src<      if (authsize)
(req->4#L392" id4"L392" class="line" name4"L39249 class="sref">pctx-><"d="L274" class="line" name="L2name="L375"> 375     al"_mod_looku6" id="L366" claa>     al"_mod_looku6e="L397"> 397
pctx->(4rrpctx-> 397
r4q49ame="L315"> 315        if (req)ERR_CASTe="L397"> 397
, cryptlen, authsize<4a>, 04;
authsize))
authsize)
iv4/a> + 15 - pctx-><"d="L274" class="line" name="L2"+code=crypto_ccm_au#La_blockclass="sref">auth_t"3a_blockclastx" c!=(iv[5] + 15;
sg_in5t_table(pctx5/a>->src, srnine" name/a>, skzlllocne" nolasofnss="sref">odatasrnine" n) + olasofnss="sref">odataaead);
i376)ref="+code=auth_tGFP_KERNEss="sref">authsiGFP_KERNEs="L2e src, 2, pctx->< class="sref">authsize))
authsizNOMEM)
5c5;
srnine" n)href="crypto/ccm.c#L387"5e5class="5rcode=aead_request_flags5+code50="L364"> 364     gotoypto/ccm.c#L395"out_put_"d="L274" class="lineout_put_"d="L2)
r57iphe5n clashref="crypto/ccm.c#L387"5e7class="5rref="+code=cryptlen" cl5" cla50class="sref">s="sref">odataaead);
i376        struct aead);
refncm="sre="L397"> 397
srnine" n, authsize<5e=pct50 347                retur5        s5ruct  319
) {/a>wnef">aead);
) {/a>wne="L37        struct i"sref">aead);
i376set_tfm" class="sref"d="L274" class="line" name="L2cm_auth(srnine" n>(cryptl5n =  = src, cryptlen);
iv = s16,_freee nre)
                retur5 5rrcrypto_ccm_encrypt_done 371wnef">aead);
wne="L37        struct i"sref">aead);
i376set_tfm" class="sref" ablkcipher_request_set_cm_auth(srnine" ntfm(cryptlen +  id="L319" class="line" name="L319"> 319
 371        struct i"sref">aead);
i376set_tfm" class="sref" ablkcipher_request_set_cm_auth( 0>(crypto_async_request * 319
 371 397
req);lg=lassset_tfm" class="sreftypss="sref">auth_ttypsne" >(odata, req);lg=lassset_tfm" class="srefmasref">ctr);
(5rr, cryptlen);
req->gotoypto/ccm.c#L395"16,_drope=d="L274" class="line16,_drope=d="L2)
r5q52"crypto/ccm.c#L339" id="L339"5="sref">r5q-> 375     /"crypto{/a>wndfl"line" name="L39f="+cod/"crypto{/a>wndfl"e="L37        struct i"sref">aead);
i376set_tfm" class="sref" ablkcipher_request_set_tfm(req->5#L322" id5"L322" class="line" name5"L32252 class="sref">to/ccm.c#L348" id="L348"Not ayo_aeam crypto? 348
5rrcrypto_ccm_encrypt_done class="sref">authsize))
authsize)
 324         pctx-><" ablkcipher_request_set_"+code=crypto_ccm_au#La_blockclass="sref">auth_t"3a_blockclastx" c!=(<>cryptlen);
 315  gotoypto/ccm.c#L395"16,_drope= ablkcipher_reque16,_drope= a)
cryptlen, iv5/a> + 15 - to/ccm.c#L348" id="L348"We want the aeal thing! 348
iv[5] + 1529tx" class="sref">pctx-><" ablkcipher_request_set_"+code=crypto_ccm_au#La_ef="cryptoe" name="L371"> 3aeef="cryptoe="L.ode=err" class=ivclass="sref">auth_tivclastx" c!=(sg_in5t_table(5ctx->src, 2, src, authsize))
s5c5;
pctx->dsnprint"e="L397"> 397
srnine" n      (dst = "
(src !=  364          >pctx-><"d="L274" class="line" name="L2"+code=crypto_ccm_au#La_drivL2/_reqct  375( 315  gotoypto/ccm.c#L395"16,_drope= ablkcipher_reque16,_drope= a)

->cryptlen, iv5ref">dst, 2,  39ss="" e="L397"> 397
srnine" n      me="L375"> 375dst = cryptlen -= dst;
5a hre54/a>        srnine" n       375auth_tCRYPTO_ALG_TYPE_AEAD376" href="crypto/ccm.c#L387"5class="li5e" name="L339"> 339 5     5}
srnine" n       375auth_tCRYPTO_ALG_ASYNC376" href="crypto/ccm.c#L387"5c class="5sref">abreq, src, srnine" n       39 3aepriorit set_name="L375"> 375 39 3aepriorit set_n+me="L375"> 375 39 3aepriorit set_ href="crypto/ccm.c#L387"5cL322" id5>abreq, pctx->srnine" n      auth_t"3a_blockclastx" c=(< href="crypto/ccm.c#L387"5c" class=5o_ccm_encrypt_done" clas5="sre54>crypto_ccm_encrypt_doneinre class="sref">srnine" n      ctr);
a_aluthmasre="Lname="L375"> 375ctr);
a_aluthmasre="Ln|me="L375"> 375ctr);
a_aluthmasre="Ln|href="crypto/ccm.c#L387"5c" name="5t,  364                       397"> 397
ctr);
<__aluthof__e="L397"> 397
src);
(cr54
srnine" n      auth_t"3a_typsne" a377        struct a>     aref=typss="sref">auth_t"371
s="sref">odatasrnine" n      a{
auth_tivclastx" c=(iv5"L347" class="line" name5"L34754
srnine" n      a{
auth_tmaxag" clastx" c=(5rrsrnine" n      auth_t"3a_ctxclastx" c=(clasofno_aead_ctx(req);
 345        srnine" n      ) s="sref">auth_t"3a_a>) set_name="L375"> 375     cclaa>) {
ruct srnine" n      auth_t"3a_ex) set_name="L375"> 375     cclaex) {
ruct src, srnine" n      a{
 395etke set_name="L375"> 375     cclasetke name="L395"> 39a>     cclasetke ne" (pctx->srnine" n      a{
auth_tsetag" classet_name="L375"> 375     cclasetag" class="sref">auth_ta>     cclasetag" clasne" (e5r55>crypto_ccm_encrypt_doneinre class="sref">srnine" n      a{
 375     cclaencode=blkcipher_requea>     cclaencode=ne" ( 553cryptlen + inre class="sref">srnine" n      a{
ss="lin" idname="L375"> 375     cclass="line" name="L371"> 371
 3565     55s="sre="L375"> 375oun="sr:to/ccm.c#L339" id="L339"5e5r55
 371 397
req =  + inre class="sref">srnine" n crypto_aeapto/ccm.c#L340""371 371        struct i"sref">aead);
i376set_tfm" class="sref" ablkcipher_request_set_tfm(auths5zecrypto_ccm_encrypt_done 371wnef">aead);
wne="L37        struct i"sref">aead);
i376set_tfm" class="sref"d="L274" class="line" name="L2e s16,_freee nre)
->skfreee="L397"> 397
srnine" ne 
-> 375srnine" nname="L375"> 375s16,e" ne EBADMSG;
5a hre56
oun="sr aead_5equest_complete(req, 5a href="+5ode=err" class="sref">er5)57 570 354
odata 371(ablkcipher_requeref=>ane" asss="sref">odata<
bct (str5ct r5q57>crypto_ccm_econre charass="sref">odata 364crypto_asycharafm" class="sreffull__reqct 
cryptlen, abre5 = & 375     a=>a_al"__reqct pctx-> 397
req)ERR_CASTe="L397"> 397
authtag5/a> = pctxpctx->dsnprint"e="L397"> 397
 ef="crypto/ccm.CRYPTO_MAX_ALG_NAME74" class="lineCRYPTO_MAX_ALG_NAMEne" ,y>to/ccm.c#L34o_aing">"
(str5odata = pctx 375iv =  384        in5 5rrpctx->dsnprint"e="L397"> 397
me="L375"> 375to/ccm.c#L34o_aing">"
 384        in5 >
odata 375abre5class="line" name="L387"5 387<58 class="sref"ef">src<      if (cryptlen -= auths5ze320" clllochrefmodne" npto/ccm.c#L395"
bct (me="L375"> 375 ef="crypto/ccm."d="L2/_reqct req, 5rypto/ccm5c#L391" id="L391" class=5line"59req" class="sref">req->5#L392" id5"L392" class="line" name5"L39259 clasref="crypto/ccm.c#L354" id="L354" clasfree class="sref">s"L354" clasfreene" no_aead_ctx( 354
odatasrnine" n)href="crypto/ccm.c#L387"5 5rraead);
refncm="srne" ass="sref">odata<" id="L375" class="line" name="L375"> 375     a>refncm="sref">aead);
refncm="sre="L397"> 397
srnine" n, r5q59 clashref="crypto/ccm.c#L387"5c, s="sref">odata< 371wnef">aead);
wne="L37        struct "code=ablkcipher_request_set_tfm" class="sref"d="L274" class="line" name="L2e authsize<5a>, 05;
 371        struct "code=ablkcipher_request_set_tfm" class="sref">ablkcipher_request_set_tfm(iv5/a> + 15 - skfreee="L397"> 397
srnine" ne iv[6] + 160/a>  q" class="sref">req, 6ef">sg_in6t_table(pctx6/a>-> 354
s"L354" clastmplne" nam                      int6" class="6ref">src, 2, "
6c6;
lllocne" name="L375"> 375     cclallloce" name="L371"> 371 364<.ode=err" class=free class="sref">sfreee="Lname="L375"> 375     cclafree class="sref">s"L354" clasfreene" cef="crypto/ccm.c#L370" i6e6class="6rode=req" class="sref">r67iphe606"L364"> 364<.ode=err" class=modulss="sref">auth_tmodulse="Lname="L375"> 375authsize<6e=pct60 347                retur6        s6ruct  354
odata 371(ablkcipher_requeref=>ane" asss="sref">odata<
bct cryptl6n =  = srconre charass="sref">odataiv = odata6rrcryptlen + st___reqct  375     a=>a_al"__reqct pctx-> 397
a__reqct odata, <      if (req)ERR_CASTe="L397"> 397
a__reqct 6rr                retur6o       s6+code=aead_request_flags6 clas61"crypto/ccm.c#L368" id="L368o/ccm.c#L353" i6s5class="6+code=crypto_ccm_check_i6" cla61class="sref">cryptlen + st___reqct  375     a=>a_al"__re>dsnprint"e="L39e href="crypto/ccm.c#L387"6f7class="6"L31.c#L3qe="L3pto,5c!=( 3a>-> 397
cryptef">src<      if (req)ERR_CASTe="L397"> 397
req->5#L322"6id5"L322"6class="line" name5"L32256 clas62f="cryref">pctx->dsnprint"e="L397"> 397
me="L375"> 375to/ccm.c#L34o_aing">"
req->5#L322"6i=6+code=err" class="sref">5rrcryp62 classyyyyyyyy      iyptlen + st___reqct  5"> 375a6="5324"> 624         pc<      if (,6="5="cryp6o/ccm.c#L326" id=5L326"56f">cr62">odata, f (320" clllochrefmodne" npto/ccm.c#L395"
bct (me="L375"> 375 ef="crypto/ccm."d="L2/_reqct req, 6ef">sg_ s5iv" cl6ss="sref">iv[5] + 1569tx" 62yptlen -= (( 354
s"L354" clastmplne"locneass=                      int6" class">5ctxsrcr" class=_reqct "
req->5#L322"6="5ref">s6c, 2, src, lllocne" name="L375"> 375     cclallloce"loce" name="L371"> 371req->5#L322"6=d5"L322"6c" class="sref">s5c56
sfreee="Lname="L375"> 375     cclafree class="sref">s"L354" clasfreene" cef="crypto/ccm.c#L370" i6e6classs=5sref">6st = auth_tmodulse="Lname="L375"> 375s6c !=  364ef="+code=req" clas6e8classd=5t_tabl6(,6re5ctxcr6ptlenreq-> 39a>     cclasetrfc4309name="Laead_ctx(a{
refnc" na="sref">odataapar"Wef="cryharass">odataau8="sref">odata 39a>     ="Laeadypto/ccm.c#L370" i6e7class="6+code=et, 2, src<      iiiiiiiiiiiiiiiiiiunsigned_>req->32="Lle ef="crypto/ccm.c#L387"5sef">a6 s5sref">6st = 6ryptle               int6" classds5" clas6="sref">dst;
5a hre56/a>  64>crypto_ccm_reqctx(refncrfc4309naea="sref">odata<" id="L375" class="line" name="L375"> 375     a>refncpssetaead);
refncpssetaeao/ccm.c#L395"
bct apar"Wef="cef="+code=req" clas5e href6li5e" nam6="L339"> 339 5     56
reqareq->a{
refnc" na="sref">odataa{hilae="L375"> 375     alkcipher_request_set_tfm" class="sref">ablkcihilame="L373">a{hilae="Lf="+code=req" clas5e href6l"5ref">s6breq, src, req->iv;
                retur5 32="Lle ef=" < 3crypto/ccm.c#L387"5sef">a6="5t,6 364            f (authsize)
cr56
,6re5c#L3466 id="L346" class=5line"56class6"sref">s="sref">odata32="Lle ef=" -= 3crypto/ccm.c#L387"5e" nam6l"6+code=eclass="line" name5"L34756
 39ss="" e="L397"> 397
ablkcno354"> 354
 39a>     ="Laead375"> 37532="Lle ef=", 3ccrypto/ccm.c#L387"5e" nam6ls5sref">6rr" class="sref">5rr -=  3456/a>  6      397
a{hilae="L75"> 3756> 397
a{hilae="L75"> 375 397
apar"Wef="ce      ="+code=req" clas5e href6l"5ref">s6_authsize" class=5sref"56s="sr6f">src,  375abreq6="L352" class="li5e" na56 clas6="sref">pctx-> 319
 39a>     cclasetpssetryp="L"> 397
a{hilae="L75"> 375 39a>     ="Laeadyq->32="Lle ef="cf="+code=req" clas5e href6l=5o_ccm_6r" class="sref">e5r56>cryp6o_ccm_encrypt_doneinre clerrefncpssetryptequest_set_ca 3aeipherrefncpssetrypteques"> 397
apar"Wef="cry"> 375 397
a{hilae="Le      ="+code=req" clas5e href6l"5t,6ne" name="L353"> 553 364            aaaaaaaaaaaaaaaaaaaaaa"> 375
 3565     56s="sr65">odata, f (iv;
e5r56
req, 6ef">sg_"s5ef">re6 = auth_ta>     cclasetrfc4309namess="srefaead_ctx(a{
refnc" na="sref">odataapar"Wef="crn -= 6rypto_aead_reqtfm5 clas56"sref66>cryptef">src<      iiiiiiiiiiiiiiiiiiiiiiiunsigned_>req->auth_ta>     ss="srefaeadcrypto/ccm.c#L387"5sef">a6ry5crypto6aead_authsize" cl5ss="s56f">cr6pto_ae               int6" classgt5pctx(refncrfc4309naea="sref">odata<" id="L375" class="line" name="L375"> 375     a>refncpssetaead);
refncpssetaeao/ccm.c#L395"
bct apar"Wef="cef="+code=req" clas5e hre563=5o_ccm_6lass="sref">auths5zecryp66="crypto/ccm.c#L353" i6s5classc#5364" i6="L364" class="li5e" na56"sref66ass="so_aead_cwitch->auth_ta>     ss="srefaeadc                int6" classlk5q-6gt;->6a href="+code=oda5a" cl56s="sr667="crypto/ccmcase 12.c#L339" id="L339"5 a hre6r"5code=e6    re6ef">EBADMSG;
5a hre56
req->gotoyptbreakf="+code=req" clas5e hre56d_5equest6complete(er5)56cryptef">src<      if (authsize)
 570src, req, 6ef">sg_tr5ct r5q56>cryp6o_ccm_econre cf (auth_ta>     cclasetpssetrypss="sref"> 397
ablkcahilame="L373">a{hilae="L75"> 375auth_ta>     ss="srefaeadccrypto/ccm.c#L387"5e" nam6 #5364" i6rypto_aead_reqtfm5 clas56="L366"> 364s="sref">req, 6ef">sg_tk5q-6de=crypto_aead_ct5" cla56f">cr67ef="crypto/ccm.c#L387"5=>
cr67tlen(srnine" pssets_="es=="sref">odata<" id="L3>refncrfc4309na>refd);
refncrfc4309na>refaead_ctx(srnine" pssets_="es=="sref">odata<" id="Ls_="sref">srnine" s_=aeadcrypto/ccm.c#L387"5sef">a6re5 =6&pcctx(srnine" pssets_="es=="sref">odata<" id="Lsubs_="sref">srnine" subs_=e="L375"> 375     pssets_="es=taead);
 397
srnine" s_=aeadccrypto/ccm.c#L387"5e" nam6de5crypto6aead_authsize" cl5ss="s56
crypto_ccm_reqctx(a{
refnc" na="sref">odataa" na="sre75"> 375     a>refncpssets_=a href="+code=cryp claex)pssets_=a h"> 397
srnine" s_=aeadccrypto/ccm.c#L387"5e" nam6d+5ode=er6 reqareq->);
refncrfc4309naea="sref">odata<" id="L375" class="line" name="L375"> 375     a>refncpssetaead);
refncpssetaeao/ccm.c#L395"
bct a" na="srccrypto/ccm.c#L387"5e" nam6dc5ass="l6a href="+code=pct5" cla56="sre6">pctxpc->a{
refnc" na="sref">odataa{hilae="L375"> 375     alkcipher_request_set_tfm" class="sref">ablkcihilame="L373">a{hilae="Lf="+code=req" clas5e href6tr5odata<6a> = pctx->au8="sref">odataaive="L375"> 375     PTR_ALIGN e="L373">aPTR_ALIGNo/ccm97
sr8 e="L373">au8="sref)/a>->srnine" subs_=e="L3+ 1)375"> 375auth_ta>     cclasetpssets_=sref"> 397
a{hilae="Lern -= iv =  375ctr);
a_aluthlaex)pssetsref">ctr"> 397
a{hilae="Le +href="+code=iv" class5ypto_a6c#5c#L3846 id="L384" class=5line"56ame="6384"> 384        in5 5rrpc.c#L348" id="L348"We wantL'>
s="sref">odataaive="L[0] = 3crypto/ccm.c#L387"5e" nam6re5class=6line" name="L387"5 387<56 clas68>                retur6o       s5a href6"+code=cryptlen" 5lass=56ref">68/ccm.c#L368" id="L368o/ccm.came="L395"> 39ss="" e="L397"> 397
aive="L3+hr75"> 375ablkcno354"> 354
auths5ze 39ss="" e="L397"> 397
aive="L3+h475"> 375srnine" s_=aead" class="sref">ablkcav e="L373">aive="L, 8ccrypto/ccm.c#L387"5e" nam6u+5ode=er6rypto_ccm_check_i5" cla56="sre69="crypto/ccm.c#L370" i6ref">pccm5c#L3916 id="L391" class=5line"56req" 69to_aeapto/ccm.c#L340""371 397
srnine" subs_=e="L75"> 375a{hilae="Lecrypto/ccm.c#L387"5e" nam6ur5odata<6class="line" name5"L39256 clas69"sref">pctx-> 397
srnine" subs_=e="L75"> 375srnine" s_=aead" class="sref">ablkclocn"sref">srnine" locnaeadr" class=_reqct aquest_set_ca 3aeipheques"> 375"> 375srnine" s_=aead" class="sref">ablkclocn"sref">srnine" locnaeadr" class=_reqct L34ple54"> 354
5rrpctx->srnine" s_=aead" class="sref">ablkclocn"sref">srnine" locnaeadr" class=_reqct data"sref">srnine" datae="Lecrypto/ccm.c#L387"5e" nam6u#5c#L3846ead_request_flags5 clas56ctx" 6lass="so_aead_a>-> 397
srnine" subs_=e="L75"> 375srnine" s_=aead" class="sref">ablkcsre="L371"> 371 375srnine" s_=aead" class="sref">ablkcds="sref">srnine" dsef="cry"> 375srnine" s_=aead" class="sref">ablkcc>refle class="sref">32c>refle f="cry"> 375aive="Lecrypto/ccm.c#L387"5e" nam6u=5+code=6q" class="sref">r5q56 clas69f="crypto/ccm.c#L395"kfree cpssets_="es=tryptss=me="L371">lllocne"ssets_="es=tryptss=me"> 397
srnine" subs_=e="L75"> 375srnine" s_=aead" class="sref">ablkcss=me="L371">lllocne"s=me"> 375"> 375srnine" s_=aead" class="sref">ablkcss=mele class="sref">32ss=mele e="Lecrypto/ccm.c#L387"5e" nam6ue5href="6code=cryptlen" cl5ss="s56class69tlen, a6iz5" clas6="sref">authsize<5a>, 056
srnine" subs_=e="Lcrypto/ccm.c#L387"5e" nam6us5a href65 - req, 6ef">sg7de6iv" cl7ss="sref">iv[6] + 167/a>  70/ccm.c#L339" id="L339"5 (req->     cclaencrfc4309nblkciphaead_ctx(srnine" pssets_="es=="sref">odata<" id="Ls_="sref">srnine" s_=aeadcrypto/ccm.c#L387"5sef">a7tx6/a>-&g7;s7c, 2, pctx->srnine" s_=aead375"> 375     a>refncrfc4309na>refd);
refncrfc4309na>refaead_7
srnine" s_=aeadccrypto/ccm.c#L387"5e" nam7="6rcode=7rr" class="sref">6c67
 364<.ode=erf (srnine" s_=aeadccrypto/ccm.c#L387"5e" nam7=66rcode=7e" class="sref">r5q576"L367"> 364s="sref">req, 6ef">sg7d76rcode=7eode=cryptlen" cl5ss="s57class70tlen, a7="6r clas7="sref">authsize<6e=pct67 347<7a>    o_aead_>req-> 371(srnine" pssets_="es=="sref">odata<" id="Ls_="sref">srnine" s_=aeadcrypto/ccm.c#L387"5sef">a7t96r clas7= -  7 srnine" s_=aead375"> 375     a>refncrfc4309na>refd);
refncrfc4309na>refaead_7
srnine" s_=aeadccrypto/ccm.c#L387"5e" nam7f"6odata<7a> = p7 c6ass="s7ef">iv =  371
srnine" s_=aeadccrypto/ccm.c#L387"5e" nam7f"6ref">s7 id="L312" class=6line"67 clas7="srefs="sref">req, 6ef">sg7f=6+code=7rr" class="sref">6rrreq->)a href="+code=cryp claa>)a haeadef">odata<" id="La href="+code=crypa haeadcrypto/ccm.c#L387"5sef">a7="6c#L3157 id="L315" class=6line"67
odata, ctx( 354
odatasrnine" n)href="375(m.c#L*)">odata<" id="La href="+code=crypa haead" class="sref">ablkc_na>t_" name="L39fl"e="L_na>t_" ne="Lcrypto/ccm.c#L387"5e" nam7="6+code=7rr" class="sref">6rrodata, ctx(aea="sref">odata<" id="Ls>aead);
aea="sre75"> 375     a>refncm="sref">aead);
refncm="sre="L397"> 397
srnine" n, pcctx();
refncrfc4309naea="sref">odata<" id="L375" class="line" name="L375"> 375     a>refnca hnaead);
refnca hnaea"> 397
a{
refnc" na="sref">odataa" na="srf="+code=req" clas5cryptef">srcunsigned_long>(a"ref"="srf="+code=req" clas5req->5#L322"7id5"L322"7class="line" name5"L32257 clas72"sref">pctx->a" na="sr375"> 375     a>refncr>aeac" name="L373">a{
refncr>aeac" na"> 397
aead);
aea="srcf="+code=req" clas55rrcryp72 classyyyyyyy"> 3a>-> 397
a" na="srccrypto/ccm.c#L387"5sef">a7="5324"> 724         pc<      if ( 397
a" na="srcf="+code=req" clas5,7="5="cryp7o/ccm.c#L326" id=5L326"57f">cr72sref">s="sref">odata< 371ablkcihilame="L373">a{hilae="L375"> 375     psseme="L373">a" na="srf="+code=req" clas5                retur6o     7 s5iv" cl7ss="sref">iv[5] + 1579tx" 72/ccm.c#L368" id="L368o/ccm.cpref"me="L373">a"ref"="sr375"> 375     a>refncpssetsref">ctr);
a_aluthlaex)pssetsref">ctr"> 397
a" na="srcf="+code=req" clas5(a"ref"="sr3     = ~97
refnca hnaeatsref">"We e="L373">aa>refnca hnaeatsref">"We"> 39) -href="+code=iv" class5ypto_a7">5ctxsrc">odata<" id="La href="+code=crypa haead" class="sref">ablkca>t_" name="L373">a{
ta .ode=err" class=ss="lins_=sref">auth_ta>     s_=sref"> 3375srefof_ctx(srnine" pssets_="es=="sr) +="+code=iv" class5ypto_a7"c6ass="s7c, 2, src, aALIGNo/ccm"> 375     a>refncpssets_=sref">auth_ta>     cclasetpssets_=sref"> 397
a" na="srcrn -= s5c57
pctx"We e="L373">aa>refnca hnaeatsref">"We"> 39)) +="+code=iv" class5ypto_a7"=6+code=7st = pctxss="comminre clpref"me="L373">a"ref"="sr3+ 16f="+code=iv" class5ypto_a7""5324"> 7c !=  384        in5 (cr7ptlenreq, 6ef">sg7="6+code=7t, 2,                 retur6o     7 s5sref">7st = 73f="cro_aead_m.c#L354" id="L354" clasfrerfc4309nbxt )a href="+code=cryp claa>)a haeadef">odata<" id="La href="+code=crypa haeadcrypto/ccm.c#L387"5sef">a7ds5" clas7="sref">dst;
5a hre57/a>  74                    int6ss="sr7li5e" nam7="L339"> 339 5     57
reqareq->);
refncrfc4309naea="sref">odata<" id="L375" class="line" name="L375"> 375     a>refnca hnaead);
refnca hnaea"> 397
s7breq, req->5#L322"7id5>abreq7/a>, pctx->refncre)
<" name="L373">a{
refncre)
<" nao/ccm"> 375     alkcipher_request_set_tfm" class="sref">ablkcihilame="L373">a{hilae="Lcf="+code=req" clas5req, 6ef">sg7="5t,7 384        in5 cr57
 354
odata 371(odata<
bct cry7re5c#L3467 id="L346" class=5line"57class7"sref"               int6ss="sr7l"6+code=7class="line" name5"L34757
odata, ctx(auth_ta>     cclasetpst__typf="sref">odatasrnine" plg=="srf="+code=req" clas57rr" class="sref">5rrpcctx( 354
odatasrnine" n)href="f="+code=req" clas5 3457/a>  75>crypto_ccm_reqctx(aead);
aea="sref">odata<" id="Ls>aead);
aea="srf="+code=req" clas5reqareq->odatasrnine" plg="srf="+code=req" clas5s7_authsize" class=5sref"57s="sr75ass="sconre charass="sref">odataabreq7="L352" class="li5e" na57 clas7="sref">pctxreq->iv;
e5r57>cryp75="crypto/ccm.c#L353" i6s5clas7l"5t,7ne" name="L353"> 553->srnine" plg=="sr375"> 375     a>refncgyptpst__typf">auth_ta>     cclasetgyptpst__typf"> 397
pctx-> 397
a__replg="sref">srnine" plg=="srccrypto/ccm.c#L387"5sef">a7re5ne" na7e="L356"> 3565     57s="sr75">odata, <      if (req)ERR_CASTe="L397"> 397
a__replg="sref">srnine" plg=="src>iv;
e5r57
                retur6o     7"s5ef">re7 = pctx
a__replg="sref">srnine" plg=="sr" class="sref">ablkctypf">auth_ta>     typf="sre^a"> 375auth_ta>     MAX_ALGEne"TYPE_AEAD="sr)      _a>->srnine" plg=="sr" class="sref">ablkc>ctr);
a_alu>ctr"> 3crypto/ccm.c#L387"5sef">a7re5="+cod7=crypto_ccm_reqct5" cla57"cryp76f="cryyyyyyyyy      if (authsize)
7rypto_aead_reqtfm5 clas57"sref76="crypto/ccm.c#L370" i6ref">p7ry5crypto7aead_authsize" cl5ss="s57f">cr76to_aeapto/ccm.c#L340""371 375     a=>a_al"__reqct pctx-> 397
a73=5o_ccm_7lass="sref">auths5zecryp76 classyyyyyyyy      if (req)ERR_CASTe="L397"> 397
,7="L364" class="li5e" na57"sref7684"> 384        in5 -7gt;srnine" n)href="375.c#L395"kfree ckz name="L371"> 371odatasrnine" n)href="e +hcrefof_f">odataaead);
aea="src75"> 375authsize)GFP_KERNEf="srcf="+code=req" clas6f6clas7ge5ne" na7a href="+code=oda5a" cl57s="sr767="crypto/ccmtxodatasrnine" n)href="e="+code=req" clas6f6clas7g"6+code=7    re7ef">EBADMSG;
5a hre57
 -= (aead);
aea="sre75"> 375     a>refncm="sref">aead);
refncm="sre="L397"> 397
srnine" n, er5)57cryptef">src">odata<" id="L{
refncretc" natr>aead);
aea"> 397
aead);
aea="srry"> 375srnine" n,  570 319
a{
refncgrab<" na"> 397
aead);
aea="srry"> 375 -= pctxodata 371 397
a__replg="sref">srnine" plg=="sr" class="sref">ablkctypf">auth_ta>     typf="sr75"> 375srnine" plg=="sr" class="sref">ablkc>ctr);
a_alu>ctr"> 3cef="+code=req" clas5r5q57>cryp7o_ccm_econre ctx->pc<      igoto5"> 375srnine" outcre)
iv;
cr77ef="crypto/ccm.c#L387"5=>
cr77sref">s="sref">odata< 371srnine" plg="sr19"> 319
aeac" name="L39fl"e="Lfl"line"ssetr>aeac" n"> 397
aead);
aea="sref="+code=req" clas5authsize)
reqareq.c#L348" id="L348"We wantWe only support 16-byte bameks.>
pctxpctx->srnine" plg="sr" class="sref">ablkca>a<" name="L373">a{
aa .ode=err" class=ss="linivsref">auth_ta>     ivsrefpctx = pctx 375iv = reqareq.c#L348" id="L348"We wantNot aq
5rrpctx->srnine" plg="sr" class="sref">ablkca>aauth_ta>     ccaodata, <      igoto5"> 375                retur6o     7 s5a href7"+code=cryptlen" 5lass=57ref">78/ccm.c#L368" id="L368o/ccm.c19" class="line" name="L319"f="crypto/ class=LON#L367" id="L367" NAMETOOLON#)
auths5ze 3a>->dsnprint"e="L397"> 397
srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lca<me="L375"> 375to/ccrypto/ccm.c#L387"5e" nam7u+5ode=er7rypto_ccm_check_i5" cla57="sre79>cryptef">src<      iiiiii.c#L34o_aing">"
odata< 371srnine" plg="sr" class="sref">ablkca>a<me="L3L384"> 5"> 375src, ->dsnprint"e="L397"> 397
srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lca 375to/ccrypto/ccm.c#L387"5e" nam7ur5odata<7class="line" name5"L39257 clas79"sref">pctx"
odata< 371srnine" plg="sr" class="sref">ablkca>a rypto/ccm.c#L387"5e" nam7u=5o_ccm_7rr" class="sref">5rr 375to/ce="+code=req" clas6f6clas7u#5c#L3847ead_request_flags5 clas57ctx" 79ass="sref">pc<      igoto5"> 375r5q57 clas79ef="crypto/ccm.c#L387"5=>
s="sref">odatasrnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lca 319"> 319
auth_ta>     MAX_ALGEne"TYPE_AEAD="srcrypto/ccm.c#L387"5e" nam7u"6+code=7="sref">authsize<5a>, 057
odatasrnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lca 31|75"> 375     plg"sref">srnine" plg="sr" class="sref">ablkca>a 31     _a>->auth_ta>     MAX_ALGEne"ASYNC="srcrypto/ccm.c#L387"5e" nam7us5a href75 - srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lca<="LoritL395"> 39a>     cca<="LoritL"> 319"> 319
srnine" plg="sr" class="sref">ablkca>a<="LoritL395"> 39a>     cca<="LoritL"> 3crypto/ccm.c#L387"5e" nam8de6iv" cl8ss="sref">iv[6] + 168/a>  80    srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaauth_ta>     ccacryptef">src">odata<" id="Lass="sref">srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcactr);
a_aluthatsref">ctr"> 319"> 319
srnine" plg="sr" class="sref">ablkca>actr);
a_aluthatsref">ctr"> 3crypto/ccm.c#L387"5e" nam8d26iv" cl8sid="L391" class=5line"58
srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaauth_ta>     cca_typf="sre=1     > 319
auth_ta>     cclasetniv"ssettypf"> 3crypto/ccm.c#L387"5e" nam8d36iv" cl8slass="line" name5"L39258 clas80>                retur5 6c68
inre class="sref">srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaa{
aa .ode=err" class=ss="linivsref">auth_ta>     ivsrefpctx<= 8crypto/ccm.c#L387"5e" nam8d56rcode=8rad_request_flags5 clas58="L3680ass="so_aead_a>->srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaa{
aa .ode=err" class=ss="linmaxss="sref">auth_ta>     maxss="srefpctx<= 16f="+code=iv" class5ypto_a8=66rcode=8e" class="sref">r5q586"L3680ef="crypto/ccm.c#L387"5=>
s="sref">odatasrnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaauth_ta>     cca();
refncrfc4309naea="sref="+code=req" clas5authsize<6e=pct68 347<80>                retur6o     8t96r clas8= - srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaauth_ta>     cca 319
 8 srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaauth_ta>     cca 319
 = p8 c6ass="s8ef">iv = srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaa{
aa .ode=err" class=ss="linryp="L395"> 39a>     ryp="L"> 319"> 319
 39a>     cclasetrfc4309nryp="Laeadf="+code=req" clas5pctx->srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaa{
aa .ode=err" class=ss="linrypss="sref">auth_ta>     rypss="sref"> 319"> 319
auth_ta>     cclasetrfc4309namess="srefaeadf="+code=req" clas56rrinre class="sref">srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaa{
aa .ode=err" class=ss="linblkcipher_requea>     blkciphaead19"> 319
     cclaencrfc4309nblkciphaeadf="+code=req" clas5srnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaa{
aa .ode=err" class=ss="line" name="L371"> 371 319
 371
s="sref">odatasrnine" n, ablkcslg"sref">srnine" plg="srr" class=_reqct Lcaa{
aa .ode=err" class=ss="lingenav e="L373">agenavaead19">c#L34o_aing">"
6rr                retur6o     8 s6+code=8ead_request_flags6 clas68"cryp81ass=""> 375srnine" n)href="f="+code=req" clas5p8#c6ass="s8 id="L321" class=5line"58req" 8lass=""> 375pctx->a{
refncdropc" na"> 397
aead);
aea="sref="+code=req" clas55rrcryp82 clas"> 375srnine" outcre)
         srnine" kre)
"> 397
srnine" n, srnine" n)href="375.c#L395"kfree cT"srclass="lineERR_PTRe="L3="+code" class=ss="linb9" class="line" name="L3ef="+code=req" clas5cr82sref">s="srefgoto5"> 375req, 6ef">sg8 s5iv" cl8ss="sref">iv[5] + 1589tx" 82yptlen -= (srnine" clasfrerfc4309nre)
+codectx( 354
odatasrnine" n)href="e="+code=req" clas6f6clas8">5ctxaead);
aea+code" class=ss="lina>refncm="sref">aead);
refncm="sre="L397"> 397
srnine" n, s5c58
pctx->srnine" kre)
"> 397
srnine" n,  = req, 6ef">sg8""5324"> 8c !=  384        in5 ( 354
srnine" clasfrerfc4309ntmplef="375               int6ss="sr8"76rcode=8->cr83sref">s="srefr" class=ss="lin"
, 2, s="srefr" class=ss="lin name="L371"> 371 319
 371 = 839ref">s="srefr" class=ss="linre)
"sref">srnine" re)
"> 319"> 319
srnine" clasfrerfc4309nre)
+cod<              int6ss="sr8ds5" clas8="sref">dst;
5a hre58/a>  840ref">s="srefr" class=ss="linmodulf">auth_ta>     modulf"> 319"> 319
5ctx 339 5     58
req}f="+code=req" clas5s8breq, req->5#L322"8id5>abreq8/a>, req->auth_ta>     _ 319
auth_ta>     ccabes"_cm modulf 39m.c#e="+code=req" clas6f6clas8l=6+code=8ncrypt_done" clas5="sre58>cryp8o_ccm_               int6ss="sr8="5t,8iv;
cr58

s="sref">odata 319
 354
 39     > 319
srnine" clasfre_cm locnntmpla href="+code=req" clas5odata, tx->8rr" class="sref">5rrpc>s="srefgoto5"> 375 3458/a>  85/ccm.c#L339" id="L339"5 cryptef">src">odata<" id="L19" class="line" name="L319"> 319
 354
 39     > 319
srnine" clasfre_cm tmpla href="+code=req" clas5s8_authsize" class=5sref"58s="sr85>pctxpctx->abreq8="L352" class="li5e" na58 clas85"sref">pctx 375srnine" outcundo_locnss="f="+code=req" clas5e5r58>cryp85="crypto/ccm.c#L353" i6s5clas8l"5t,8ne" name="L353"> 553-> 319
 354
 39     > 319
srnine" clasfrerfc4309ntmplef="ef="+code=req" clas5pctx-> 3565     58s="sr85">odata, <      igoto5"> 375srnine" outcundo_6f6ss="f="+code=req" clas5e5r58
                retur6o     8"s5ef">re8 =  375crypto_ccm_rf (iv;
p8ry5crypto8aead_authsize" cl5ss="s58f">cr86ass=""> 375srnine" outcundo_6f6ss=".c#L339" id="L339"5 a hre8rd5>abreq8="+code=cryptlen"5class583pctx-> 354
 39     > 319
srnine" clasfre_cm tmpla href="+code=req" clas5auths5zecryp86 clas"> 375srnine" outcundo_locnss=".c#L339" id="L339"5 a hre8r"5t,8="L364" class="li5e" na58"sref86ass="so_aead_a>-> 354
 39     > 319
srnine" clasfre_cm locnntmpla href="+code=req" clas5-8gt; 375req, 6ef">sg8g"6+code=8                    retur6o     8gs5ef">re8ef">EBADMSG;
5a hre58
auth_ta>     _ 319
auth_ta>     ccabes"_cm modulf 39m.c#e="+code=req" clas6f6clas8d_5equest8complete(er5)58cryptef">src">odata<" id="L{
refncunregisterctempla54"> 354
 39     > 319
srnine" clasfrerfc4309ntmplef="ef="+code=req" clas5 570 354
 39     > 319
srnine" clasfre_cm tmpla href="+code=req" clas5pctx-> 354
 39     > 319
srnine" clasfre_cm locnntmpla href="+code=req" clas5r5q58>cryp87_ccm_s="sref">req, 6ef">sg8 #5364" i8rypto_aead_reqtfm5 clas58="L368784"> 384        in5 -8de=crypto_aead_ct5" cla58f">cr87ef="c" class=ss="linmodulfauth_ta>     modulf 39> 319
auth_ta>     ccabes"_cm modulf 3ef="+code=req" clas5cr87sref"" class=ss="linmodulfauth_ta>     modulf 39> 319
auth_ta>     ccabes"_cm modulf 3ef="+code=req" clas5 375 39>c#L34o_aing">"
 375aMODULa_DESCRIPTION"> 39>c#L34o_aing">"
req"> 375aMODULa_ALIAS"> 39>c#L34o_aing">"
 375aMODULa_ALIAS"> 39>c#L34o_aing">"
 = 


The original LXR software by the "+code=rehttp://sourceforge.net/projects/lxr">LXR L348unitL"> 3, this experi8"Weal version by "+code=remailto:lxr@f="ux.no">lxr@f="ux.no"> 3.
lxr.f="ux.no kindly hosted by "+code=rehttp://www.redpill-f="pro.no">Redpill L="pro AS"> 3, provider of L="uxcharaultuot and operaeaara servicea since 1995.