linux/crypto/gcm.c
<<
>>
Prefs
   1/*
   2 * GCM: Galois/Counter Mode.
   3 *
   4 * Copyright (c) 2007 Nokia Siemens Networks - Mikko Herranen <mh1@iki.fi>
   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 version 2 as published
   8 * by the Free Software Foundation.
   9 */
  10
  11#include <crypto/gf128mul.h>
  12#include <crypto/internal/aead.h>
  13#include <crypto/internal/skcipher.h>
  14#include <crypto/internal/hash.h>
  15#include <crypto/scatterwalk.h>
  16#include <crypto/hash.h>
  17#include "internal.h"
  18#include <linux/completion.h>
  19#include <linux/err.h>
  20#include <linux/init.h>
  21#include <linux/kernel.h>
  22#include <linux/module.h>
  23#include <linux/slab.h>
  24
  25struct gcm_instance_ctx {
  26        struct crypto_skcipher_spawn ctr;
  27        struct crypto_ahash_spawn ghash;
  28};
  29
  30struct crypto_gcm_ctx {
  31        struct crypto_ablkcipher *ctr;
  32        struct crypto_ahash *ghash;
  33};
  34
  35struct crypto_rfc4106_ctx {
  36        struct crypto_aead *child;
  37        u8 nonce[4];
  38};
  39
  40struct crypto_rfc4543_ctx {
  41        struct crypto_aead *child;
  42        u8 nonce[4];
  43};
  44
  45struct crypto_rfc4543_req_ctx {
  46        u8 auth_tag[16];
  47        struct scatterlist cipher[1];
  48        struct scatterlist payload[2];
  49        struct scatterlist assoc[2];
  50        struct aead_request subreq;
  51};
  52
  53struct crypto_gcm_ghash_ctx {
  54        unsigned int cryptlen;
  55        struct scatterlist *src;
  56        void (*complete)(struct aead_request *req, int err);
  57};
  58
  59struct crypto_gcm_req_priv_ctx {
  60        u8 auth_tag[16];
  61        u8 iauth_tag[16];
  62        struct scatterlist src[2];
  63        struct scatterlist dst[2];
  64        struct crypto_gcm_ghash_ctx ghash_ctx;
  65        union {
  66                struct ahash_request ahreq;
  67                struct ablkcipher_request abreq;
  68        } u;
  69};
  70
  71struct crypto_gcm_setkey_result {
  72        int err;
  73        struct completion completion;
  74};
  75
  76static void *gcm_zeroes;
  77
  78static inline struct crypto_gcm_req_priv_ctx *crypto_gcm_reqctx(
  79        struct aead_request *req)
  80{
  81        unsigned long align = crypto_aead_alignmask(crypto_aead_reqtfm(req));
  82
  83        return (void *)PTR_ALIGN((u8 *)aead_request_ctx(req), align + 1);
  84}
  85
  86static void crypto_gcm_setkey_done(struct crypto_async_request *req, int err)
  87{
  88        struct crypto_gcm_setkey_result *result = req->data;
  89
  90        if (err == -EINPROGRESS)
  91                return;
  92
  93        result->err = err;
  94        complete(&result->completion);
  95}
  96
  97static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key,
  98                             unsigned int keylen)
  99{
 100        struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead);
 101        struct crypto_ahash *ghash = ctx->ghash;
 102        struct crypto_ablkcipher *ctr = ctx->ctr;
 103        struct {
 104                be128 hash;
 105                u8 iv[8];
 106
 107                struct crypto_gcm_setkey_result result;
 108
 109                struct scatterlist sg[1];
 110                struct ablkcipher_request req;
 111        } *data;
 112        int err;
 113
 114        crypto_ablkcipher_clear_flags(ctr, CRYPTO_TFM_REQ_MASK);
 115        crypto_ablkcipher_set_flags(ctr, crypto_aead_get_flags(aead) &
 116                                   CRYPTO_TFM_REQ_MASK);
 117
 118        err = crypto_ablkcipher_setkey(ctr, key, keylen);
 119        if (err)
 120                return err;
 121
 122        crypto_aead_set_flags(aead, crypto_ablkcipher_get_flags(ctr) &
 123                                       CRYPTO_TFM_RES_MASK);
 124
 125        data = kzalloc(sizeof(*data) + crypto_ablkcipher_reqsize(ctr),
 126                       GFP_KERNEL);
 127        if (!data)
 128                return -ENOMEM;
 129
 130        init_completion(&data->result.completion);
 131        sg_init_one(data->sg, &data->hash, sizeof(data->hash));
 132        ablkcipher_request_set_tfm(&data->req, ctr);
 133        ablkcipher_request_set_callback(&data->req, CRYPTO_TFM_REQ_MAY_SLEEP |
 134                                                    CRYPTO_TFM_REQ_MAY_BACKLOG,
 135                                        crypto_gcm_setkey_done,
 136                                        &data->result);
 137        ablkcipher_request_set_crypt(&data->req, data->sg, data->sg,
 138                                     sizeof(data->hash), data->iv);
 139
 140        err = crypto_ablkcipher_encrypt(&data->req);
 141        if (err == -EINPROGRESS || err == -EBUSY) {
 142                err = wait_for_completion_interruptible(
 143                        &data->result.completion);
 144                if (!err)
 145                        err = data->result.err;
 146        }
 147
 148        if (err)
 149                goto out;
 150
 151        crypto_ahash_clear_flags(ghash, CRYPTO_TFM_REQ_MASK);
 152        crypto_ahash_set_flags(ghash, crypto_aead_get_flags(aead) &
 153                               CRYPTO_TFM_REQ_MASK);
 154        err = crypto_ahash_setkey(ghash, (u8 *)&data->hash, sizeof(be128));
 155        crypto_aead_set_flags(aead, crypto_ahash_get_flags(ghash) &
 156                              CRYPTO_TFM_RES_MASK);
 157
 158out:
 159        kfree(data);
 160        return err;
 161}
 162
 163static int crypto_gcm_setauthsize(struct crypto_aead *tfm,
 164                                  unsigned int authsize)
 165{
 166        switch (authsize) {
 167        case 4:
 168        case 8:
 169        case 12:
 170        case 13:
 171        case 14:
 172        case 15:
 173        case 16:
 174                break;
 175        default:
 176                return -EINVAL;
 177        }
 178
 179        return 0;
 180}
 181
 182static void crypto_gcm_init_crypt(struct ablkcipher_request *ablk_req,
 183                                  struct aead_request *req,
 184                                  unsigned int cryptlen)
 185{
 186        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 187        struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead);
 188        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 189        struct scatterlist *dst;
 190        __be32 counter = cpu_to_be32(1);
 191
 192        memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag));
 193        memcpy(req->iv + 12, &counter, 4);
 194
 195        sg_init_table(pctx->src, 2);
 196        sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag));
 197        scatterwalk_sg_chain(pctx->src, 2, req->src);
 198
 199        dst = pctx->src;
 200        if (req->src != req->dst) {
 201                sg_init_table(pctx->dst, 2);
 202                sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag));
 203                scatterwalk_sg_chain(pctx->dst, 2, req->dst);
 204                dst = pctx->dst;
 205        }
 206
 207        ablkcipher_request_set_tfm(ablk_req, ctx->ctr);
 208        ablkcipher_request_set_crypt(ablk_req, pctx->src, dst,
 209                                     cryptlen + sizeof(pctx->auth_tag),
 210                                     req->iv);
 211}
 212
 213static inline unsigned int gcm_remain(unsigned int len)
 214{
 215        len &= 0xfU;
 216        return len ? 16 - len : 0;
 217}
 218
 219static void gcm_hash_len_done(struct crypto_async_request *areq, int err);
 220static void gcm_hash_final_done(struct crypto_async_request *areq, int err);
 221
 222static int gcm_hash_update(struct aead_request *req,
 223                           struct crypto_gcm_req_priv_ctx *pctx,
 224                           crypto_completion_t complete,
 225                           struct scatterlist *src,
 226                           unsigned int len)
 227{
 228        struct ahash_request *ahreq = &pctx->u.ahreq;
 229
 230        ahash_request_set_callback(ahreq, aead_request_flags(req),
 231                                   complete, req);
 232        ahash_request_set_crypt(ahreq, src, NULL, len);
 233
 234        return crypto_ahash_update(ahreq);
 235}
 236
 237static int gcm_hash_remain(struct aead_request *req,
 238                           struct crypto_gcm_req_priv_ctx *pctx,
 239                           unsigned int remain,
 240                           crypto_completion_t complete)
 241{
 242        struct ahash_request *ahreq = &pctx->u.ahreq;
 243
 244        ahash_request_set_callback(ahreq, aead_request_flags(req),
 245                                   complete, req);
 246        sg_init_one(pctx->src, gcm_zeroes, remain);
 247        ahash_request_set_crypt(ahreq, pctx->src, NULL, remain);
 248
 249        return crypto_ahash_update(ahreq);
 250}
 251
 252static int gcm_hash_len(struct aead_request *req,
 253                        struct crypto_gcm_req_priv_ctx *pctx)
 254{
 255        struct ahash_request *ahreq = &pctx->u.ahreq;
 256        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 257        u128 lengths;
 258
 259        lengths.a = cpu_to_be64(req->assoclen * 8);
 260        lengths.b = cpu_to_be64(gctx->cryptlen * 8);
 261        memcpy(pctx->iauth_tag, &lengths, 16);
 262        sg_init_one(pctx->src, pctx->iauth_tag, 16);
 263        ahash_request_set_callback(ahreq, aead_request_flags(req),
 264                                   gcm_hash_len_done, req);
 265        ahash_request_set_crypt(ahreq, pctx->src,
 266                                NULL, sizeof(lengths));
 267
 268        return crypto_ahash_update(ahreq);
 269}
 270
 271static int gcm_hash_final(struct aead_request *req,
 272                          struct crypto_gcm_req_priv_ctx *pctx)
 273{
 274        struct ahash_request *ahreq = &pctx->u.ahreq;
 275
 276        ahash_request_set_callback(ahreq, aead_request_flags(req),
 277                                   gcm_hash_final_done, req);
 278        ahash_request_set_crypt(ahreq, NULL, pctx->iauth_tag, 0);
 279
 280        return crypto_ahash_final(ahreq);
 281}
 282
 283static void __gcm_hash_final_done(struct aead_request *req, int err)
 284{
 285        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 286        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 287
 288        if (!err)
 289                crypto_xor(pctx->auth_tag, pctx->iauth_tag, 16);
 290
 291        gctx->complete(req, err);
 292}
 293
 294static void gcm_hash_final_done(struct crypto_async_request *areq, int err)
 295{
 296        struct aead_request *req = areq->data;
 297
 298        __gcm_hash_final_done(req, err);
 299}
 300
 301static void __gcm_hash_len_done(struct aead_request *req, int err)
 302{
 303        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 304
 305        if (!err) {
 306                err = gcm_hash_final(req, pctx);
 307                if (err == -EINPROGRESS || err == -EBUSY)
 308                        return;
 309        }
 310
 311        __gcm_hash_final_done(req, err);
 312}
 313
 314static void gcm_hash_len_done(struct crypto_async_request *areq, int err)
 315{
 316        struct aead_request *req = areq->data;
 317
 318        __gcm_hash_len_done(req, err);
 319}
 320
 321static void __gcm_hash_crypt_remain_done(struct aead_request *req, int err)
 322{
 323        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 324
 325        if (!err) {
 326                err = gcm_hash_len(req, pctx);
 327                if (err == -EINPROGRESS || err == -EBUSY)
 328                        return;
 329        }
 330
 331        __gcm_hash_len_done(req, err);
 332}
 333
 334static void gcm_hash_crypt_remain_done(struct crypto_async_request *areq,
 335                                       int err)
 336{
 337        struct aead_request *req = areq->data;
 338
 339        __gcm_hash_crypt_remain_done(req, err);
 340}
 341
 342static void __gcm_hash_crypt_done(struct aead_request *req, int err)
 343{
 344        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 345        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 346        unsigned int remain;
 347
 348        if (!err) {
 349                remain = gcm_remain(gctx->cryptlen);
 350                BUG_ON(!remain);
 351                err = gcm_hash_remain(req, pctx, remain,
 352                                      gcm_hash_crypt_remain_done);
 353                if (err == -EINPROGRESS || err == -EBUSY)
 354                        return;
 355        }
 356
 357        __gcm_hash_crypt_remain_done(req, err);
 358}
 359
 360static void gcm_hash_crypt_done(struct crypto_async_request *areq, int err)
 361{
 362        struct aead_request *req = areq->data;
 363
 364        __gcm_hash_crypt_done(req, err);
 365}
 366
 367static void __gcm_hash_assoc_remain_done(struct aead_request *req, int err)
 368{
 369        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 370        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 371        crypto_completion_t complete;
 372        unsigned int remain = 0;
 373
 374        if (!err && gctx->cryptlen) {
 375                remain = gcm_remain(gctx->cryptlen);
 376                complete = remain ? gcm_hash_crypt_done :
 377                        gcm_hash_crypt_remain_done;
 378                err = gcm_hash_update(req, pctx, complete,
 379                                      gctx->src, gctx->cryptlen);
 380                if (err == -EINPROGRESS || err == -EBUSY)
 381                        return;
 382        }
 383
 384        if (remain)
 385                __gcm_hash_crypt_done(req, err);
 386        else
 387                __gcm_hash_crypt_remain_done(req, err);
 388}
 389
 390static void gcm_hash_assoc_remain_done(struct crypto_async_request *areq,
 391                                       int err)
 392{
 393        struct aead_request *req = areq->data;
 394
 395        __gcm_hash_assoc_remain_done(req, err);
 396}
 397
 398static void __gcm_hash_assoc_done(struct aead_request *req, int err)
 399{
 400        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 401        unsigned int remain;
 402
 403        if (!err) {
 404                remain = gcm_remain(req->assoclen);
 405                BUG_ON(!remain);
 406                err = gcm_hash_remain(req, pctx, remain,
 407                                      gcm_hash_assoc_remain_done);
 408                if (err == -EINPROGRESS || err == -EBUSY)
 409                        return;
 410        }
 411
 412        __gcm_hash_assoc_remain_done(req, err);
 413}
 414
 415static void gcm_hash_assoc_done(struct crypto_async_request *areq, int err)
 416{
 417        struct aead_request *req = areq->data;
 418
 419        __gcm_hash_assoc_done(req, err);
 420}
 421
 422static void __gcm_hash_init_done(struct aead_request *req, int err)
 423{
 424        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 425        crypto_completion_t complete;
 426        unsigned int remain = 0;
 427
 428        if (!err && req->assoclen) {
 429                remain = gcm_remain(req->assoclen);
 430                complete = remain ? gcm_hash_assoc_done :
 431                        gcm_hash_assoc_remain_done;
 432                err = gcm_hash_update(req, pctx, complete,
 433                                      req->assoc, req->assoclen);
 434                if (err == -EINPROGRESS || err == -EBUSY)
 435                        return;
 436        }
 437
 438        if (remain)
 439                __gcm_hash_assoc_done(req, err);
 440        else
 441                __gcm_hash_assoc_remain_done(req, err);
 442}
 443
 444static void gcm_hash_init_done(struct crypto_async_request *areq, int err)
 445{
 446        struct aead_request *req = areq->data;
 447
 448        __gcm_hash_init_done(req, err);
 449}
 450
 451static int gcm_hash(struct aead_request *req,
 452                    struct crypto_gcm_req_priv_ctx *pctx)
 453{
 454        struct ahash_request *ahreq = &pctx->u.ahreq;
 455        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 456        struct crypto_gcm_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
 457        unsigned int remain;
 458        crypto_completion_t complete;
 459        int err;
 460
 461        ahash_request_set_tfm(ahreq, ctx->ghash);
 462
 463        ahash_request_set_callback(ahreq, aead_request_flags(req),
 464                                   gcm_hash_init_done, req);
 465        err = crypto_ahash_init(ahreq);
 466        if (err)
 467                return err;
 468        remain = gcm_remain(req->assoclen);
 469        complete = remain ? gcm_hash_assoc_done : gcm_hash_assoc_remain_done;
 470        err = gcm_hash_update(req, pctx, complete, req->assoc, req->assoclen);
 471        if (err)
 472                return err;
 473        if (remain) {
 474                err = gcm_hash_remain(req, pctx, remain,
 475                                      gcm_hash_assoc_remain_done);
 476                if (err)
 477                        return err;
 478        }
 479        remain = gcm_remain(gctx->cryptlen);
 480        complete = remain ? gcm_hash_crypt_done : gcm_hash_crypt_remain_done;
 481        err = gcm_hash_update(req, pctx, complete, gctx->src, gctx->cryptlen);
 482        if (err)
 483                return err;
 484        if (remain) {
 485                err = gcm_hash_remain(req, pctx, remain,
 486                                      gcm_hash_crypt_remain_done);
 487                if (err)
 488                        return err;
 489        }
 490        err = gcm_hash_len(req, pctx);
 491        if (err)
 492                return err;
 493        err = gcm_hash_final(req, pctx);
 494        if (err)
 495                return err;
 496
 497        return 0;
 498}
 499
 500static void gcm_enc_copy_hash(struct aead_request *req,
 501                              struct crypto_gcm_req_priv_ctx *pctx)
 502{
 503        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 504        u8 *auth_tag = pctx->auth_tag;
 505
 506        scatterwalk_map_and_copy(auth_tag, req->dst, req->cryptlen,
 507                                 crypto_aead_authsize(aead), 1);
 508}
 509
 510static void gcm_enc_hash_done(struct aead_request *req, int err)
 511{
 512        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 513
 514        if (!err)
 515                gcm_enc_copy_hash(req, pctx);
 516
 517        aead_request_complete(req, err);
 518}
 519
 520static void gcm_encrypt_done(struct crypto_async_request *areq, int err)
 521{
 522        struct aead_request *req = areq->data;
 523        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 524
 525        if (!err) {
 526                err = gcm_hash(req, pctx);
 527                if (err == -EINPROGRESS || err == -EBUSY)
 528                        return;
 529                else if (!err) {
 530                        crypto_xor(pctx->auth_tag, pctx->iauth_tag, 16);
 531                        gcm_enc_copy_hash(req, pctx);
 532                }
 533        }
 534
 535        aead_request_complete(req, err);
 536}
 537
 538static int crypto_gcm_encrypt(struct aead_request *req)
 539{
 540        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 541        struct ablkcipher_request *abreq = &pctx->u.abreq;
 542        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 543        int err;
 544
 545        crypto_gcm_init_crypt(abreq, req, req->cryptlen);
 546        ablkcipher_request_set_callback(abreq, aead_request_flags(req),
 547                                        gcm_encrypt_done, req);
 548
 549        gctx->src = req->dst;
 550        gctx->cryptlen = req->cryptlen;
 551        gctx->complete = gcm_enc_hash_done;
 552
 553        err = crypto_ablkcipher_encrypt(abreq);
 554        if (err)
 555                return err;
 556
 557        err = gcm_hash(req, pctx);
 558        if (err)
 559                return err;
 560
 561        crypto_xor(pctx->auth_tag, pctx->iauth_tag, 16);
 562        gcm_enc_copy_hash(req, pctx);
 563
 564        return 0;
 565}
 566
 567static int crypto_gcm_verify(struct aead_request *req,
 568                             struct crypto_gcm_req_priv_ctx *pctx)
 569{
 570        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 571        u8 *auth_tag = pctx->auth_tag;
 572        u8 *iauth_tag = pctx->iauth_tag;
 573        unsigned int authsize = crypto_aead_authsize(aead);
 574        unsigned int cryptlen = req->cryptlen - authsize;
 575
 576        crypto_xor(auth_tag, iauth_tag, 16);
 577        scatterwalk_map_and_copy(iauth_tag, req->src, cryptlen, authsize, 0);
 578        return memcmp(iauth_tag, auth_tag, authsize) ? -EBADMSG : 0;
 579}
 580
 581static void gcm_decrypt_done(struct crypto_async_request *areq, int err)
 582{
 583        struct aead_request *req = areq->data;
 584        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 585
 586        if (!err)
 587                err = crypto_gcm_verify(req, pctx);
 588
 589        aead_request_complete(req, err);
 590}
 591
 592static void gcm_dec_hash_done(struct aead_request *req, int err)
 593{
 594        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 595        struct ablkcipher_request *abreq = &pctx->u.abreq;
 596        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 597
 598        if (!err) {
 599                ablkcipher_request_set_callback(abreq, aead_request_flags(req),
 600                                                gcm_decrypt_done, req);
 601                crypto_gcm_init_crypt(abreq, req, gctx->cryptlen);
 602                err = crypto_ablkcipher_decrypt(abreq);
 603                if (err == -EINPROGRESS || err == -EBUSY)
 604                        return;
 605                else if (!err)
 606                        err = crypto_gcm_verify(req, pctx);
 607        }
 608
 609        aead_request_complete(req, err);
 610}
 611
 612static int crypto_gcm_decrypt(struct aead_request *req)
 613{
 614        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 615        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 616        struct ablkcipher_request *abreq = &pctx->u.abreq;
 617        struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
 618        unsigned int authsize = crypto_aead_authsize(aead);
 619        unsigned int cryptlen = req->cryptlen;
 620        int err;
 621
 622        if (cryptlen < authsize)
 623                return -EINVAL;
 624        cryptlen -= authsize;
 625
 626        gctx->src = req->src;
 627        gctx->cryptlen = cryptlen;
 628        gctx->complete = gcm_dec_hash_done;
 629
 630        err = gcm_hash(req, pctx);
 631        if (err)
 632                return err;
 633
 634        ablkcipher_request_set_callback(abreq, aead_request_flags(req),
 635                                        gcm_decrypt_done, req);
 636        crypto_gcm_init_crypt(abreq, req, cryptlen);
 637        err = crypto_ablkcipher_decrypt(abreq);
 638        if (err)
 639                return err;
 640
 641        return crypto_gcm_verify(req, pctx);
 642}
 643
 644static int crypto_gcm_init_tfm(struct crypto_tfm *tfm)
 645{
 646        struct crypto_instance *inst = (void *)tfm->__crt_alg;
 647        struct gcm_instance_ctx *ictx = crypto_instance_ctx(inst);
 648        struct crypto_gcm_ctx *ctx = crypto_tfm_ctx(tfm);
 649        struct crypto_ablkcipher *ctr;
 650        struct crypto_ahash *ghash;
 651        unsigned long align;
 652        int err;
 653
 654        ghash = crypto_spawn_ahash(&ictx->ghash);
 655        if (IS_ERR(ghash))
 656                return PTR_ERR(ghash);
 657
 658        ctr = crypto_spawn_skcipher(&ictx->ctr);
 659        err = PTR_ERR(ctr);
 660        if (IS_ERR(ctr))
 661                goto err_free_hash;
 662
 663        ctx->ctr = ctr;
 664        ctx->ghash = ghash;
 665
 666        align = crypto_tfm_alg_alignmask(tfm);
 667        align &= ~(crypto_tfm_ctx_alignment() - 1);
 668        tfm->crt_aead.reqsize = align +
 669                offsetof(struct crypto_gcm_req_priv_ctx, u) +
 670                max(sizeof(struct ablkcipher_request) +
 671                    crypto_ablkcipher_reqsize(ctr),
 672                    sizeof(struct ahash_request) +
 673                    crypto_ahash_reqsize(ghash));
 674
 675        return 0;
 676
 677err_free_hash:
 678        crypto_free_ahash(ghash);
 679        return err;
 680}
 681
 682static void crypto_gcm_exit_tfm(struct crypto_tfm *tfm)
 683{
 684        struct crypto_gcm_ctx *ctx = crypto_tfm_ctx(tfm);
 685
 686        crypto_free_ahash(ctx->ghash);
 687        crypto_free_ablkcipher(ctx->ctr);
 688}
 689
 690static struct crypto_instance *crypto_gcm_alloc_common(struct rtattr **tb,
 691                                                       const char *full_name,
 692                                                       const char *ctr_name,
 693                                                       const char *ghash_name)
 694{
 695        struct crypto_attr_type *algt;
 696        struct crypto_instance *inst;
 697        struct crypto_alg *ctr;
 698        struct crypto_alg *ghash_alg;
 699        struct ahash_alg *ghash_ahash_alg;
 700        struct gcm_instance_ctx *ctx;
 701        int err;
 702
 703        algt = crypto_get_attr_type(tb);
 704        err = PTR_ERR(algt);
 705        if (IS_ERR(algt))
 706                return ERR_PTR(err);
 707
 708        if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask)
 709                return ERR_PTR(-EINVAL);
 710
 711        ghash_alg = crypto_find_alg(ghash_name, &crypto_ahash_type,
 712                                    CRYPTO_ALG_TYPE_HASH,
 713                                    CRYPTO_ALG_TYPE_AHASH_MASK);
 714        err = PTR_ERR(ghash_alg);
 715        if (IS_ERR(ghash_alg))
 716                return ERR_PTR(err);
 717
 718        err = -ENOMEM;
 719        inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL);
 720        if (!inst)
 721                goto out_put_ghash;
 722
 723        ctx = crypto_instance_ctx(inst);
 724        ghash_ahash_alg = container_of(ghash_alg, struct ahash_alg, halg.base);
 725        err = crypto_init_ahash_spawn(&ctx->ghash, &ghash_ahash_alg->halg,
 726                                      inst);
 727        if (err)
 728                goto err_free_inst;
 729
 730        crypto_set_skcipher_spawn(&ctx->ctr, inst);
 731        err = crypto_grab_skcipher(&ctx->ctr, ctr_name, 0,
 732                                   crypto_requires_sync(algt->type,
 733                                                        algt->mask));
 734        if (err)
 735                goto err_drop_ghash;
 736
 737        ctr = crypto_skcipher_spawn_alg(&ctx->ctr);
 738
 739        /* We only support 16-byte blocks. */
 740        if (ctr->cra_ablkcipher.ivsize != 16)
 741                goto out_put_ctr;
 742
 743        /* Not a stream cipher? */
 744        err = -EINVAL;
 745        if (ctr->cra_blocksize != 1)
 746                goto out_put_ctr;
 747
 748        err = -ENAMETOOLONG;
 749        if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME,
 750                     "gcm_base(%s,%s)", ctr->cra_driver_name,
 751                     ghash_alg->cra_driver_name) >=
 752            CRYPTO_MAX_ALG_NAME)
 753                goto out_put_ctr;
 754
 755        memcpy(inst->alg.cra_name, full_name, CRYPTO_MAX_ALG_NAME);
 756
 757        inst->alg.cra_flags = CRYPTO_ALG_TYPE_AEAD;
 758        inst->alg.cra_flags |= ctr->cra_flags & CRYPTO_ALG_ASYNC;
 759        inst->alg.cra_priority = ctr->cra_priority;
 760        inst->alg.cra_blocksize = 1;
 761        inst->alg.cra_alignmask = ctr->cra_alignmask | (__alignof__(u64) - 1);
 762        inst->alg.cra_type = &crypto_aead_type;
 763        inst->alg.cra_aead.ivsize = 16;
 764        inst->alg.cra_aead.maxauthsize = 16;
 765        inst->alg.cra_ctxsize = sizeof(struct crypto_gcm_ctx);
 766        inst->alg.cra_init = crypto_gcm_init_tfm;
 767        inst->alg.cra_exit = crypto_gcm_exit_tfm;
 768        inst->alg.cra_aead.setkey = crypto_gcm_setkey;
 769        inst->alg.cra_aead.setauthsize = crypto_gcm_setauthsize;
 770        inst->alg.cra_aead.encrypt = crypto_gcm_encrypt;
 771        inst->alg.cra_aead.decrypt = crypto_gcm_decrypt;
 772
 773out:
 774        crypto_mod_put(ghash_alg);
 775        return inst;
 776
 777out_put_ctr:
 778        crypto_drop_skcipher(&ctx->ctr);
 779err_drop_ghash:
 780        crypto_drop_ahash(&ctx->ghash);
 781err_free_inst:
 782        kfree(inst);
 783out_put_ghash:
 784        inst = ERR_PTR(err);
 785        goto out;
 786}
 787
 788static struct crypto_instance *crypto_gcm_alloc(struct rtattr **tb)
 789{
 790        int err;
 791        const char *cipher_name;
 792        char ctr_name[CRYPTO_MAX_ALG_NAME];
 793        char full_name[CRYPTO_MAX_ALG_NAME];
 794
 795        cipher_name = crypto_attr_alg_name(tb[1]);
 796        err = PTR_ERR(cipher_name);
 797        if (IS_ERR(cipher_name))
 798                return ERR_PTR(err);
 799
 800        if (snprintf(ctr_name, CRYPTO_MAX_ALG_NAME, "ctr(%s)", cipher_name) >=
 801            CRYPTO_MAX_ALG_NAME)
 802                return ERR_PTR(-ENAMETOOLONG);
 803
 804        if (snprintf(full_name, CRYPTO_MAX_ALG_NAME, "gcm(%s)", cipher_name) >=
 805            CRYPTO_MAX_ALG_NAME)
 806                return ERR_PTR(-ENAMETOOLONG);
 807
 808        return crypto_gcm_alloc_common(tb, full_name, ctr_name, "ghash");
 809}
 810
 811static void crypto_gcm_free(struct crypto_instance *inst)
 812{
 813        struct gcm_instance_ctx *ctx = crypto_instance_ctx(inst);
 814
 815        crypto_drop_skcipher(&ctx->ctr);
 816        crypto_drop_ahash(&ctx->ghash);
 817        kfree(inst);
 818}
 819
 820static struct crypto_template crypto_gcm_tmpl = {
 821        .name = "gcm",
 822        .alloc = crypto_gcm_alloc,
 823        .free = crypto_gcm_free,
 824        .module = THIS_MODULE,
 825};
 826
 827static struct crypto_instance *crypto_gcm_base_alloc(struct rtattr **tb)
 828{
 829        int err;
 830        const char *ctr_name;
 831        const char *ghash_name;
 832        char full_name[CRYPTO_MAX_ALG_NAME];
 833
 834        ctr_name = crypto_attr_alg_name(tb[1]);
 835        err = PTR_ERR(ctr_name);
 836        if (IS_ERR(ctr_name))
 837                return ERR_PTR(err);
 838
 839        ghash_name = crypto_attr_alg_name(tb[2]);
 840        err = PTR_ERR(ghash_name);
 841        if (IS_ERR(ghash_name))
 842                return ERR_PTR(err);
 843
 844        if (snprintf(full_name, CRYPTO_MAX_ALG_NAME, "gcm_base(%s,%s)",
 845                     ctr_name, ghash_name) >= CRYPTO_MAX_ALG_NAME)
 846                return ERR_PTR(-ENAMETOOLONG);
 847
 848        return crypto_gcm_alloc_common(tb, full_name, ctr_name, ghash_name);
 849}
 850
 851static struct crypto_template crypto_gcm_base_tmpl = {
 852        .name = "gcm_base",
 853        .alloc = crypto_gcm_base_alloc,
 854        .free = crypto_gcm_free,
 855        .module = THIS_MODULE,
 856};
 857
 858static int crypto_rfc4106_setkey(struct crypto_aead *parent, const u8 *key,
 859                                 unsigned int keylen)
 860{
 861        struct crypto_rfc4106_ctx *ctx = crypto_aead_ctx(parent);
 862        struct crypto_aead *child = ctx->child;
 863        int err;
 864
 865        if (keylen < 4)
 866                return -EINVAL;
 867
 868        keylen -= 4;
 869        memcpy(ctx->nonce, key + keylen, 4);
 870
 871        crypto_aead_clear_flags(child, CRYPTO_TFM_REQ_MASK);
 872        crypto_aead_clear_flags(set_ef">c(child, EINVAL);
(parent);
 778<87                                          "+code=CRYPTO_TFM_REQ_MASK" class="sref">CRYPTO_TFM_REQ_MASK);
 778 8      err = ccrypto_rfc4106__ef">cchild, key,
keylen)
 778 87     crypto_aead_clear_flags(set_ef">c(parent, const EINVAL);
(child,  778
87                                   CRYPTO_TFM_REQ_MASK);
 778<87 href="crypto/gcm.c#L868" id="L778" cla8s="line" name="L778"> 778 87     return err;
 778<87a href="crypto/gcm.c#L850" id="L780" cla8s="line" name="L780"> 788 88 href="crypto/gcm.c#L871" id="L781" cla8s="line" name="L781"> 788<88tic struct crypto_gcm_setasetkey" cla" class=uct crypto_aead *parent, const <="crypto/gcm.c#L871" id="L872" class="line" name="L782"> 788 88             return <<<<<<<<<<<<<<<<<<<<<<< int crypto_g" class=uct f="crypto/gcm.c#L866" id="L783" cla8s="line" name="L783"> 788<8 href=f="crypto/gcm.c#L861" id="L784" cla8s="line" name="L784"> 788 8      crypto_rfc4106_ctx *ctx = crypto_aead_ctx(parent);
 788 8      ="crypto/gcm.c#L862" id88<866" class="line" name="L786"> 788}88             switchf="+code=keylen" " class="sref">crypto_g" class=uct fef="crypto/gcm.c#L852" id="L787" cla8s="line" name="L787"> 788
88             case 8f="crypto/gcm.c#L784" id=8L788" cla8s="line" name="L788"> 788s888            case 12f="crypto/gcm.c#L784" id=8L779" cla8s="line" name="L789"> 788{889            case 16f="crypto/gcm.c#L784" id=8L790" cla8s="line" name="L790"> 798 89                   798 8      const chdefaultf="crypto/gcm.c#L784" id=8L872" class="line" name="L792"> 798 89             return EINVAL;
 798 8      char  798
8a href="crypto/gcm.c#L795" id=8L795" cla8s="line" name="L795"> 798 8      ccrypto_gcm_seta_ef">cctx->child, crypto_g" class=uct ff="crypto/gcm.c#L867" id="L866" class="line" name="L796"> 798 89a href="crypto/gcm.c#L787" id=8L797" cla8s="line" name="L797"> 798 89 href="crypto/gcm.c#L868" id="L798" cla8s="line" name="L798"> 798 89tic struct _synes="sref">inst_ef">_synes= href="+code=ctx" clasc4106_ctx *c410"sref">crypto_rfc4106_ctx *c410uct _synes="sref">inst_ef">_synes= href="+code=ctx" cla_sy"sref">inst_syuct f="crypto/gcm.c#L866" id="L799" cla8s="line" name="L799"> 798
89a href="crypto/gcm.c#L790" id=9L800" cla9s="line" name="L800"> 809 9      if (_synes="sref">inst_ef">_synes= href="+code=ctx" clasub_sy"sref">instsub_sya href="+code=crypto_a_ef">_synes=ass="sref">crypto_a_ef">_synes=ass=href="+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=9L801" cla9s="line" name="L801"> 809 90     struct crypto_aead *crypto_a *crypto_gcm_exit" cla_syss=href="+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=9L201" cla9s="line" name="L792"> 799 90     struct crypto_rfc4106_ctx *ctx = crypto_aead_ctx(crypto_a * 799
90     struct crypto_aead *child = ctx->child;
 809 90     u8 *u8 *iva href="+code=ctx" cla/a>(ALIGN"sref">u8 */a>(ALIGNhref=="+code=u64" clas="sref">u8 *instsub_sya hre+ 1)ef="+code=keylen" cm_exit" cla_syass="sref">crypto_gcm_seta_ef">_syass=href="+code=child" class="sref">child,  809 9          cra_alignm_exit" clak" class=href="+code=child" class="sref">child,  809 90 href="crypto/gcm.c#L827" id=9L807" cla9s="line" name="L807"> 809
90     memcpy(u8 *iva hrf="+code=ctr_name" ="sref">ctx->nonce,  809 90     memcpy(u8 *iva hr +h4f="+code=ctr_name_sy"sref">inst_syuct href="+code=nonce" cav"sref">u8 *iva hrf=8ef="crypto/gcm.c#L870" id=9L908" cla9s="line" name="L799"> 799}90 href="crypto/gcm.c#L820" id=9L810" cla9s="line" name="L810"> 819
91     _synes=accrypto_g_ef">_synes=acinstsub_sya hrf="+code=ctr_name"ass="sref">child,  819s91     _synes=accra_alig_ef">_synes=acinstsub_sya hrf="+code=ctr_name_sy"sref">inst_syuct href="+code=nonce" cocinstocinst_syuct href="+code=nonce" cocinstoccrypto_teomples=nst <="crypto/gcm.c#L871" id=9L812" cla9s="line" name="L812"> 819{91             return <<<<<<<<<<<<<<<<<<<"+code=ctr_name_sy"sref">inst_syuct href="+code=nonce" cocinstocinstdata hreef="crypto/gcm.c#L870" id=9L301" cla9s="line" name="L813"> 819 91     _synes=accrypto_r_ef">_synes=acinstsub_sya hrf="+code=ctr_name_sy"sref">inst_syuct href="+code=nonce" csr="sref">crypto_gsr=a hrf="+code=ctr_name_sy"sref">inst_syuct href="+code=nonce" cds="sref">instdsonst inst_syuct href="+code=nonce" ccc410ss="sref">keylenu8 *iva href="crypto/gcm.c#L870" id=9L804" cla9s="line" name="L814"> 819
91     _synes=acallocef">_synes=acinstsub_sya hrf="+code=ctr_name_sy"sref">inst_syuct href="+code=nonce" ce" s="sref">alloc" s=hreff="+code=ctr_name_sy"sref">inst_syuct href="+code=nonce" ce" s=ss="sref">keylen 819 91     ="crypto/gcm.c#L862" id89L816" cla9s="line" name="L816"> 819 9      instsub_sya hrf="crypto/gcm.c#L870" id=9L807" cla9s="line" name="L817"> 819 9      f="crypto/gcm.c#L787" id=9L818" cla9s="line" name="L818"> 819}91 href="crypto/gcm.c#L839" id=9L819" cla9s="line" name="L819"> 819
9a hreftruct crypto_gcm_encrsetkey"  class=uct _synes="sref">inst_ef">_synes= href="+code=ctx" cla_sy"sref">inst_syuct f="crypto/gcm.c#L866" id=9L820" cla9s="line" name="L820"> 829s92a href="crypto/gcm.c#L861" id=9L821" cla9s="line" name="L821"> 829 92     inst_syuct ef="+code=crypto_aead_ctxctx *c410"sref">crypto_rfc4106_ctx *c410uct <"+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=9L822" cla9s="line" name="L822"> 829 92 href="crypto/gcm.c#L773" id=9L823" cla9s="line" name="L823"> 829 9      . class="sref">crypto_gcm_encr_ef"> class=uct <"+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=9L804" cla9s="line" name="L824"> 829 9      f="crypto/gcm.c#L787" id=9L825" cla9s="line" name="L825"> 829}92     ="crypto/gcm.c#L862" id89L826" cla9s="line" name="L826"> 829
9a hreftruct crypto_gcm_decrsetkey"  class=uct _synes="sref">inst_ef">_synes= href="+code=ctx" cla_sy"sref">inst_syuct f="crypto/gcm.c#L866" id=9L807" cla9s="line" name="L827"> 829s9atic sf="crypto/gcm.c#L861" id=9L818" cla9s="line" name="L828"> 829{92     inst_syuct ef="+code=crypto_aead_ctxctx *c410"sref">crypto_rfc4106_ctx *c410uct <"+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=9L819" cla9s="line" name="L829"> 829 92 href="crypto/gcm.c#L820" id=9L830" cla9s="line" name="L830"> 839 9      const cha href="+code=crypto_gcm_allo_ef"> class="sref">crypto_gcm_decr_ef"> class=uct <"+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=9L831" cla9s="line" name="L831"> 839 9      f="crypto/gcm.c#L787" id=9L832" cla9s="line" name="L832"> 839 93 href="crypto/gcm.c#L773" id=9L833" cla9s="line" name="L833"> 839
9a hreftruct crypto_gcm_initsetkey" " class=uct crypto_gcm_initss=uct f="+code=ctx" class="sref">crypto_gss=uct f="crypto/gcm.c#L866" id=9L834" cla9s="line" name="L834"> 839 9      f="crypto/gcm.c#L861" id=9L835" cla9s="line" name="L835"> 839 9      crypto_instance *inst)
crypto_gss=uct href="+code=nonce" c_ *ctass="sref">ghash_al_ *ctass=a hrf="crypto/gcm.c#L870" id=9L836" cla9s="line" name="L836"> 839 9      if (crypto_gcm_alloass=_spaw= href="+code=ctx" claspaw="sref">crypto_gspaw= hreff="+code=crypto_instance_ctx" class="sref">crypto_instance_ctx(inst);
 839 9              a href="+code=crypto_aead" clctx" class="sref">crypto_rfc4106_ctx *ctx = crypto_rfc4106_ss=ass=href="+code=inst" clss="sref">crypto_gss=uct ff="crypto/gcm.c#L814" id=9L818" cla9s="line" name="L838"> 839
938    if (crypto_aead *crypto_a * 839 9      crypto_a " cl href="crypto/gcm.c#L814" id=9L840" cla9s="line" name="L840"> 849 94 href="crypto/gcm.c#L871" id=9L841" cla9s="line" name="L841"> 849 94     crypto_a *crypto_aeadspaw=lass=href="+code=inst" cl"paw="sref">crypto_gspaw= hreff="crypto/gcm.c#L814" id=9L842" cla9s="line" name="L842"> 849 9              ref="+code=IS_ERR" class="sref">IS_ERR(crypto_a * 849
94                     a href="+code=crypto_g class="sref">PTR_ERR(crypto_a * 849 94 href="crypto/gcm.c#L795" id=9L845" cla9s="line" name="L845"> 849 94     ctx->child;
crypto_a * 849 94 href="crypto/gcm.c#L827" id=9L847" cla9s="line" name="L847"> 849
94     crypto_a " cl hreef="+code=crypto_aead_ctx" clak" class="sref">cra_alignm_exit" clak" class=href="+code=child" cass="sref">crypto_a * 849 94     crypto_a " cl hreehref== ~="+code=child" clc4106_ss=ass=ak" class="sref">parent 849}94     crypto_gss=uct href="+code=nonce" c*ctasss="sref">crypto_aeat>.crypto_g_syass=hrefef=ass=of_synes="sref">inst_ef">_synes= hre) +="crypto/gcm.c#L762" id=9L850" cla9s="line" name="L850"> 859
95                  u8 *ALIGNhref="+code=crypto_aead_ctx" cla_syass="sref">crypto_gcm_seta_ef">_syass=href="+code=child" cass="sref">crypto_a * 859s95         parent 859 95             return <<<<<<<<<<<<<<<<<"+code=keylen" _" cl"sref">crypto_a " cl hree+ 16f="crypto/gcm.c#L762" id=9L853" cla9s="line" name="L853"> 859 95 href="crypto/gcm.c#L844" id=9L854" cla9s="line" name="L854"> 859 9      . 859 9      f="crypto/gcm.c#L787" id=9L856" cla9s="line" name="L856"> 859}95 href="crypto/gcm.c#L827" id=9L857" cla9s="line" name="L857"> 859
95tic struct crypto_gcm_initsetkey"  xclass=uct crypto_gcm_initss=uct f="+code=ctx" class="sref">crypto_gss=uct f="crypto/gcm.c#L866" id=9L858" cla9s="line" name="L858"> 859s95a href="crypto/gcm.c#L829" id=9L859" cla9s="line" name="L859"> 859 9              a href="+code=crypto_aead" clctx" class="sref">crypto_rfc4106_ctx *ctx = crypto_rfc4106_ss=ass=href="+code=inst" clss="sref">crypto_gss=uct ff="crypto/gcm.c#L814" id=9L860" cla9s="line" name="L860"> 869{96 href="crypto/gcm.c#L871" id=9L861" cla9s="line" name="L861"> 869 96     crypto_aeadtass=href="+code=crypto_aes="sref">ctx->child;
 869 9      f="crypto/gcm.c#L787" id=9L863" cla9s="line" name="L863"> 869 96 href="crypto/gcm.c#L844" id=9L864" cla9s="line" name="L864"> 869
9a hreftruct crypto_instance *crypto_gcm_basectx lass=uct rtattr **tb)
 869 9      f="crypto/gcm.c#L829" id=9L866" cla9s="line" name="L866"> 869 96     if (crypto_gcm_seta_nametyp= href="+code=parent" alg="sref">inst_lg= href="crypto/gcm.c#L814" id=9L867" cla9s="line" name="L867"> 869
96             a href="+code=crypto_aead" cl" class="sref">crypto_instance *inst)
 869 968    if (crypto_gcm_alloass=_spaw= href="+code=ctx" claspaw="sref">crypto_gspaw= href="crypto/gcm.c#L814" id=9L859" cla9s="line" name="L869"> 869 96             a href="+code=crypto_aead" clss="sref">ghash_alead" clss= href="+code=parent" alg"sref">inst_lg href="crypto/gcm.c#L814" id=9L870" cla9s="line" name="L870"> 879
97     const char *ctr_name 879 9      err;
 879 97 href="crypto/gcm.c#L773" id=9L863" cla9s="line" name="L773"> 779<97     inst_lg= hreef="+code=crypto_gcm_free"crypto_gcm_seta"tb)
 779 9      err = PTR_ERR(inst_lg= hreff="crypto/gcm.c#L864" id=9L865" cla9s="line" name="L775"> 779 97     if (IS_ERR(inst_lg= hreff="crypto/gcm.c#L828" id=9L866" cla9s="line" name="L776"> 779
97                     a href="+code=ERR_PTR" class="sref">ERR_PTR(err);
 779<97 href="crypto/gcm.c#L868" id=9L778" cla9s="line" name="L778"> 779 97     return inst_lg= hrehref="+code=child" ctyp="sref">crypto_gtyp= href^="+code=inst" clFM_REQ_TYPE_AEAD"sref">crypto_gFM_REQ_TYPE_AEAD hre) href=="+code=inst" cl_lg="sref">inst_lg= hrehref="+code=child" cass="sref">cra_aligass=hreff="crypto/gcm.c#L828" id=9L859" cla9s="line" name="L779"> 779<97                     a href="+code=ERR_PTR" class="sref">ERR_PTR(-EINVAL;
 789 98 href="crypto/gcm.c#L871" id=9L781" cla9s="line" name="L781"> 789<98     ctr_namecrypto_attr_alg_name(tb[1]);
 789 98     err = PTR_ERR(ctr_name 789<983    if (IS_ERR(ctr_name 789 9      ERR_PTR(err);
 789 9      ="crypto/gcm.c#L862" id89<866" cla9s="line" name="L786"> 789}98     inst)
crypto_gkzlass=uct inst)
crypto_gspaw= hreff="+code=ctr_nameGFP_KERNE="sref">EINVAL 789
98             ref=!"+code=inst" class="sref">inst)
 789s988                    a href="+code=ERR_PTR" class="sref">ERR_PTR(-ERR_PTR 789{98 href="crypto/gcm.c#L820" id=9L790" cla9s="line" name="L790"> 799 99     crypto_gspaw= hreff="+code=crypto_instance_ctx" class="sref">crypto_instance_ctx(inst);
 799 99     crypto_gcm_alloccrypto_gspaw= hreinst);
 799 99     err = ass="sref">crypto_aead"rab>ass=href="+code=inst" clspaw="sref">crypto_gspaw= hrectr_name 799 99                                    "+code=crypto_gcm_basecequires_syn="sref">crypto_gcm_basecequires_syn=href="+code=ghash_naalg="sref">inst_lg= hrehref="+code=child" ctyp="sref">crypto_gtyp= href="+code=ss="sref"lg="sref">inst_lg= hrehref="+code=child" cass="sref">cra_aligass=hreffef="crypto/gcm.c#L814" id=9L784" cla9s="line" name="L794"> 799
99     if (err);
 799 99         tass="sref">instout>tass= href="crypto/gcm.c#L864" id=9L866" cla9s="line" name="L796"> 799 99 href="crypto/gcm.c#L827" id=9L797" cla9s="line" name="L797"> 799 99     inst_lg hreef="+code=crypto_grab_skc_ef">cpaw=las="sref">ghash_alead" clsef">cpaw=las=href="+code=inst" clspaw="sref">crypto_gspaw= hreef="crypto/gcm.c#L814" id=9L778" cla9s="line" name="L798"> 799 99 href="crypto/gcm.c#L839" id=9L799" cla9s="line" name="L799"> 799
99     err = EINVAL;
 7910L80>10L8href="/pre>"crypto/gcm.c#L867" id=10L100" cla10L="line" name="L791"> 7910L=">10L     a>(/* We only support 16-byte bss=ks. */
 7910L=">10L             ref="+code=IS_ERR" _"g"sref">inst_lg hrehref="+code=nonce" c*ca>ass="sref">crypto_aeaa>.crypto_givass=     != 16e="crypto/gcm.c#L814" id=10L300" cla10L="line" name="L793"> 7910L=">10L                     goto="+code=ss="srefout>droplas="sref">ghash_alout>droplas= href="crypto/gcm.c#L867" id=10L400" cla10L="line" name="L794"> 7910L=">10L href="crypto/gcm.c#L795" id=10L500" cla10L="line" name="L795"> 7910L=">10L5    a>(/* Not a a heam cipher? */
 7910L=">10L     if (inst_lg hrehref="+code=nonce" c*ca>bss=ksss="sref">crypto_gcma>bss=ksss=     != 1e="crypto/gcm.c#L814" id=10L700" cla10L="line" name="L797"> 7910L=">10L             return droplas="sref">ghash_alout>droplas= href="crypto/gcm.c#L867" id=10L800" cla10L="line" name="L798"> 7910L=">10L href="crypto/gcm.c#L839" id=10L900" cla10L="line" name="L799"> 7910L=">10L     err = ENAMETOOLONG);
 8110s=">10s=    if (snprintf(inst);
inst_lg hre="+code=free" clcma>ass="sref">crypto_atta>, CRYPTO_MAX_ALG_NAME,  8110s=">10s         "gcm_basectx(quot;,
inst_lg hrehref="+code=nonce" c*ca>ass="sref">crypto_atta>, CRYPTO_MAX_ALG_NAME)
 8110s=">10s             retu"+code=IS_ERR" " class="sref">snprintf(inst);
inst_lg hre="+code=free" clcma>driveclass="sref">ctr_namedriveclass= href="+code=CRYPTO_MAX_ALG_NAME" class="sref">CRYPTO_MAX_ALG_NAME,  8110s=">10s                          ass="string">"gcm_basectx(quot;,
inst_lg hrehref="+code=nonce" c*ca>driveclass="sref">ctr_namedriveclass= hre 8110s=">10s     CRYPTO_MAX_ALG_NAME,  8110s=">10s         droplas="sref">ghash_alout>droplas= href="crypto/gcm.c#L867" id=101600" cla10s="line" name="L816"> 8110s=">10s href="crypto/gcm.c#L827" id=10s700" cla10s="line" name="L817"> 8110s=">10s     inst);
inst_lg hre="+code=free" clcma>a href="crypto/ghash_aaa>(crypto_gFM_REQ_TYPE_AEAD href="crypto/gcm.c#L867" id=101800" cla10s="line" name="L818"> 8110s=">10s     inst);
inst_lg hre="+code=free" clcma>a href="crypto/ghash_aaa>(inst_lg hrehref="+code=nonce" c*ca>a href="crypto/ghash_aaa>(ASYNC"sref">crypto_gFM_REQ_ASYNC href="crypto/gcm.c#L867" id=101900" cla10s="line" name="L819"> 8110s=">10s     inst);
inst_lg hre="+code=free" clcma>a>(orit="sref">crypto_rfca>a>(orit=hrefef="+code=crypto_g_"g"sref">inst_lg hrehref="+code=nonce" c*ca>a>(orit="sref">crypto_rfca>a>(orit=hreff="crypto/gcm.c#L867" id=102800" cla10s="line" name="L820"> 8210s=">10s=    inst);
inst_lg hre="+code=free" clcma>bss=ksss="sref">crypto_gcma>bss=ksss=     = 1f="crypto/gcm.c#L867" id=102100" cla10s="line" name="L821"> 8210s=">10s     inst);
inst_lg hre="+code=free" clcma>k" class="sref">cra_alignmaak" class=hrefef="+code=crypto_g_"g"sref">inst_lg hrehref="+code=nonce" c*ca>k" class="sref">cra_alignmaak" class=hreff="crypto/gcm.c#L867" id=102200" cla10s="line" name="L822"> 8210s=">10s     inst);
inst_lg hre="+code=free" clcma>typ="sref">crypto_gcmaetyp= href=ehref="+code=crypto_grab_skcnivsef">typ="sref">crypto_gcm_setanivsef">typ=hreff="crypto/gcm.c#L867" id=102300" cla10s="line" name="L823"> 8210s=">10s href="crypto/gcm.c#L844" id=10s400" cla10s="line" name="L824"> 8210s=">10s     inst);
inst_lg hre="+code=free" clcma>kss="sref">crypto_aeaa>.crypto_givass=     = 8f="crypto/gcm.c#L867" id=102500" cla10s="line" name="L825"> 8210s=">10s     inst);
inst_lg hre="+code=free" clcma>kss="sref">crypto_aeaa>.crypto_gmax" class=     = 16f="crypto/gcm.c#L762" id=10s600" cla10s="line" name="L826"> 8210s=">10s href="crypto/gcm.c#L827" id=102700" cla10s="line" name="L827"> 8210s=">10s     inst);
inst_lg hre="+code=free" clcma>ctxsss="sref">crypto_gcma>ctxsss=     = ass=ofcrypto_rfc4106_ctx * 8210s=">10s href="crypto/gcm.c#L839" id=102900" cla10s="line" name="L829"> 8210s=">10s     inst);
inst_lg hre="+code=free" clcma>" cl"sref">crypto_gcma>" cl hreef="+code=crypto_grab_skcsetkey" " class="sref">crypto_gcm_initsetkey" " class=uct f="crypto/gcm.c#L814" id=103800" cla10s="line" name="L830"> 8310s=">10s=    inst);
inst_lg hre="+code=free" clcma> xcl"sref">crypto_gcma> xcl hreef="+code=crypto_grab_skcsetkey"  xclass="sref">crypto_gcm_initsetkey"  xclass=uct f="crypto/gcm.c#L814" id=103100" cla10s="line" name="L831"> 8310s=">10s1href="crypto/gcm.c#L839" id=103200" cla10s="line" name="L832"> 8310s=">10s     inst);
inst_lg hre="+code=free" clcma>kss="sref">crypto_aeaa>.crypto_rccrypto_rfc4106_setkey" c 8310s=">10s     inst);
inst_lg hre="+code=free" clcma>kss="sref">crypto_aeaa>.crypto_gccrypto_gcm_setasetkey" cla" class=uct f="crypto/gcm.c#L814" id=103400" cla10s="line" name="L834"> 8310s=">10s     inst);
inst_lg hre="+code=free" clcma>kss="sref">crypto_aeaa>.crypto_g class=uct ef="+code=crypto_grab_skcsetkey"  class="sref">crypto_gcm_encrsetkey"  class=uct f="crypto/gcm.c#L814" id=103500" cla10s="line" name="L835"> 8310s=">10s     inst);
inst_lg hre="+code=free" clcma>kss="sref">crypto_aeaa>.crypto_g class=uct ef="+code=crypto_grab_skcsetkey"  class="sref">crypto_gcm_decrsetkey"  class=uct f="crypto/gcm.c#L814" id=103600" cla10s="line" name="L836"> 8310s=">10s href="crypto/gcm.c#L827" id=103700" cla10s="line" name="L837"> 8310s=">10s     inst);
inst_lg hre="+code=free" clcma>kss="sref">crypto_aeaa>.u8 *genavuct ef="ss="string">"gcm_baseseqivspan>,
 8310s=">10s href="crypto/gcm.c#L839" id=103900" cla10s="line" name="L839"> 8310s=">10s     "+code=ss="srefout"sref">ghash_alout    f="crypto/gcm.c#L784" id=104800" cla10s="line" name="L840"> 8410s=">10s=    inst)
 8410s=">10s1href="crypto/gcm.c#L839" id=104200" cla10s="line" name="L842"> 8410s=">10s2    "+code=ss="srefout>droplas="sref">ghash_alout>droplas= href="crypto/gcm.c#L784" id=104300" cla10s="line" name="L843"> 8410s=">10s     crypto_aeaddroplass=href="+code=full_namspaw="sref">crypto_gspaw= hreef="crypto/gcm.c#L814" id=10s400" cla10s="line" name="L844"> 8410s=">10s4    "+code=ss="srefout>tass="sref">instout>tass= href="crypto/gcm.c#L784" id=104500" cla10s="line" name="L845"> 8410s=">10s     instktinst);
 8410s=">10s     inst)
ERR_PTR(err);
 8410s=">10s     ghash_alout    f="crypto/gcm.c#L843" id=10s800" cla10s="line" name="L848"> 8410s=">10s hreff="crypto/gcm.c#L787" id=10s900" cla10s="line" name="L849"> 8410s=">10s href="crypto/gcm.c#L820" id=105800" cla10s="line" name="L850"> 8510s=">10s=hreftruct instcm_freesetkey" tcrypto_instance *inst)
 8510s=">10s1hreff="crypto/gcm.c#L829" id=10s200" cla10s="line" name="L852"> 8510s=">10s     crypto_gcm_allodroplspaw=href="+code=err" clanstance_ctx" class="sref">crypto_instance_ctx(inst);
 8510s=">10s     instktinst);
 8510s=">10s     f="crypto/gcm.c#L787" id=10s500" cla10s="line" name="L855"> 8510s=">10s     ="crypto/gcm.c#L862" id810s600" cla10s="line" name="L856"> 8510s=">10s hreftruct crypto_tem_initsemplas=    <"+code=crypto_gcm_freesetkey" tmpl"sref">instcm_freesetkey" tmpl hreef=f="crypto/gcm.c#L829" id=10s700" cla10s="line" name="L857"> 8510s=">10s     ctr_nameass= hreef="ss="string">"gcm_basectxspan>,
 8510s=">10s8    crypto_glass=uct ef="+code=crypto_grab_skcsetkey" lass="sref">crypto_gcm_basectx lass=uct f="crypto/gcm.c#L829" id=10s900" cla10s="line" name="L859"> 8510s=">10s9    insttinstcm_freesetkey" t 8610s=">10s=    crypto_gmodul=hrefef="+code=crypto_gTHIS_MODUL="sref">CRYPTO_MTHIS_MODUL=hreff="crypto/gcm.c#L829" id=106100" cla10s="line" name="L861"> 8610s=">10s     ff="crypto/gcm.c#L814" id=106200" cla10s="line" name="L862"> 8610s=">10s href="crypto/gcm.c#L773" id=10s300" cla10s="line" name="L863"> 8610s=">10s hreftruct <"+code=full_namasme="L8ref">inst);me="hrefea href="+code=crypto_aead" clctx"543eceqass="sref">crypto_rfc4106_ctx<543eceqass= href="+code=inst" clfc4106_ctx<543eceqss="sref">crypto_rfc4106_ctx<543eceq 8610s=">10s     _synes="sref">inst_ef">_synes= href="+code=ctx" cla_sy"sref">inst_syuct f="crypto/gcm.c#L866" id=10s500" cla10s="line" name="L865"> 8610s=">10s     f="crypto/gcm.c#L829" id=10s600" cla10s="line" name="L866"> 8610s=">10s     crypto_a " cl hreef="+code=crypto_aead_ctx" clak" class="sref">cra_alignm_exit" clak" class=href="+code=child" cnm_exit" cla_syss="sref">crypto_gcm_exit" cla_syss=href="+code=ctx" cla_sy"sref">inst_syuct fef="crypto/gcm.c#L814" id=106700" cla10s="line" name="L867"> 8610s=">10s href="crypto/gcm.c#L868" id=10s800" cla10s="line" name="L868"> 8610s=">10s8    (ALIGN"sref">u8 */a>(ALIGNhref=="+code=u64" clas="sref">u8 *_synes=ass="sref">crypto_a_ef">_synes=ass=href="+code=ctx" cla_sy"sref">inst_syuct ff="+code=kfree" c_" cl"sref">crypto_a " cl hree+ 1ef="crypto/gcm.c#L814" id=106900" cla10s="line" name="L869"> 8610s=">10s9    f="crypto/gcm.c#L787" id=107800" cla10s="line" name="L870"> 8710s=">10s=href="crypto/gcm.c#L868" id=107100" cla10s="line" name="L871"> 8710s=">10s1hreftruct crypto_rfc4106_setk543eccrypto_aead *parentu8 *crypto_rss=hreff="crypto/gcm.c#L829" id=107200" cla10s="line" name="L872"> 8710s=">10s             return <<<<<<<<<<<<<<<<<< int keylen 7710s=">10s3    f="crypto/gcm.c#L829" id=107400" cla10s="line" name="L774"> 7710s=">10s     crypto_rfc4106_ctx<543e*ctx = ss="sref">crypto_rfc4106__ef">ss=href="+code=ctx" claparss="sref">parent 7710s=">10s     crypto_aead *child;
ctx->child;
 7710s=">10s     if (err;
 7710s=">10s href="crypto/gcm.c#L868" id=107800" cla10s="line" name="L778"> 7710s=">10s     return keylen 7710s=">10s                     a href=="+code=EINVAL" class="sref">EINVAL;
 7810s=">10s=href="crypto/gcm.c#L868" id=108100" cla10s="line" name="L781"> 7810s=">10s     keylen 7810s=">10s     memcpy(ctx->crypto_inoss=hreffh"+code=inst" clks="sref">crypto_rss=hrefe+ "+code=crypto_ass=ss="sref">keylen 7810s=">10s href="crypto/gcm.c#L844" id=108400" cla10s="line" name="L784"> 7810s=">10s     slear>a href="crypto/ghash_a4106__ef">slear>a hrehref="+code=inst" cleass="sref">child;
child 7810s=">10s     ccchild;
ggparent 7810s=">10s                                          "+code=CRYPTO_MAX_ALG_TFM_REQ_MASK"sref">child 7810s=">10s     err = ccrypto_rfc4106__ef">cchild;
crypto_rss=hreff="+code=crypto_rss=ss="sref">keylen 7810s=">10s     ccparentggchild;
 7810s=">10s                                           "+code=CRYPTO_MAX_ALG_TFM_RES_MASK"sref">child 7910s=">10s=href="crypto/gcm.c#L844" id=109100" cla10s="line" name="L791"> 7910s=">10s     err;
 7910s=">10s     f="crypto/gcm.c#L787" id=10s300" cla10s="line" name="L793"> 7910s=">10s href="crypto/gcm.c#L844" id=109400" cla10s="line" name="L794"> 7910s=">10s hreftruct crypto_gcm_setasetk543eccrypto_aead *parent 7910s=">10s         crypto_g" class=hreff="crypto/gcm.c#L866" id=109600" cla10s="line" name="L796"> 7910s=">10s6    f="crypto/gcm.c#L829" id=109700" cla10s="line" name="L797"> 7910s=">10s             a href="+code=crypto_aead" clctx"543ess="sref">crypto_rfc4106_ctx<543e*ctx = ss="sref">crypto_rfc4106__ef">ss=href="+code=ctx" claparss="sref">parent 7910s=">10s href="crypto/gcm.c#L839" id=109900" cla10s="line" name="L799"> 7910s=">10s             ref="+code=IS_ERR" _ class="sref">crypto_g" class=href != 16e="crypto/gcm.c#L814" id=11L800" cla11L800ine" name="L799"> 7911L80>110                  EINVAL;
 7911L=">1101href="crypto/gcm.c#L839" id=11L200" cla11L="line" name="L792"> 7911L=">11L             a href="+code=crypto_gcm_allo_ef">ccrypto_gcm_seta_ef">cctx->child;
crypto_g" class=hrefff="crypto/gcm.c#L867" id=11L300" cla11L="line" name="L793"> 7911L=">11L     f="crypto/gcm.c#L787" id=11L400" cla11L="line" name="L794"> 7911L=">11L href="crypto/gcm.c#L795" id=11L500" cla11L="line" name="L795"> 7911L=">11L5    truct _synes="sref">inst_ef">_synes= href="+code=ctx" clafc4106_ctx<543e*c410"sref">crypto_rfc4106_ctx<543e*c410href=a href="+code=crypto_a_ef">_synes="sref">inst_ef">_synes= href="+code=ctx" cla_sy"sref">inst_syuct f="crypto/gcm.c#L844" id=11L600" cla11L="line" name="L796"> 7911L=">110                                                      ref="+code=err" clasn="sref">crypto_gen=hrefe="crypto/gcm.c#L814" id=11L700" cla11L="line" name="L797"> 7911L=">11L     f="crypto/gcm.c#L829" id=11L800" cla11L="line" name="L798"> 7911L=">1108    if (crypto_aead *crypto_a *_syss="sref">crypto_gcm_exit" cla_syss=href="+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=11L900" cla11L="line" name="L799"> 7911L=">110             a href="+code=crypto_aead" clctx"543ess="sref">crypto_rfc4106_ctx<543e*ctx = ss="sref">crypto_rfc4106__ef">ss=href="+code=ctx" claass="sref">crypto_a * 8111s=">11s=    if (crypto_rfc4106_ctx<543eceqass= href="+code=inst" clrss="sref">crypto_rr= crypto_rfc4106_ctx<543eceqinst_syuct ff="crypto/gcm.c#L867" id=111100" cla11s="line" name="L811"> 8111s=">11s         _synes="sref">inst_ef">_synes= href="+code=ctx" clasub_sy"sref">instsub_sya href=href="+code=crypto_grss="sref">crypto_rr= instsub_sya hrf="crypto/gcm.c#L867" id=111200" cla11s="line" name="L812"> 8111s=">11s             a href="+code=crypto_ascatterlis="sref">instscatterlis= href="+code=ctx" clads="sref">instdinst_syuct href="+code=child" cds="sref">instd 8111s=">11s             a href="+code=crypto_ascatterlis="sref">instscatterlis= href="+code=ctx" clacipher"sref">crypto_rfipher hreef="+code=crypto_d_ss="sref">crypto_rr= crypto_rfipher href="crypto/gcm.c#L867" id=111400" cla11s="line" name="L814"> 8111s=">111     instscatterlis= href="+code=ctx" clapaylos="sref">crypto_apaylos= hreef="+code=crypto_d_ss="sref">crypto_rr= crypto_apaylos= href="crypto/gcm.c#L867" id=111500" cla11s="line" name="L815"> 8111s=">111     instscatterlis= href="+code=ctx" claf">s="sref">crypto_gl">s= hreef="+code=crypto_d_ss="sref">crypto_rr= s="sref">crypto_gl">s= href="crypto/gcm.c#L867" id=111600" cla11s="line" name="L816"> 8111s=">111     crypto_g" class=hrefef="+code=crypto_aead_ctx" clak class="sref">crypto_gcm_seta_ef">" class=href="+code=inst" class="sref">crypto_a * 8111s=">11s     s=ss="sref">keylens=ss= hreef="+code=crypto_d_sy"sref">inst_syuct href="+code=child" c"">s=ss="sref">keylens=ss= href="crypto/gcm.c#L867" id=111800" cla11s="line" name="L818"> 8111s=">1118    if (crypto_gpag= href="+code=ctx" clads=p"sref">instd 8111s=">11s     u8 *instvd 8211s=">11s=    u8 *u8 *avuct ef="+code=inst" cl/a>(ALIGN"sref">u8 */a>(ALIGNhref=="+code=u64" clas="sref">u8 *crypto_rr= crypto_gcm_seta_ef">_syass=href="+code=inst" cles="sref">ctx->child;
 8211s=">112         cra_alignm_exit" clak" class=href="+code=child" cns="sref">ctx->child;
 8211s=">112 href="crypto/gcm.c#L773" id=112300" cla11s="line" name="L823"> 8211s=">112     memcpy(u8 *avuct fh"+code=CRYPTO_M_s="sref">ctx->crypto_inoss=hreffh4ff="crypto/gcm.c#L867" id=11s400" cla11s="line" name="L824"> 8211s=">11s     memcpy(u8 *avuct e+ 4fh"+code=CRYPTO_M_sy"sref">inst_syuct href="+code=child" cav"sref">u8 *avuct fh8ff="crypto/gcm.c#L867" id=11s500" cla11s="line" name="L825"> 8211s=">112     ="crypto/gcm.c#L862" id811s600" cla11s="line" name="L826"> 8211s=">112     a>(/* ar * 8211s=">11s     crypto_gen=hrefe="crypto/gcm.c#L814" id=11s800" cla11s="line" name="L828"> 8211s=">1128                    "+code=crypto_mclase="sref">instclase=href="+code=ctx" cla_ss="sref">crypto_rr= inst_ cl_taguct fh0f="+code=CRYPTO_M" class="sref">crypto_g" class=hrefff="crypto/gcm.c#L867" id=112900" cla11s="line" name="L829"> 8211s=">11s      8311s=">113                  memcpycrypto_rr= inst_ cl_taguct fh"+code=child" cds="sref">instd 8311s=">113         inst_syuct href="+code=child" ccm.c#ss="sref">keylencrypto_g" class=hreff="crypto/gcm.c#L844" id=113200" cla11s="line" name="L832"> 8311s=">113             return <<<<<<<<<<<<<<<<<<     crypto_g" class=hreff 0ff="crypto/gcm.c#L867" id=113300" cla11s="line" name="L833"> 8311s=">113 href="crypto/gcm.c#L844" id=113400" cla11s="line" name="L834"> 8311s=">11s     instsg " clao="href="+code=child" cnipher"sref">crypto_rfipher hrefh"+code=CRYPTO_M_ss="sref">crypto_rr= inst_ cl_taguct fh"+code=child" c" class="sref">crypto_g" class=hrefff="crypto/gcm.c#L867" id=113500" cla11s="line" name="L835"> 8311s=">113     ="crypto/gcm.c#L862" id8113600" cla11s="line" name="L836"> 8311s=">113     a>(/* ar * 8311s=">11s     instdcrypto_gsg pag=href="+code=child" cds="sref">instd 8311s=">113     instvdcrypto_g/ag=HighMe=href="+code=child" cds=p"sref">instdEINVALinstdinstdinstoffse= href="crypto/gcm.c#L867" id=113900" cla11s="line" name="L839"> 8311s=">113 href="crypto/gcm.c#L820" id=114800" cla11s="line" name="L840"> 8411s=">114     crypto_gsg " clatabl=href="+code=child" cpaylos="sref">crypto_apaylos= hre, 2ff="crypto/gcm.c#L867" id=11s100" cla11s="line" name="L841"> 8411s=">114     snprintfcrypto_apaylos= hre, "+code=CRYPTO_M_sy"sref">inst_syuct href="+code=child" cav"sref">u8 *avuct fh8ff="crypto/gcm.c#L867" id=114200" cla11s="line" name="L842"> 8411s=">114     memcpycrypto_apaylos= hre, "+code=CRYPTO_Mds="sref">instdinstvdinst_syuct href="+code=child" cav"sref">u8 *avuct e+ 8, 2ff="crypto/gcm.c#L867" id=11s300" cla11s="line" name="L843"> 8411s=">11s     s=ss="sref">keylens=ss= hree+= 8 + "+code=crypto_a_sy"sref">inst_syuct href="+code=child" ccm.c#ss="sref">keylencrypto_gen=href ?=0e:="+code=gcm_inst" class="sref">crypto_g" class=hrefff="crypto/gcm.c#L867" id=11s400" cla11s="line" name="L844"> 8411s=">114 href="crypto/gcm.c#L795" id=114500" cla11s="line" name="L845"> 8411s=">11s     crypto_gsg " clatabl=href="+code=child" cf">s="sref">crypto_gl">s= hre, 2ff="crypto/gcm.c#L867" id=11s600" cla11s="line" name="L846"> 8411s=">11s     crypto_gsg cs="sref">crypto_gl">s= hre, "+code=inst" clsg pag="sref">crypto_gsg pag=href="+code=child" c_sy"sref">inst_syuct href="+code=child" c"">s="sref">crypto_gl">s= hreff="+code=kfree" c_sy"sref">inst_syuct href="+code=child" c"">s="sref">crypto_gl">s= hrehref="+code=child" css=gth"sref">crypto_gss=gthhreff="crypto/gcm.c#L844" id=11s700" cla11s="line" name="L847"> 8411s=">11s     inst_syuct href="+code=child" c"">s="sref">crypto_gl">s= hrehref="+code=child" coffse="sref">instoffse= hreff="crypto/gcm.c#L867" id=11s800" cla11s="line" name="L848"> 8411s=">114     memcpys="sref">crypto_gl">s= hre, "+code=inst" clpaylos="sref">crypto_apaylos= hre, 0, 2ff="crypto/gcm.c#L867" id=11s900" cla11s="line" name="L849"> 8411s=">11s href="crypto/gcm.c#L820" id=115800" cla11s="line" name="L850"> 8511s=">115     _synes=accrypto_g_ef">_synes=acinstsub_sya hrfh"+code=CRYPTO_M_s="sref">ctx->child;
 8511s=">115     _synes=accra_alig_ef">_synes=acinstsub_sya hrfh"+code=CRYPTO_M_sy"sref">inst_syuct href="+code=child" cbas="sref">crypto_gbas=uct ="+code=decrypt"t href="crypto/ghasha hrehreffh"+code=CRYPTO_M_sy"sref">inst_syuct href="+code=child" cbas="sref">crypto_gbas=uct ="+code=decrypt"a>(ples="sref">crypto_te>(ples=hreff="crypto/gcm.c#L844" id=11s200" cla11s="line" name="L852"> 8511s=">115             return <<<<<<<<<<<<<<<<<< "+code=CRYPTO_M_sy"sref">inst_syuct href="+code=child" cbas="sref">crypto_gbas=uct ="+code=decrypt"data"sref">instdata hre)f="crypto/gcm.c#L867" id=115300" cla11s="line" name="L853"> 8511s=">11s     _synes=accrypto_r_ef">_synes=acinstsub_sya hrfh"+code=CRYPTO_M_ipher"sref">crypto_rfipher hrefh"+code=CRYPTO_M_ipher"sref">crypto_rfipher hrefh"+code=CRYPTO_Msn="sref">crypto_gen=href ?=0e:="+code=gcm_inst" class="sref">crypto_g" class=hreffh"+code=CRYPTO_Mav"sref">u8 *avuct )f="crypto/gcm.c#L867" id=115400" cla11s="line" name="L854"> 8511s=">115     _synes=acs="sref">crypto_glef">_synes=acs=href="+code=child" csub_sy"sref">instsub_sya hrfh"+code=CRYPTO_Mf">s="sref">crypto_gl">s= hre, "+code=inst" cl"">s=ss="sref">keylens=ss= hre)f="crypto/gcm.c#L867" id=115500" cla11s="line" name="L855"> 8511s=">11s     ="crypto/gcm.c#L862" id811s600" cla11s="line" name="L856"> 8511s=">115     instsub_sya hrf="crypto/gcm.c#L867" id=11s700" cla11s="line" name="L857"> 8511s=">11s     f="crypto/gcm.c#L787" id=11s800" cla11s="line" name="L858"> 8511s=">115 href="crypto/gcm.c#L839" id=11s900" cla11s="line" name="L859"> 8511s=">11s9    truct crypto_gcm_encrsetk543e class=href=a href="+code=crypto_a_ef">_synes="sref">inst_ef">_synes= href="+code=ctx" cla_sy"sref">inst_syuct f="crypto/gcm.c#L866" id=116800" cla11s="line" name="L860"> 8611s=">11s=    f="crypto/gcm.c#L829" id=116100" cla11s="line" name="L861"> 8611s=">116         crypto_aead *crypto_a *_syss="sref">crypto_gcm_exit" cla_syss=href="+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=116200" cla11s="line" name="L862"> 8611s=">116             a href="+code=crypto_aead" clctx"543eceqass="sref">crypto_rfc4106_ctx<543eceqass= href="+code=inst" clrss="sref">crypto_rr= crypto_rfc4106_ctx<543eceqinst_syuct ff="crypto/gcm.c#L867" id=11s300" cla11s="line" name="L863"> 8611s=">116             a href="+code=crypto_a_ef">_synes="sref">inst_ef">_synes= href="+code=ctx" clasub_sy"sref">instsub_sya hrf="crypto/gcm.c#L867" id=11s400" cla11s="line" name="L864"> 8611s=">11s     err;
 8611s=">116     ="crypto/gcm.c#L862" id811s600" cla11s="line" name="L866"> 8611s=">116     instsub_sya href="+code=crypto_aead_ctxctx<543e*c410"sref">crypto_rfc4106_ctx<543e*c410href="+code=ctx" cla_sy"sref">inst_syuct , 1ef="crypto/gcm.c#L814" id=116700" cla11s="line" name="L867"> 8611s=">116     err =  class="sref">crypto_gcm_encr_ef"> class=href="+code=child" csub_sy"sref">instsub_sya href="crypto/gcm.c#L814" id=116800" cla11s="line" name="L868"> 8611s=">11s8    err);
 8611s=">116                     a href="+code=err" class="sref">err;
 8711s=">11s=href="crypto/gcm.c#L868" id=117100" cla11s="line" name="L871"> 8711s=">117     memcpycrypto_rr= inst_ cl_taguct fh"+code=child" c_sy"sref">inst_syuct href="+code=child" cds="sref">instdinst_syuct href="+code=child" ccm.c#ss="sref">keylen 8711s=">11s             return <<<<<<<<<<<<<<<<<<"+code=PTR_ERR"cm_seta_ef">k class="sref">crypto_gcm_seta_ef">" class=href="+code=inst" class="sref">crypto_a * 7711s=">117 href="crypto/gcm.c#L844" id=117400" cla11s="line" name="L774"> 7711s=">11s      7711s=">11s     f="crypto/gcm.c#L787" id=117600" cla11s="line" name="L776"> 7711s=">117 href="crypto/gcm.c#L827" id=11s700" cla11s="line" name="L777"> 7711s=">11s hreftruct crypto_gcm_decrsetk543e class=href=a href="+code=crypto_a_ef">_synes="sref">inst_ef">_synes= href="+code=ctx" cla_sy"sref">inst_syuct f="crypto/gcm.c#L866" id=117800" cla11s="line" name="L778"> 7711s=">11s     f="crypto/gcm.c#L829" id=117900" cla11s="line" name="L779"> 7711s=">117     inst_syuct ef="+code=crypto_aead_ctxctx<543e*c410"sref">crypto_rfc4106_ctx<543e*c410href="+code=ctx" cla_sy"sref">inst_syuct , 0ff="crypto/gcm.c#L867" id=118800" cla11s="line" name="L780"> 7811s=">11s=href="crypto/gcm.c#L868" id=118100" cla11s="line" name="L781"> 7811s=">11s      class="sref">crypto_gcm_decr_ef"> class=href="+code=ctx" cla_sy"sref">inst_syuct ff="crypto/gcm.c#L867" id=118200" cla11s="line" name="L782"> 7811s=">118     f="crypto/gcm.c#L787" id=118300" cla11s="line" name="L783"> 7811s=">11s href="crypto/gcm.c#L844" id=118400" cla11s="line" name="L784"> 7811s=">118 hreftruct crypto_gcm_initsetk543e" class=href=a href="+code=crypto_acm_initss="sref">crypto_gcm_initss=hreff="+code=ctx" class="sref">crypto_gss=hreff="crypto/gcm.c#L866" id=118500" cla11s="line" name="L785"> 7811s=">118     f="crypto/gcm.c#L829" id=118600" cla11s="line" name="L786"> 7811s=">11s             a href="+code=crypto_aead" cl" class="sref">crypto_instance *inst)
crypto_gss=hrefhref="+code=child" c_e*ctlas="sref">ghash_al_e*ctlas= href="crypto/gcm.c#L864" id=118700" cla11s="line" name="L787"> 7811s=">118             a href="+code=crypto_aead" cl_ef">cpaw="sref">crypto_gcm_allo_ef">cpaw= href="+code=ctx" claspaw="sref">crypto_gspaw= hreef="+code=crypto_aead_ctx_ctx" class="sref">crypto_instance_ctx(inst);
 7811s=">1188    if (crypto_rfc4106_ctx<543e*ctx = crypto_rfc4106_ss=e*s=href="+code=inst" clss="sref">crypto_gss=hrefff="crypto/gcm.c#L864" id=118900" cla11s="line" name="L789"> 7811s=">118             a href="+code=crypto_aead" class="sref">crypto_aead *crypto_a * 7911s=">119     crypto_a " cl href="crypto/gcm.c#L864" id=119100" cla11s="line" name="L791"> 7911s=">1191href="crypto/gcm.c#L839" id=119200" cla11s="line" name="L792"> 7911s=">119     crypto_a *crypto_aeadspaw=lass=href="+code=child" cspaw="sref">crypto_gspaw= hreef="crypto/gcm.c#L814" id=11s300" cla11s="line" name="L793"> 7911s=">119             ref="+code=snprintfIS_ER="sref">ERR_PTRcrypto_a * 7911s=">119     ERR_PTR(ER=href="+code=inst" class="sref">crypto_a * 7911s=">119     ="crypto/gcm.c#L862" id8119600" cla11s="line" name="L796"> 7911s=">119     ctx->child;
crypto_a * 7911s=">119 href="crypto/gcm.c#L868" id=119800" cla11s="line" name="L798"> 7911s=">119     crypto_a " cl hreef="+code=crypto_aead_ctx" clak" class="sref">cra_alignm_exit" clak" class=href="+code=child" cass="sref">crypto_a * 7911s=">119     crypto_a " cl hreehref== ~="+code=child" cnm_exitss=e*s=ak" class="sref">parent 7912L80>120     crypto_gss=hrefhref="+code=child" c*ctlass="sref">crypto_aeat>.crypto_g_syass=hrefef=ass=of=a href="+code=crypto_acm_initctx"543eceqass="sref">crypto_rfc4106_ctx<543eceqass= hre) +="crypto/gcm.c#L814" id=12L100" cla12L="line" name="L791"> 7912L=">120         u8 *ALIGNhref="+code=crypto_aead_ctx_ef">_syass="sref">crypto_gcm_seta_ef">_syass=href="+code=inst" class="sref">crypto_a * 7912L=">120             return <<<<<<<<<<<<<<<<<<     "+code=child" cnm_exitss=e*s=ak" class="sref">parent 7912L=">1203        crypto_a " cl hree+ 16f="crypto/gcm.c#L814" id=12L400" cla12L="line" name="L794"> 7912L=">12L href="crypto/gcm.c#L795" id=12L500" cla12L="line" name="L795"> 7912L=">120      7912L=">120     f="crypto/gcm.c#L787" id=12L700" cla12L="line" name="L797"> 7912L=">120 href="crypto/gcm.c#L868" id=12L800" cla12L="line" name="L798"> 7912L=">1208    truct crypto_gcm_initsetk543e xclass=href=a href="+code=crypto_acm_initss="sref">crypto_gcm_initss=hreff="+code=ctx" class="sref">crypto_gss=hreff="crypto/gcm.c#L866" id=12L900" cla12L="line" name="L799"> 7912L=">120     f="crypto/gcm.c#L829" id=121800" cla12s="line" name="L810"> 8112s=">12s=    if (crypto_rfc4106_ctx<543e*ctx = crypto_rfc4106_ss=e*s=href="+code=inst" clss="sref">crypto_gss=hrefff="crypto/gcm.c#L864" id=121100" cla12s="line" name="L811"> 8112s=">1211href="crypto/gcm.c#L839" id=121200" cla12s="line" name="L812"> 8112s=">121     crypto_aeadtctx->child;
 8112s=">121     f="crypto/gcm.c#L787" id=121400" cla12s="line" name="L814"> 8112s=">121 href="crypto/gcm.c#L795" id=121500" cla12s="line" name="L815"> 8112s=">1215    truct crypto_instance *crypto_gcm_basectx<543elass=href=a href="+code=crypto_arruct="sref">err;rruct= href=="+code=ctx" clasb"sref">crypto_gsbhreff="crypto/gcm.c#L866" id=121600" cla12s="line" name="L816"> 8112s=">1216    f="crypto/gcm.c#L829" id=121700" cla12s="line" name="L817"> 8112s=">121             a href="+code=crypto_aead" cl_ct=_typ="sref">crypto_gcm_seta_ct=_typ= href="+code=parent" alg="sref">inst_lg= href="crypto/gcm.c#L864" id=121800" cla12s="line" name="L818"> 8112s=">1218    if (crypto_instance *inst)
 8112etk54=">11L   ="sref">crypto_rfc4106_ctx<8112cstead" cl" class="sref">cry s="sref">28 * 7912L=">120     f="crypto/gcm.c#L8">inst)
i> 8112s=">121            a href="+code=cry112cstead" cl" class="sref">cry rypto_rfc4>childcry o/gcm.c#L8a href="+code=child" ceas2="sre22="L811"> 8112>sub_sya hrf="crypto/gcm.c#L867" id=11s400" cla11s="line" name="L864">2to/gcm.c#L214" id=112200" cla11s="li2e" na22"L782"> 7811s=">118     f="cry2ctx-&g2;crypto_inoss=hreffh4ff="c     a href="+code=crypto_ad" clctx"543e*s="sref">crarss29" id=121700" cla12s="line" naarss29" id=12=ctx" class="sref">ct_basectx<543elass=href=cla11s="line" name="L864">2to/gcm.c#L7/a>_syuct href="+code=chi2d" ca22="L844"> 8411s=">114 href="crypto/gcm.c#L814" id=116700" cla11s="line" 6" id=119400" cla11s="line" name="L794"> 7911s=">1    a href="+code=crypto_a=cla11s="line" name="L864">2t="sref">er67" id=11s500" cla11s="li2e" na2e="L825"> 8211gspaw= hreef="crypto/gcm.c#L814" id=11s300" cla11s="line" name="L79    a href="+code=crypto_a==a href="+code=crypto_arruca>(/* ar 2crypto_gss=gthhreff="crypto/gcm.c#L86 cl_lin a href="+code= cl_lina11s="line" name="L7o/gcm.c#L814" id=116800" ccla11s="line" name="L864">2to_gcm_seta      8511s=">11s     f="cry2_ cl_taguc2 fh0f="+code=CRYPTO_M" cl2ss="s22="L798"> 7910s=">="line" name="L79    a href="+code=crypto_ao_aeadt 811^crypto/gcm.c#L8610s    ALG_TYPE_AEAD1700" cla12s="l10s    ALG_TYPE_AEADhrefefla11soss=hreffh4ff="c     a href="+code=crypto_ao_aeadtc=a href="+code=crypto_arruc7" id=112920" cla11s="line" name="L829"> 8211s=">11s     2sref">inst2/a>_ cl_taguct fh"+code=c2ild" 23="sref">crypto_gss=hrefff="crypn 8112s=">1211href="crcm_e=chnst)
9" icry_e=chnst)
9" icry_e=ch=ctx" class="sref">ct_basectx<543elass=href[1]ccla11s="line" name="L864">2so/gcm.c#L2instdata hre)f="crypto/gcm.c#L814" id=116700" cla11s="line" 6" id=119400" cla11s="line" name="L794"> 7911s=">rcm_e=chnst)
2stx-&g267" id=113300" cla11s="li2e" na2e="L833"> 8311gspaw= hreef="crypto/gcm.c#L814" id=11s300" cla11s="line" name="L7rcm_e=chnst)
parent2to/gcm.c#L267" id=113500" cla11s="li2e" na23"L775"> 7711s=">11s     f="cry2>113     <2 href="ss="string">a>(/* 2r *2to_gcm_setato_gsg pag=href="+code=ch2ld" c23ref">instsub_!12s=">1218    if (2t cl_taguc2err);
2to/gcm.c#L267" id=113900" cla11s="li2e" na24ref">inst_syuct , 0ff="cry2 " clatabl2href="+code=child" cpaylo2="sre2">crypto_apaylos= hre, 2ff="cr  a href="+code=crypto_aead" cl_ef">cpaw="sref">crypto_gcm_allo_ef">cpaw= href="+code=ctx" claspaw="sref">crypto_gspaw= hreef="+code=crypto_aead_ctx_ctx" class="sref">crypto2sref">inst2/a>_syuct href="+code=chi2d" ca2"sref">u8 *avuct fh8ff="cef="+codet864" id=121900" cla12s="line" namdet864" id=121"sref">crypto_gspaw=r  a href="+code=crypto_aead"code=CRYPTO_Msn="shreef="+code=crypto_aead_ctx_ctx" class="sref">crypto2so/gcm.c#L2syuct href="+code=child" 2av"sr2f">u8 *avuct e+ 8, 2ff="crypto/gcm.c#L814" id=116700" cla11s="line" name="Lgrab#L839" id=121200" cla12s="lgrab#L839"sref">crypto_gspaw=r  a href="+code=crypto_aead"code=CRYPTO_Msn="rcm_e=chnst)
crypto2stx-&g2?=0e:="+code=gcm_inst" cl2ss="s24"sref">crypto_a *cryptotruct t 81ef="+code=child" c    a href="+code=crypto_ao_aeadtc=tx_ctx" class="sref">crypto2so/gcm.c#L767" id=11s400" cla11s="li2e" na2e="L844"> 8411sub_sya href="crypto/gcm.c#L814" id=116800" cla11s="line" name="L868">2_gsg " cla2abl=href="+code=child" cf2>s="s24sy"sref">inst_syugotof="+code=child" outline" shreef="+code=cryptoutline" shre00" cla11s="line" name="L864">2crypto_gl"2s= hrehref="+code=child" 2ss=gt24"L796"> 7912L=">120     f="cryprypto_gl">2= hrehref="+code=child" c2ffse=2sref">instoffse= hreff="c    a href="+code=cry112c00" cla10s="line" name="L787"> e=cryp>inst)
 e=cryp>i"sref">crypto_gspaw=r  a href="+code=crypto_aead"tx_ctx" class="sref">crypto2s cl_taguc2, "+code=inst" clpaylos="2ref">2rypto_apaylos= hre, 0, 2ff="cry2to/gcm.c#L267" id=11s900" cla11s="li2e" na2e="L849"> 8411s=">11s href="crypto/gcm.c#L814" id=116700"rypto/gcm.c#L814" id=11L800" cla11L800ine" name="L799"> 7911L80>110      2f">ctx2>crypto_gss=hrefff="cryp>crypto_gb2s=uct ="+code=decrypt"a>(2les="2ref">crypto_tes=">113     ="crypto/gcm.We only support 16-byte bodeks." cla11s="line" name="L836"> 8311s=2="sref">cr2pto_gbas=uct ="+code=decr2pt"da25sref">crypto_gspaw= hreef="crypt    a href="+code=cry112c00" cla12L800ine" namea#L839" id=121200" cla1a e" name="L799"> 7910s=">10s    2"sref">cry2to_g" class=hreffh"+code=2RYPTO25"sref">crypto_a *inst)
iname="L799"> 7911L80>110      2fo/gcm.c#L7 hre, "+code=inst" cl"">s2ss="s2ef">keylens=ss= hre)f="cry2to/gcm.c#L267" id=115500" cla11s="li2e" na25="L835"> 8311s=">113     ="crypto/gcm.Not aL=">eamd811s60?" cla11s="line" name="L836"> 8311s=2=rypto_gl"2ref=a href="+code=crypto_2sub_s25ipher/plarefext */
e" nme="L799"> 7910s=">10s    2"ypto_gl">27" id=11s700" cla11s="lin2" nam25n="sref">crypto_gen=hgotof="+code=child" outldropyp>inst)
iname="L799"> 7911L80>110      2f cl_taguc287" id=11s800" cla11s="li2e" na25ypto_apaylos= hre, 0, 2ff="cry2">inst2ef">_synes= href="+code=c2x" cl26="L849"> 8411s=">11s href="crypto/gcm.c#L814" id=116700"rypto/gcm.c#L814"NAMETOOLONG a href="+code= NAMETOOLONGname="L799"> 7911L80>110      2o/gcm.c#L826" id=116800" cla11s="lin2" nam2="L860"> 8611sxt */
crypto_gspaw= hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#e=chnst)
 7911L80>110      2ocrypto_gb2" cla_syss=href="+code=ct2" cla26"sref">crypto_a *113     ==">ing">"s="sref(%s)"la11s="ef="+code=child" c   a href="+code=cry112c00" cla12L800ine" namea#e=chnst)
 7911L80>110      2o"sref">cr2<543eceqcrypto_gspaw= hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#driver#e=chnst)
 7911L80>110      2osref">cry2ynes= href="+code=ctx" cl2sub_s26"sref">crypto_a *ing">"s="sref(%s)"la11s="ef="+code=child" c   a href="+code=cry112c00" cla12L800ine" namea#driver#e=chnst)
 7911L80>110      2oo/gcm.c#L7     parent 7910s=">10s    2to/gcm.c#L264" id=11s500" cla11s="li2e" na26sy"sref">inst_syugotof="+code=child" outldropyp>inst)
iname="L799"> 7911L80>110      2c4106_ctx<243e*c410href="+code=ctx" 2la_sy26"L796"> 7912L=">120     f="crypencr_ef"> 2lass=href="+code=child" c2ub_sy26ref">instoffse= hreff="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#RYPTO_M_sy"sref">insR"a#RYPTO112c00" cla10s="line" 10s    ALG_TYPE_AEAD1700" cla12s="l10s    ALG_TYPE_AEADhref="L799"> 7911L80>110      2c cl_taguc28    crypto_a *memcp   a href="+code=cry112crehreffh"+code=CR"a#RYPTO_M_sy"sref">insR"a#RYPTO112c0|href="+code=crypto   a href="+code=cry112c00" cla12L800ine" namea#RYPTO_M_sy"sref">insR"a#RYPTO112c0la11soss=hreffh4ff="c10s    ALG_ASYNC1700" cla12s="l10s    ALG_ASYNChref="L799"> 7911L80>110      2          2          a href="+code=e2r" cl27="L849"> 8411s=">11s href="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#priorit7100" cla11s="liR"a#priorit7112c00" cla10s="line" o   a href="+code=cry112c00" cla12L800ine" namea#priorit7100" cla11s="liR"a#priorit7112c="L799"> 7911L80>110      2 /gcm.c#L8264" id=117800" cla11s="li2e" na2e="L870"> 8711s=">11s=href="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#bodeks      " n="L799"> 7911L80>110      2 crypto_gb2t href="+code=child" ccm.2#ss="27sref">u8 *avuct fh8ff="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1s=">119     c00" cla10s="line" o   a href="+code=cry112c00" cla12L800ine" namea#1s=">119     c="L799"> 7911L80>110      2 "sref">cr2lass=href="+code=inst" cl2ss="s27">u8 *avuct e+ 8, 2ff="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#d=121700" cla12s="linaL817"> 811=0la11s cla10s="line" name="Lniv"87">d=121700" cla12s="line" naniv"87">d=12f">c="L799"> 7911L80>110      2 sref">cry214" id=117300" cla11s="li2e" na27"L813"> 8112s=">121     f="cryp=117400" c2a11s="line" name="L774"> 2711s=27="L844"> 8411s=">114 href="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1839" id=121200" cla1a = 8="L799"> 7911L80>110      2 o/gcm.c#L24" id=117500" cla11s="lin2" nam27="L795"> 7911s=">119     ="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1839" id=121200" cla1a  8711maxline" naref">" n912L=">1203         7912L=">120     f="cryp">inst2ef">_synes= href="+code=c2x" cl27ref">instoffse= hreff="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#ctxs      " child" c*ctlass="sref">crypto_aeat>. 8112s=tx_ctx" class="sref">crypto2o/gcm.c#L826" id=117800" cla11s="lin2" nam27ypto_apaylos= hre, 0, 2ff="cry2c4106_ctx<243e*c410href="+code=ctx" 2la_sy28="L849"> 8411s=">11s href="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#7811    7811s=">118 x_ctx" class="sref">crypto2to/gcm.c#L267" id=118800" cla11s="li2e" na28="L870"> 8711s=">11s=href="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#912L    7912L=">1208 x_ctx" class="sref">crypto2tcrypto_gb2ef"> class=href="+code=ct2" cla28>child;
u8 *avuct e+ 8, 2ff="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1839" id=121200" cla1a crypto2tsref">cry287" id=118300" cla11s="li2e" na28f">crypto_inoss=hreffh4ff="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1839" id=121200" cla1a  8711setline" na112c00" cla10s="line" name="Lc#L844" setline" name="L872"> 8711s=">11sc#L844" setline" na208 x_ctx" class="sref">crypto2t117400" c2gcm_initss=hreff="+code=c2x" cl28="L844"> 8411s=">114 href="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1839" id=121200" cla1a  8511s=">11x_ctx" class="sref">crypto2to/gcm.c#L26" id=118500" cla11s="lin2" nam28="L795"> 7911s=">119     ="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1839" id=121200" cla1a  7811s=">00" cla10s="line" name="Lc#L844" id=11s700" cla11s="line" name="L777"> 7711s=">11x_ctx" class="sref">crypto2to/gcm.c#L2href="+code=child" c_e*ct2as="s28"L796"> 7912L=">120     f="crypinstance_c2x(instoffse= hreff="c hreef="+code=crypto_aead_c_and_cos="sref">memcp   a href="+code=cry112crehreffh"+code=CR"a#1839" id=121200" cla1a crypto_gen=gensrs=">00" =">113     ==">ing">"seqiv"la11s="x_ctx" class="sref">crypto2t/gcm.c#L82106_ss=e*s=href="+code=in2t" cl28ypto_apaylos= hre, 0, 2ff="cry2>crypto_ae2d *)
 7811s=">11s=href="crypto/gf (cryto/gcm.c#L264" id=119100" cla11s="li2e" na29>child;
inst)
iname:apaylos= hre, 0, 2ff="cry2>sref">cry2TRcrypto_inoss=hreffh4ff="ce" namedropyp839" id=121200" cla12s="ldropyp839"sref">crypto_gspaw=r  a href="+code=crypto_aead"tx_ctx" class="sref">crypto2ref">ERR_P2R(ER=href="+code=inst2 clas2="sref="+code=child" outline" shreef="+code=cryptoutline" shre00" :apaylos= hre, 0, 2ff="cry2>o/gcm.c#L214" id=11s500" cla11s="li2e" na2e="L795"> 7911s=">119     ="ckine"ef="+code=cryptkine""sref">crypto_gspaw= hreef="+code=crypto_aead_ctx_ctx" class="sref">crypto2ro/gcm.c#L2;
2to/gcm.c#L264" id=119700" cla11s="li2e" na2e="L797"> 7911gotof="+code=child" outnst)
2t/gcm.c#L82k" class=href="+code=chil2" cas2="sref>child;
parentinst_syuct , 0ff="cry3o_acm_init3tx"543eceqass="sref">cryp3o_rfc3106_ct7"> 7912L=">120 href="crypto/gcm.c#L868" iine"ef="+code=crypto/gcm.c#L868" iine"a11s=/a>_lg= href="crypto/gcm.c#L864" id=121800" cla12s="line" name="L818"> 8112s=">1218    if ( 7910s=">10s    3gcm_seta_e3">_syass=href="+code=inst3 clas3="srefref">crypto_gsbhreff="cryp3exitss=e*s3ak" class="sref">parentu8 *avuct e+ 8, 2ff="ca12s="ldropyd=121900" cla12s="line" namdropyd=121a11s="line" name="L7">crypto_gcm_allo_ef">cpaw= href="+code=ctx" claspaw="sref">crypto_gspaw= hreef="+code=crypto_aead_ctccla11s="line" name="L864">3      crypto_inoss=hreffh4ff="ckine"ef="+code=cryptkine""sref">crypto_gspaw= hreef="+code=crypto_aead_ctx_ctx" class="sref">crypto3to/gcm.c#L314" id=12L400" cla12L="li3e" na3011s      3912L=30"L775"> 7711s=">11s     f="cry3o/gcm.c#L834" id=12L600" cla12L="lin3" nam30="L776"> 771  truct instcry120 href="crypto/gcm.c#L868" itmplef="+code=crypto/gcm.c#L868" itmplypto_aeref">crypto_gsbhreff="cryp3e8gcm.c#L8344" id=119700" cla11s="li3e" na30="L797"> 7911"+code=err" clase=chnst)
113     ==">ing">"s="sref"la11s="eef">crypto_gsbhreff="cryp3e9gcm.c#L834" class=href="+code=chil3x" cl309"L797"> 7911"+code=err" clas+code=crypto_aead" c+codeto_i00" cla10s="line" name="Lc#L844" +code=crypto_aead" cl" class="sref">crypto_ieef">crypto_gsbhreff="cryp3o/gcm.c#L836" id=12L900" cla12L="lin3" nam3="L799"> 7912Lsya hrfh"+code=CRne"ef="+code=cryptine""sre00" cla10s="line" name="Lc#L844" ine"ef="+code=crypto/gcm.c#L868" iine"a11seef">crypto_gsbhreff="cryp3o_acm_init3106_ss=e*s=href="+code=in3t" cl311L799"> 7912Lsya hrfh"+code=Cmodu#L795" id=114500"modu#L"sre00" cla10s="line" THIS_MODULE1700" cla12s="lTHIS_MODULEa11seef">crypto_gsbhreff="cryp3ocm_seta_e364" id=121100" cla12s="li3e" na3e="L81}x_ctx" class="sref">crypto3f">ctx3> 7811s=">118     f="cry3o/gcm.c#L837" id=121300" cla12s="lin3" nam31="L783"> 7811s=">11s href="cryp_#7811    7910s=">10s    3to/gcm.c#L387" id=121400" cla12s="li3e" na31s="sref">crypto_gss=hreff="cryp3t="sref">e3r;rruct= href=="+code3ctx" 31="L825"> 8211gsub_sya hrf="crypto/gcm.c#L867" id=11s400" cla11s="line" name="L864">3o/gcm.c#L836" id=121600" cla12s="lin3" nam31"L796"> 7912L=">120     f="cry3to_gcm_set3_ct=_typ= href="+code=par3nt" a31ref">instoffse= hreff="c  f_zeroeO_M_sy"sref">ins  f_zeroeO"sre00" cla10s="line" kz+code=crypto_aead" ckz+codeto_in16_taguct fh"+code=GFP_KERNE11L800" cla11L80GFP_KERNE100" ccla11s="line" name="L864">3pto_instan3e * 7910s=">!12s=">1218    i  f_zeroeO_M_sy"sref">ins  f_zeroeO"sreme="L799"> 7910s=">10s    3 s="sref">38 *3 rypto_rfc3>crypto_gss=hrefff="cry3 o/gcm.c#L3a href="+code=child" ceas3="sre32sref">u8 *avuct fh8ff="crypto/gcm.c#L814" id=116700" cla11s="line" name="LregistergcemplaM_sy"sref">inst3to/gcm.c#L314" id=112200" cla11s="li3e" na32sref">crypto_gspaw= hreef="crypto/gcm.c#L814" id=116800" cla11s="line" name="L868">3ctx-&g3;crypto_ino7"> 7911gotof="+code=child" outnst)
3to/gcm.c#L3/a>_syuct href="+code=chi3d" ca32f">keylens=ss= hre)f="cry3t="sref">e367" id=11s500" cla11s="li3e" na32="L795"> 7911s=">119     ="crypto/gcm.c#L814" id=116700" cla11s="line" name="LregistergcemplaM_sy"sref">inst3t/gcm.c#L83="string">a>(/* ar 3crypto_gspaw= hreef="crypto/gcm.c#L814" id=116800" cla11s="line" name="L868">3co_gcm_set3     crypto_gen=hgotof="+code=child" outlundo_         return <<3tto_instan3 fh0f="+code=CRYPTO_M" cl3ss="s32ypto_apaylos= hre, 0, 2ff="cry37" id=112930" cla11s="line" name="L839"> 833="L849"> 8411s=">11s href="crypto/gcm.c#L814" id=116700" cla11s="line" name="LregistergcemplaM_sy"sref">inst3sref">inst3/a>_ cl_taguct fh"+code=c3ild" 33"L860"> 8611sxt */
3ncrypto_a *3so/gcm.c#L3 7811s=">118     f="cry3stx-&g367" id=113300" cla11s="li3e" na33f">crypto_inoss=hreffh4ff="crypto/gcm.c#L814" id=116700" cla11s="line" name="LregistergcemplaM_sy"sref">inst3so/gcm.c#L3uct fh"+code=child" c" cl3ss="s33sref">parent3n="sref">e367" id=113500" cla11s="li3e" na33sy"sref">inst_syugotof="+code=child" outlundo_#L86106     return <<3s/gcm.c#L83 href="ss="string">a>(/* 33"L796"> 7912L=">120     f="cry3to_gcm_set3to_gsg pag=href="+code=ch3ld" c33ref">instL=">12L href="crypto/gcm.c#L795" i3t cl_taguc3crypto_apaylos= hre, 2ff="co/gcm.cunregistergcemplaM_sy"sref">inst3sref">inst3/a>_syuct href="+code=chi3d" ca3"sref"="+code=child" outlundo_="L     return <<u8 *avuct e+ 8, 2ff="co/gcm.cunregistergcemplaM_sy"sref">inst3stx-&g3?=0e:="+code=gcm_inst" cl3ss="s34"sref="+code=child" outlundo_         return << 8411ct e+ 8, 2ff="co/gcm.cunregistergcemplaM_sy"sref">inst3_gsg " cla3abl=href="+code=child" cf3>s="s34sy"sr="+code=child" outnst)
crypto_gspaw=  f_zeroeO_M_sy"sref">ins  f_zeroeO"sremcla11s="line" name="L864">3_o_gcm_set3= hrehref="+code=child" c3ffse=34ref">instL=">12L_sya hrf="crypto/gcm.c#L867" id=11s400" cla11s="line" name="L864">3s cl_taguc3, "+code=inst" clpaylos="3ref">34"sref>child;
inst_syuct , 0ff="cry3f">ctx3> 7912L=">120 href="crypt_#912L    7910s=">10s    3>crypto_gb3s=uct ="+code=decrypt"a>(3les="35"srefref">crypto_gsbhreff="cryp3="sref">cr3pto_gbas=uct ="+code=decr3pt"da35">u8 *avuct e+ 8, 2ff="ckine"ef="+code=cryptkine""sref">crypto_gspaw=  f_zeroeO_M_sy"sref">ins  f_zeroeO"sremcla11s="line" name="L864">3"sref">cry3to_g" class=hreffh"+code=3RYPTO35f">crypto_inoss=hreffh4ff="ce" nameunregistergcemplaM_sy"sref">inst3fo/gcm.c#L3 hre, "+code=inst" cl"">s3ss="s35="L844"> 8411ct e+ 8, 2ff="co/gcm.cunregistergcemplaM_sy"sref">inst3to/gcm.c#L367" id=115500" cla11s="li3e" na35="L795"> 7911s=">119     ="cr/gcm.cunregistergcemplaM_sy"sref">inst3=rypto_gl"3ref=a href="+code=crypto_3sub_s35 *inst3"ypto_gl">37" id=11s700" cla11s="lin3" nam35n="sr>child;
inst3ef">_synes= href="+code=c3x" cl36="sre="+code=child" modu#L#7811   3o/gcm.c#L836" id=116800" cla11s="lin3" nam3="L860="+code=child" modu#L#912L   3ocrypto_gb3" cla_syss=href="+code=ct3" cla36>child;
cr3<543eceqing">"GPL"la11s="ccla11s="line" name="L864">3osref">cry3ynes= href="+code=ctx" cl3sub_s36"sref="+code=child" MODULE_DESCRIPTIO cla12L="line" nMODULE_DESCRIPTIO "sref =">113     ==">ing">"Galois/Counter Mld""la11s="ccla11s="line" name="L864">3oo/gcm.c#L3     ing">"Mikko H1s4anen <mh1@iki.fiand_"la11s="ccla11s="line" name="L864">3oo/gcm.c#L364" id=11s500" cla11s="li3e" na36sy"sr="+code=child" MODULE_ALIAS a href="+code=MODULE_ALIAS"sref =">113     ==">ing">"  f_<<<<"la11s="ccla11s="line" name="L864">3orypto_gl"343e*c410href="+code=ctx" 3la_sy36"L796="+code=child" MODULE_ALIAS a href="+code=MODULE_ALIAS"sref =">113     ==">ing">"#L86106"la11s="ccla11s="line" name="L864">3oypto_gl">3lass=href="+code=child" c3ub_sy36ref">="+code=child" MODULE_ALIAS a href="+code=MODULE_ALIAS"sref =">113     ==">ing">"#L86ref"la11s="ccla11s="line" name="L864">3o cl_taguc38    


The original LXR software by the a11s="linhttp://sourceforge.net/projects/lxr">LXR "cryunit7112c, this experiyptoal version by a11s="linmailto:lxr@f=rux.no">lxr@f=rux.no112c.
lxr.f=rux.no kindly hosted by a11s="linhttp://www.redpill-f=rpro.no">Redpill L=rpro AS"sre, provider of L=rux/to_aulting and oper> 7o_a servicea since 1995.