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        u8 assocbuf[32];
  48        struct scatterlist cipher[1];
  49        struct scatterlist payload[2];
  50        struct scatterlist assoc[2];
  51        struct aead_request subreq;
  52};
  53
  54struct crypto_gcm_ghash_ctx {
  55        unsigned int cryptlen;
  56        struct scatterlist *src;
  57        void (*complete)(struct aead_request *req, int err);
  58};
  59
  60struct crypto_gcm_req_priv_ctx {
  61        u8 auth_tag[16];
  62        u8 iauth_tag[16];
  63        struct scatterlist src[2];
  64        struct scatterlist dst[2];
  65        struct crypto_gcm_ghash_ctx ghash_ctx;
  66        union {
  67                struct ahash_request ahreq;
  68                struct ablkcipher_request abreq;
  69        } u;
  70};
  71
  72struct crypto_gcm_setkey_result {
  73        int err;
  74        struct completion completion;
  75};
  76
  77static void *gcm_zeroes;
  78
  79static inline struct crypto_gcm_req_priv_ctx *crypto_gcm_reqctx(
  80        struct aead_request *req)
  81{
  82        unsigned long align = crypto_aead_alignmask(crypto_aead_reqtfm(req));
  83
  84        return (void *)PTR_ALIGN((u8 *)aead_request_ctx(req), align + 1);
  85}
  86
  87static void crypto_gcm_setkey_done(struct crypto_async_request *req, int err)
  88{
  89        struct crypto_gcm_setkey_result *result = req->data;
  90
  91        if (err == -EINPROGRESS)
  92                return;
  93
  94        result->err = err;
  95        complete(&result->completion);
  96}
  97
  98static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key,
  99                             unsigned int keylen)
 100{
 101        struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead);
 102        struct crypto_ahash *ghash = ctx->ghash;
 103        struct crypto_ablkcipher *ctr = ctx->ctr;
 104        struct {
 105                be128 hash;
 106                u8 iv[8];
 107
 108                struct crypto_gcm_setkey_result result;
 109
 110                struct scatterlist sg[1];
 111                struct ablkcipher_request req;
 112        } *data;
 113        int err;
 114
 115        crypto_ablkcipher_clear_flags(ctr, CRYPTO_TFM_REQ_MASK);
 116        crypto_ablkcipher_set_flags(ctr, crypto_aead_get_flags(aead) &
 117                                   CRYPTO_TFM_REQ_MASK);
 118
 119        err = crypto_ablkcipher_setkey(ctr, key, keylen);
 120        if (err)
 121                return err;
 122
 123        crypto_aead_set_flags(aead, crypto_ablkcipher_get_flags(ctr) &
 124                                       CRYPTO_TFM_RES_MASK);
 125
 126        data = kzalloc(sizeof(*data) + crypto_ablkcipher_reqsize(ctr),
 127                       GFP_KERNEL);
 128        if (!data)
 129                return -ENOMEM;
 130
 131        init_completion(&data->result.completion);
 132        sg_init_one(data->sg, &data->hash, sizeof(data->hash));
 133        ablkcipher_request_set_tfm(&data->req, ctr);
 134        ablkcipher_request_set_callback(&data->req, CRYPTO_TFM_REQ_MAY_SLEEP |
 135                                                    CRYPTO_TFM_REQ_MAY_BACKLOG,
 136                                        crypto_gcm_setkey_done,
 137                                        &data->result);
 138        ablkcipher_request_set_crypt(&data->req, data->sg, data->sg,
 139                                     sizeof(data->hash), data->iv);
 140
 141        err = crypto_ablkcipher_encrypt(&data->req);
 142        if (err == -EINPROGRESS || err == -EBUSY) {
 143                err = wait_for_completion_interruptible(
 144                        &data->result.completion);
 145                if (!err)
 146                        err = data->result.err;
 147        }
 148
 149        if (err)
 150                goto out;
 151
 152        crypto_ahash_clear_flags(ghash, CRYPTO_TFM_REQ_MASK);
 153        crypto_ahash_set_flags(ghash, crypto_aead_get_flags(aead) &
 154                               CRYPTO_TFM_REQ_MASK);
 155        err = crypto_ahash_setkey(ghash, (u8 *)&data->hash, sizeof(be128));
 156        crypto_aead_set_flags(aead, crypto_ahash_get_flags(ghash) &
 157                              CRYPTO_TFM_RES_MASK);
 158
 159out:
 160        kfree(data);
 161        return err;
 162}
 163
 164static int crypto_gcm_setauthsize(struct crypto_aead *tfm,
 165                                  unsigned int authsize)
 166{
 167        switch (authsize) {
 168        case 4:
 169        case 8:
 170        case 12:
 171        case 13:
 172        case 14:
 173        case 15:
 174        case 16:
 175                break;
 176        default:
 177                return -EINVAL;
 178        }
 179
 180        return 0;
 181}
 182
 183static void crypto_gcm_init_crypt(struct ablkcipher_request *ablk_req,
 184                                  struct aead_request *req,
 185                                  unsigned int cryptlen)
 186{
 187        struct crypto_aead *aead = crypto_aead_reqtfm(req);
 188        struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead);
 189        struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
 190        struct scatterlist *dst;
 191        __be32 counter = cpu_to_be32(1);
 192
 193        memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag));
 194        memcpy(req->iv + 12, &counter, 4);
 195
 196        sg_init_table(pctx->src, 2);
 197        sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag));
 198        scatterwalk_sg_chain(pctx->src, 2, req->src);
 199
 200        dst = pctx->src;
 201        if (req->src != req->dst) {
 202                sg_init_table(pctx->dst, 2);
 203                sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag));
 204                scatterwalk_sg_chain(pctx->dst, 2, req->dst);
 205                dst = pctx->dst;
 206        }
 207
 208        ablkcipher_request_set_tfm(ablk_req, ctx->ctr);
 209        ablkcipher_request_set_crypt(ablk_req, pctx->src, dst,
 210                                     cryptlen + sizeof(pctx->auth_tag),
 211                                     req->iv);
 212}
 213
 214static inline unsigned int gcm_remain(unsigned int len)
 215{
 216        len &= 0xfU;
 217        return len ? 16 - len : 0;
 218}
 219
 220static void gcm_hash_len_done(struct crypto_async_request *areq, int err);
 221static void gcm_hash_final_done(struct crypto_async_request *areq, int err);
 222
 223static int gcm_hash_update(struct aead_request *req,
 224                           struct crypto_gcm_req_priv_ctx *pctx,
 225                           crypto_completion_t complete,
 226                           struct scatterlist *src,
 227                           unsigned int len)
 228{
 229        struct ahash_request *ahreq = &pctx->u.ahreq;
 230
 231        ahash_request_set_callback(ahreq, aead_request_flags(req),
 232                                   complete, req);
 233        ahash_request_set_crypt(ahreq, src, NULL, len);
 234
 235        return crypto_ahash_update(ahreq);
 236}
 237
 238static int gcm_o4m.c#L170" id="L170" class="line" name="L170"> 170        case 12:
 171        case 13:
        complete, 2                   sizeof(crypto_gcm_req_priv_ctx *pctx,
 140
len 141        crypto_completion_t complete,
 142        if 2 143           2    <2 href="+code=eash_request" class="sref">ahash_request *ahreq = &pctx->u.ahreq;
 144           2     24m.c#L235" id="L235" class="line" name="2145"> 145           2    i24ode=err" class="sref">errahash_request_set_callback(ahreq, aead_request_flags(req),
 146           2     2      , req);
 147        }
<2 href24ode=sg_set_buf" class="sref">sgg_init_one(data->src, dst;
req)4m.c#L170" id="L170line" name#L233" id="L233" class="line" name="L148"> 148
ahash_request_set_crypt(ahreq, src->src, dst, len)4m.c#L170" id="L170line" name#L233" id="L233" class="line   149        if 2 150           2    g25a href="crypto/gcm.cash_update" class="sref">crypto_ahash_update(ahreq);
 151
 152         153        gcm>);
gcm>);name="L170"> 170        case 12:
 171        case 13:
     e" name="2154"> 154           2     2             crypto_gcm_req_priv_ctx *pctx,
 155         156        ahash_request *ahreq = &pctx->u.ahreq;
 157           2     25ref="+code=crypto_aead" class="sref">crypt hreghref="gcm_req_priv_ctx *ahreg"gcm_req_priv_ctxpctx->u. 158
hash<>);gthes;
);gtheeq" L230" id="L216" class="line   159 160        kfre>);gthes;
);gtheeq" lass="sref">ahreq;
 164req),
aussoc>);
 161        ret2rn );gthes;
);gtheeq" lass="sref">ahrebs;
 164reqctryptlen + sizeof( 162}
req->u.),
pctx<>);gthes;
);gtheeq" , 16#L236" id="L236" class="line" name="2163"> 163
sgg_init_one(data->src, dst->u.),
 164static int 2a hre26ode=ablkcipher_request_set_cak" class="sref">ahash_request_set_callback(ahreq, aead_request_flags(req),
 165           2     2                unsigned int gcm_hash_len_done(struct req);
 166{
lenahash_request_set_crypt(ahreq, src->src,  167        swi2ch (<26                     &dst, pctx<>);gthes;
);gtheeq" c#L204" id="L204" class="line" name="2168"> 168        cas2 4:
<26m.c#L159" id="L159" class="li2e" name="2169"> 169        cas2 8:
<2 href="crypto/o/gcm.cash_update" class="sref">crypto_ahash_update(ahreq);
 170        cas2 12:
2a hrefL182" id="L182" class="li2e" name="2171"> 171        cas2 13:
27m.c#L152" id="L152" class="li2e" name="2172"> 172        cas2 14:
2a hrefe=gcm_hash_update" class="sref">gcm hreflen_done(struct  170        case 12:
 171        case 13:
     e" name="2173"> 173        cas2 15:
27href="+code=sg_set_buuuuuuuuuuuypto_gcm_req_priv_ctx" class="sref">crypto_gcm_req_priv_ctx *pctx,
 174        cas2 16:
2a hrefL216" id="L216" class="line" name="2175"> 175           2    b2eak;
ahash_request *ahreq = &pctx->u.ahreq;
 176        def2ult:
2a href230" id="L216" class="line" name="2177"> 177           2    r27ode=sg_set_buf" class="sref"ak" class="sref">ahash_request_set_callback(ahreq, aead_request_flags(req),
 178        }
<2 href2"crypto/gcm.c#  unsigned int g>gcm_hash_final_done(struct req);
 179
ahash_request_set_crypt(ahreq, src, len->u.),
 180        ret2rn 0;28m.c#L231" id="L231" class="line" name="2181"> 181}
errahreq);
 182
 183static void2 184           2     28de=inline" chash_final_done" cla__="sref">g>gcm_hash_final_done(__="sref">g>gcm_hash_name="L170"> 170        case 12:
 171      class="sref">err);
 185           2     28cm.c#L216" id="L216" class="line" name="2186"> 186{
crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 187        str2ct crypt hreghref="gcm_req_priv_ctx *ahreg"gcm_req_priv_ctxpctx->u. 188        str2ct  189        str2ct err)
 190        str2ct cryptxo;
data->src, sizeof(dst->u.),
 191         192
ctrmplete, req);
dst);
 193         194         195
gcm_hash_final_done(struct crypto_async_request *areq, int err);
 196         197         171    _gcm_reqctx" class/a>, int dsta>);
 198         199
g>gcm_hash_final_done(__="sref">g>gcm_hash_name=s="sref">req);
dst);
 200         201        if 3 202           3    <302.c#Lde=gcm_hash_final_done" cla__="sref">gcm_hash_len_done(st__="sref">gcm_hash_name="L170"> 170        case 12:
 171      class="sref">err);
 203           3    <3 href=L187" id="L187" class="li3e" name="3204"> 204           3    <3 href="+code=sash_request" class="sr class="sref">crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 195
 206        }
<3 href3"crypto/gcm.c#classs="sref">err)
 207
err)
gcm hreflen_done(struct req);
dst,
 198        err == -EINPROGRESS || err == -EBUSY) {
 199
 210           3     3              L182" id="L182" class="li3e" name="3211"> 211           3     31m.c#L152" id="L152" class="li3e" name="3212"> 212}
g>gcm_hash_final_done(__="sref">g>gcm_hash_name=s="sref">req);
dst);
 213
 214static  215{
(struct crypto_async_request *areq, int err);
 216         217        ret3rn  171    _gcm_reqctx" class/a>, int dsta>);
 218}
 219
gcm_hash_len_done(st__="sref">gcm_hash_name=s="sref">req);
dst);
 220static void3 221static void3 222
g152" "line" hash_len_done(st__="sref">g152" "line" hash_name="L170"> 170        case 12:
 171      class="sref">err);
 223static int 3a hre32href=L187" id="L187" class="li3e" name="3224"> 224           3     32href="+code=sash_request" class="sr class="sref">crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 225           3     32m.c#L196" id="L196" class="li3e" name="3226"> 226           3     32crypto/gcm.c#classs="sref">err)
 227           3     3         unsigned int s="sref">err)
gcm>);
gcm>);name=s="sref">req);
dst,
 228{
err == -EINPROGRESS || err == -EBUSY) {
 229        str3ct  230
 231         232           3     33ode=crypto_ahash_clear_flags__="sref">gcm_hash_len_done(st__="sref">gcm_hash_name=s="sref">req);
dst);
 233         234
 235        ret3rn (st="sref">g152" "line" hash_name="L170"> 170       ass="sref">crypto_async_request *areq, int  236}
err);
 237
 238static int 3a hre33ref="+code=crypto_gcm_ctx" class="s case 12:
 171    _gcm_reqctx" class/a>, int dsta>);
 140
kfre__="sref">g152" "line" hash_len_done(st__="sref">g152" "line" hash_name=s="sref">req);
dst);
 141         142        if 3 143           3    <34="+code=crypto_gcm_init_crypt" c__="sref">g152" "ash_len_done(st__="sref">g152" "ash_name="L170"> 170        case 12:
 171      class="sref">err);
 144           3     34 hrefL216" id="L216" class="li3e" name="3145"> 145           3    i34ak;
crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 146           3     34ode=crypto_aeash_request" class="sr class="sreghref="gcm_req_priv_ctx *ahreg"gcm_req_priv_ctxpctx->u. 147        }
<3 href34ode=sg_set_buode=len" class="sref">len 148
 149        if 3err)
 150           3    g35                  (unsigned int ahreg"gcm_req_priv_ctxctryptlen + sizeof( 151
ctr + sizeof(err)4m.c#L170" id="L170line" name#L233" id="L233" class="li3e" name="3152"> 152        gcm_o4m.c#L170" id="L170" class="line" name=s="sref">req);
dst,
len)4m.c#L170" id="L170line" name"235" id="L235" class="li3e" name="3153"> 153        (st="sref">g152" "line" hash_name#L233" id="L233" class="li3e" name="3154"> 154           3     3             err == -EINPROGRESS || err == -EBUSY) {
 155         156         157           3     35m.c#L238" id="L238" class="li3e" name="3158"> 158
g152" "line" hash_len_done(st__="sref">g152" "line" hash_name=s="sref">req);
dst);
 159 160         161        ret3rn (st="sref">g152" "ash_name="L170"> 170       ass="sref">crypto_async_request *areq, int err);
 162}
 163
 171    _gcm_reqctx" class/a>, int dsta>);
 164static int 3a hre36m.c#L235" id="L235" class="li3e" name="3165"> 165           3     3              m_init_crypt" c__="sref">g152" "ash_len_done(st__="sref">g152" "ash_name=s="sref">req);
dst);
 166{
 167        swi3ch (<36m.c#L238" id="L238" class="li3e" name="3168"> 168        cas3 4:
<368"+code=gcm_hash_final_done" cla__="sref">gassoc"line" hash_len_done(st__="sref">gassoc"line" hash_name="L170"> 170        case 12:
 171      class="sref">err);
 169        cas3 8:
<3 href=L229" id="L229" class="li3e" name="3170"> 170        cas3 12:
370ref="+code=eash_request" class="sr class="sref">crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 171        cas3 13:
371ref="+code=eash_request" class="sr class="sreghref="gcm_req_priv_ctx *ahreg"gcm_req_priv_ctxpctx->u. 172        cas3 14:
37ode=crypto_ahash_clear_flags/a> *crypto_completion_t complete,
 173        cas3 15:
37href="+code=sode=len" class="sref">len 174        cas3 16:
37m.c#L235" id="L235" class="li3e" name="3175"> 175           3    b3eak;
err)
ctryptlen + sizeof( 176        def3ult:
37     (unsigned int ahreg"gcm_req_priv_ctxctryptlen + sizeof( 177           3    r37        unsigned int s="sref">err,
(st="sref">g152" "ash_name :187" id="L187" class="li3e" name="3178"> 178        }
<3 href3"crypto/gcm.c#  unsigned int (st="sref">g152" "line" hash_nameL187" id="L187" class="li3e" name="3179"> 179
gcm_hash_update(struct req);
dst,
len,
 180        ret3rn 0;38                  ctr, dstctryptlen + sizeof( 181}
err == -EINPROGRESS || err == -EBUSY) {
 182
 183static void3 184           3     38m.c#L235" id="L235" class="li3e" name="3185"> 185           3     38ak;
err)4m.c#L170" id="L170line" name#235" id="L235" class="li3e" name="3186"> 186{
g152" "ash_len_done(st__="sref">g152" "ash_name=s="sref">req);
dst);
 187        str3ct  188        str3ct g152" "line" hash_len_done(st__="sref">g152" "line" hash_name=s="sref">req);
dst);
 189        str3ct  190        str3ct  191        (st="sref">gassoc"line" hash_name="L170"> 170       ass="sref">crypto_async_request *areq, int  192
err);
 193         194         171    _gcm_reqctx" class/a>, int dsta>);
 195
 196        lengassoc"line" hash_len_done(st__="sref">gassoc"line" hash_name=s="sref">req);
dst);
 197         198         199
gassoc"ash_len_done(st__="sref">gassoc"ash_name="L170"> 170        case 12:
 171      class="sref">err);
 200         201        if 4crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 202           4    <40             ode=len" class="sref">len 203           4    <40m.c#L214" id="L214" class="li4e" name="4204"> 204           4    <4 href="+code=sclasss="sref">err)
 195
(unsigned int ahre>);
aussoc>);
 196        err)4m.c#L170" id="L170line" name#L233" id="L233" class="li4e" name="4207"> 207
err)
gcm_o4m.c#L170" id="L170" class="line" name=s="sref">req);
dst,
len)4m.c#L170" id="L170line" name"235" id="L235" class="li4e8 name="4298"> 198        (st="sref">gassoc"line" hash_name#L233" id="L233" class="li4e9 name="4299"> 199
err == -EINPROGRESS || err == -EBUSY) {
 210           4     41                   211           4     411ref="+code=eL207" id="L207" class="li4e" name="4212"> 212}
 213
gassoc"line" hash_len_done(st__="sref">gassoc"line" hash_name=s="sref">req);
dst);
 214static  215{
 216        (st="sref">gassoc"ash_name="L170"> 170       ass="sref">crypto_async_request *areq, int err);
 217        ret4rn  218}
 171    _gcm_reqctx" class/a>, int dsta>);
 219
 220static void4kfre__="sref">gassoc"ash_len_done(st__="sref">gassoc"ash_name=s="sref">req);
dst);
 221static void4 222
 223static int 4a hre42="+code=crypto_gcm_init_crypt" c__="sref">gode=dash_len_done(st__="sref">gode=dash_name="L170"> 170        case 12:
 171      class="sref">err);
 224           4     42 hrefL216" id="L216" class="li4e" name="4225"> 225           4     42ak;
crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 226           4     42ode=len" class="sref">len *crypto_completion_t complete,
 227           4     42ode=sg_set_buode=len" class="sref">len 228{
 229        str4ct err)
);
aussoc>);
 230
(unsigned int ahre>);
aussoc>);
 231        ctr,
(st="sref">gassoc"ash_name :187" id="L187" class="li4e" name="4232"> 232           4     43                (st="sref">gassoc"line" hash_nameL187" id="L187" class="li4e" name="4233"> 233        err)
gcm_hash_update(struct req);
dst,
len,
 234
);
aussoc
len);
aussoc>);
 235        ret4rn err == -EINPROGRESS || err == -EBUSY) {
 236}
 237
 238static int 4a hre43m.c#L159" id="L159" class="li4   complete4/a>, 43="+code=err" class="sref">err)4m.c#L170" id="L170line" name#159" id="L159" class="li4e" name="4140"> 140
gassoc"ash_len_done(st__="sref">gassoc"ash_name=s="sref">req);
dst);
 141         142        if 4gassoc"line" hash_len_done(st__="sref">gassoc"line" hash_name=s="sref">req);
dst);
 143           4    <44ode=mL213" id="L213" class="li4e" name="4144"> 144           4     44m.c#L235" id="L235" class="li4e" name="4145"> 145           4    i44m.c#Lde=gcm_hash_final_done" class="sref"ode=dash_len_done(st="sref">gode=dash_name="L170"> 170       ass="sref">crypto_async_request *areq, int err);
 146           4     44cm.c#L187" id="L187" class="li4e" name="4147"> 147        }
<4 href44ref="+code=crypto_aead" class="sref case 12:
 171    _gcm_reqctx" class/a>, int dsta>);
 148
 149        if 4gode=dash_len_done(st__="sref">gode=dash_name=s="sref">req);
dst);
 150           4    g45 hrefL182" id="L182" class="li4e" name="4151"> 151
 152        gclen_done(st="sref">name="L170"> 170        case 12:
 171     152" id="L152" class="li4e" name="4153"> 153        crypto_gcm_req_priv_ctx *pctx,
 154           4     45 hrefL216" id="L216" class="li4e" name="4155"> 155        ahash_request *ahreq = &pctx->u.ahreq;
 156        ahreg"gcm_req_priv_ctxpctx->u. 157           4     45ref="+code=crypto_aead" class="sref">crypt hre"gcm_req_priv_ctx *ahre"gcm_req_priv_ctx *ahre>);
abas_len_done(stbas_q" class="sref">ahretfrlen_done(sttfrcm.c#L222" id="L222" class="li4e" name="4158"> 158
len 159crypto_completion_t complete,
 160        err);
 161        ret4rn  162}
(st/a>(ahreq, srcu. 163
 164static int 4a hre464de=crypto_ahash_clear_flags/a>(ahreq, srcreq);
 165           4     46               unsignnnnnnnnnnnnnnnnnnnnfinal_done" class="sref"ode=dash_len_done(st="sref">gode=dash_nameass="sref">len);
 166{
len)
gode=ync_request *gode=f="+cass="sref">ahreq,  167        swi4ch (<46ref="+code=crclass="sref">err == - 168        cas4 4:
<46crypto/gcm.c#  unsignr" class="sref">err);
 169        cas4 8:
<46ode=ablkcipher_request_set_c_o4m.c#L170" id="L170line" name_gcm_reqctx" classsref_remain(unsigned int ahre>);
aussoc>);
 170        cas4 12:
47ode=kfree" class="sref">kfreomplete,
(st="sref">gassoc"ash_name :dfinal_done" class="sref"assoc"line" hash_len_done(st="sref">gassoc"line" hash_nameL187" id="L187" class="li4e" name="4171"> 171        cas4 13:
471ref="+code=es="sref">err)
gcm_hash_update(struct req);
dst,
len,
);
aussoc
len);
aussoc>);
 172        cas4 14:
47ode=crypto_ahclass="sref">err == - 173        cas4 15:
47href="+code=sg_set_bur" class="sref">err);
 174        cas4 16:
47href="+code=sclass="sref">err)4m.c#L170" id="L170line" name##L202" id="L202" class="li4e" name="4175"> 175           4    b47               unsignad" class="sref>)
gcm_o4m.c#L170" id="L170" class="line" name=s="sref">req);
dst,
len)4m.c#L170" id="L170line" name"235" id="L235" class="li4e" name="4176"> 176        def4ult:
47     (st="sref">gassoc"line" hash_name#L187" id="L187" class="li4e" name="4177"> 177           4    r47        unsigned int class="sref">err == - 178        }
<4 href4"crypto/gcm.c#  unsigned int err);
 179
 180        ret4rn 0;48ode=kfree" class="sref">kfre_o4m.c#L170" id="L170line" name_gcm_reqctx" classsref_remain(unsigned int ahreg"gcm_req_priv_ctxctryptlen + sizeof( 181}
err,
(st="sref">g152" "ash_name :(st="sref">g152" "line" hash_nameL187" id="L187" class="li4e" name="4182"> 182
gcm_hash_update(struct req);
dst,
len,
ctr, dstctryptlen + sizeof( 183static void4err == - 184           4     48            err);
 185           4     48ak;
err)4m.c#L170" id="L170line" name##L202" id="L202" class="li4e" name="4186"> 186{
gcm_o4m.c#L170" id="L170" class="line" name=s="sref">req);
dst,
len)4m.c#L170" id="L170line" name"235" id="L235" class="li4e" name="4187"> 187        str4ct (st="sref">g152" "line" hash_name#L187" id="L187" class="li4e" name="4188"> 188        str4ct err == - 189        str4ct err);
 190        str4ct  191        err)
gcm>);
gcm>);name=s="sref">req);
dst,
 192
err == - 193        err);
 194        gcmfinal
gcmfinalname=s="sref">req);
dst,
 195
err == - 196        err);
 197         198         199
 200         201        if 5gclen_done(st="srenc_copyf">gcname="L170"> 170        case 12:
 171     152" id="L152" class="li5e" name="5202"> 202           5    <50href="+code=sg_init_tttttttttttttttash_request" class="sr class="sref">crypto_gcm_req_priv_ctx *pctx,
 203           5    <50href=L187" id="L187" class="li5e" name="5204"> 204           5    <50href="+code=sash_request" class="sr * *pctxem.cx" clgcm_reqctx" class *(st *req);
 195
reqpctxeuth_tagx" clgcm_reqctx" class/a>->u.euth_tagx" cL218" id="L218" class="li5e6 name="5296"> 196         197        ctrcatterwalk_map_and_copyahrequth_tagync_requesteuth_tagx" cass="sref">len);
adlen);
a>yptlen + sizeof( 198        ,
ahreqm.cync_requestem.cx" c), 1#L218" id="L218" class="li5e9 name="5299"> 199
 210           5     51m.c#L231" id="L231" class="li5e" name="5211"> 211           5     51="+code=gcm_hash_final_done" class="enc_">gcmash_len_done(st="srenc_">gcmash_name="L170"> 170        case 12:
 171      class="sref">err);
 212}
 213
crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 214static  215{
err)
 216        gclen_done(st="srenc_copyf">gcname=s="sref">req);
dst,
 217        ret5rn  218}
        case 12:
,
req);
dst);
 219
 220static void5 221static void5(st="srenc52" "ash_name="L170"> 170       ass="sref">crypto_async_request *areq, int err);
 222
 223static int 5a hre52href="+code=eash_request" class="srecase 12:
 171    _gcm_reqctx" class/a>, int dsta>);
 224           5     52href="+code=sash_request" class="sr *crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 225           5     52m.c#L196" id="L196" class="li5e" name="5226"> 226           5     52ode=len" clasclasss="sref">err)
 227           5     52                     s="sref">err)
gc
gcname=s="sref">req);
dst,
 228{
err == -EINPROGRESS || err == -EBUSY) {
 229        str5ct  230
err)
 231        errreq->u.euth_tagx" cpcs="sref">dst,
u.ieuth_tagx" cpc16LL190" id="L190" class="li5e" name="5232"> 232           5     53                gclen_done(st="srenc_copyf">gcname=s="sref">req);
dst,
 233         234
 235        ret5rn  236}
len,
req);
dst);
 237
 238static int 5a hre53m.c#L159" id="L159" class="li5   complete5/a>, 53ode=ade=gcm_class="sref">err( 170        case 12:
 171    c190" id="L190" class="li5e" name="5140"> 140
 141        crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 142        if 5 170        blkciphere 12:
areq, int pctx->u.ahreqba>, int  143           5    <54href="+code=eash_request" class="sr class="sreghref="gcm_req_priv_ctx *ahreg"gcm_req_priv_ctxpctx->u. 144           5     54href="+code=sclass="sref">err);
 145           5    i54m.c#L196" id="L196" class="li5e" name="5146"> 146           5     54ode=len" class="sref">len *(ahreqba>, int len);
len);
a>yptlen + sizeof( 147        }
<5 href54             s="sref">ctr(st/blkciphere 12:
ahreqba>, int lenreq);
 148
(st="srenc52" "ash_nameass="sref">len);
 149        if 5 150           5    g55ode=kfree" class="sref">kfreg"gcm_req_priv_ctxctr, ad 151
errctryptlen + sizeof(a>yptlen + sizeof( 152        ctrmplete,
gcmash_len_done(st="srenc_">gcmash_nameL222" id="L222" class="li5e" name="5153"> 153         154           5     554de=crypto_ahash_clear_flags>)
(ahreqba>, int  155        err == - 156        err);
 157           5     55m.c#L238" id="L238" class="li5e" name="5158"> 158
       >)
gc
gcname=s="sref">req);
dst,
 159err == - 160        err);
 161        ret5rn  162}
req->u.euth_tagx" cpcs="sref">dst,
u.ieuth_tagx" cpc16LL190" id="L190" class="li5e" name="5163"> 163
gclen_done(st="srenc_copyf">gcname=s="sref">req);
dst,
 164static int 5a hre56m.c#L235" id="L235" class="li5e" name="5165"> 165           5     56             r" clas#L218" id="L218" class="li5e" name="5166"> 166{
 167        swi5ch (<56m.c#L238" id="L238" class="li5e" name="5168"> 168        cas5 4:
<56cryptde=gcm_class="sref">err 170        case 12:
 171     152" id="L152" class="li5e   169        cas5 8:
<56                  sizeof(crypto_gcm_req_priv_ctx *pctx,
 170        cas5 12:
57 hrefL187" id="L187" class="li5e" name="5171"> 171        cas5 13:
57             ash_request" class="sr * *pctxem.cx" clgcm_reqctx" class *(st *req);
 172        cas5 14:
57ode=crypto_ahash_clear_flagsu8
pctxeuth_tagx" clgcm_reqctx" class/a>->u.euth_tagx" cL218" id="L218" class="li5e" name="5173"> 173        cas5 15:
57ode=ahash_request_set_crypt"u8
pctxieuth_tagx" clgcm_reqctx" class/a>->u.ieuth_tagx" cL218" id="L218" class="li5e" name="5174"> 174        cas5 16:
57href="+code=sode=len" class="sref">len,
,
ahreqm.cync_requestem.cx" c)L218" id="L218" class="li5e" name="5175"> 175           5    b57             ode=len" class="sref">lenyptlen + sizeof(a>yptlen + sizeof(len,
 176        def5ult:
57     218" id="L218" class="li5e" name="5177"> 177           5    r57             s="sref">ctrreqeuth_tagx" cpcs="sref">dstieuth_tagx" cpc16LL190" id="L190" class="li5e" name="5178"> 178        }
<5 href57ref="+code=cr 170       >catterwalk_map_and_copyahreieuth_tagync_requestieuth_tagx" cpcm_reqctx" class_o;
a>, dstyptlen + sizeof(len,
 179
err,
ahreieuth_tagync_requestieuth_tagx" cpcm_reqctx" classeuth_tagync_requesteuth_tagx" cpcs="sref">dst,
EBUSY,
 180        ret5rn 0;58 hrefL182" id="L182" class="li5e" name="5181"> 181}
 182
(st="srdec52" "ash_name="L170"> 170       ass="sref">crypto_async_request *areq, int err);
 183static void5 184           5     58href="+code=sash_request" class="srecase 12:
 171    _gcm_reqctx" class/a>, int dsta>);
 185           5     58ak;
crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 186{
 187        str5ct err)
 188        str5ct )
req);
dst,
 189        str5ct  190        str5ct kfre case 12:
,
req);
dst);
 191         192
 193        gcmash_len_done(st="srdec_">gcmash_name="L170"> 170        case 12:
 171      class="sref">err);
 194         195
crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 196        areq, int pctx->u.ahreqba>, int  197        crypt hreghref="gcm_req_priv_ctx *ahreg"gcm_req_priv_ctxpctx->u. 198         199
err)
 200        ahreqba>, int lenreq);
 191        (st="srdec52" "ash_nameass="sref">len);
 202           6    <60href="+code=sg_init_tad" class="sref">crypt hreode=dc52" m_reqctx(ahreqba>, int len);
lenctryptlen + sizeof( 203           6    <60href="+code=sg_set_buash_clear_flags>)
 *ahreqba>, int  194        )
EINPROGRESS || err == -EBUSY) {
 195
 196        err)
 197        )
req);
dst,
 198         16299"> 199
 60m.c#L220" id="L220" class="li6e" name="6210"> 210           6     61ode=kfree" class="sref">kfre case 12:
,
req);
dst);
 211           6     61cm.c#L182" id="L182" class="li6e" name="6212"> 212}
 213
err * 170        case 12:
 171    L190" id="L190" class="li6e" name="6214"> 214static  215{
pctxem.cx" clgcm_reqctx" class *(st *req);
 216        crypto_gcm_req_priv_ctx *pctx,
crypto_gcm_reqctx(req);
 217        ret6rn areq, int pctx->u.ahreqba>, int  218}
crypt hreghref="gcm_req_priv_ctx *ahreg"gcm_req_priv_ctxpctx->u. 219
len,
,
ahreqm.cync_requestem.cx" c)L218" id="L218" class="li6e" name="6220"> 220static void6lenyptlen + sizeof(a>yptlen + sizeof( 221static void6err);
 222
 223static int 6a hre62href="+code=sclass="sref">erryptlen + sizeof(dst,
 224           6     62href="+code=sde=err" r" clasESS" class="sref">EVALSS ||  225           6     62             s="sref">reqyptlen + sizeof(,
 226           6     62     218" id="L218" class="li6e" name="6227"> 227           6     62             s="sref">ctrctr, a>,  228{
       gggcm_req_priv_ctxctryptlen + sizeof(yptlen + sizeof( 229        str6ct ctrmplete,
gcmash_len_done(st="srdec_">gcmash_nameL218" id="L218" class="li6e" name="6230"> 230
 231        gc
gcname=s="sref">req);
dst,
 232           6     63             class="sref">err == - 233        err);
 234
 235        ret6rn req(st/blkciphere 12:
ahreqba>, int lenreq);
 236}
(st="srdec52" "ash_nameass="sref">len);
 237
ctr(ahreqba>, int len);
lenyptlen + sizeof( 238static int 6a hre63ref="+code=cr 170       >)
 *ahreqba>, int err == - 140
err);
 141         142        if 6errreq);
dst,
 143           6    <64href=L182" id="L182" class="li6e" name="6144"> 144           6     64m.c#L235" id="L235" class="li6e" name="6145"> 145           6    i64m.c#Lde=crypclass="sref">err 170        *(st *ahretfrlen_done(sttfrname#214" id="L214" class="li6e" name="6146"> 146           6     64ode=lL216" id="L216" class="li6e" name="6147"> 147        }
<6 href64ref="+code=crypto_aead" class="sref">cryptinde=nc,
ahreinde/a>,
ahretfrlen_done(sttfrname class="sref">ctr_dc5t_algcm.cL230" id="L216" class="li6e" name="6148"> 148
ahrei"gcm_req_priv_ctxreq,
 149        if 6cryptgcod"gcm_req_priv_ctx *ahre"gcm_req_priv_ctx *req(sttfrname#L190" id="L190" class="li6e" name="6150"> 150           6    g65ode=kfree" clash_request" class="sr * *ahre"grync_request tgcm.cL230" id="L216" class="li6e" name="6151"> 151
gc
gceq" class="sref">ahreg">gc
gceq" L230" id="L216" class="li6e" name="6152"> 152        len 153        err);
 154           6     65m.c#L235" id="L235" class="li6e" name="6155"> 155        reqgc
gceq" _gcm_reqctx" class="sref"spawnre">gc
gcname=" class="sref">pctxu.gceq" #L190" id="L190" class="li6e" name="6156"> 156        u.reqgceq" ##214" id="L214" class="li6e" name="6157"> 157           6     65        unsigned int r" class="sref">errreqgceq" #L190" id="L190" class="li6e" name="6158"> 158
 159 tgcm.c_gcm_reqctx" class="sref"spawnrskcipherync_request *pctxu. tgcm.c#L190" id="L190" class="li6e" name="6160"> 160        kfre>)
req tgcm.c#L190" id="L190" class="li6e" name="6161"> 161        ret6rn u.req tgcm.c##214" id="L214" class="li6e" name="6162"> 162}
kfre>)
_freef">gc
gccm.cL230" id="L216" class="li6e" name="6163"> 163
 164static int 6a hre664de=crypto_ahash_clear_flags"gcm_req_priv_ctxu. tgcm.c_gcm_reqctx" class=grync_request tgcm.cL230" id="L216" class="li6e" name="6165"> 165           6     66             s="sref">reqgcm_req_priv_ctxu.gc
gceq" _gcm_reqctx" classg">gc
gceq" L230" id="L216" class="li6e" name="6166"> 166{
 167        swi6ch (<66             s="sref">ctr(st="sref"tfrdalg_cl=lemaskname=s="sref">req(sttfrname#L190" id="L190" class="li6e" name="6168"> 168        cas6 4:
<66ref="+code=cr 170        l=le int erryptl * 169        cas6 8:
<66ode=ablkcipher_request_set_ctfrlen_done(sttfrname class="sref">ctr *trem.cx" class="sref">ahrereqsiz,
 170        cas6 12:
67                   170        *crypto_gcm_req_priv_ctx *dst 171        cas6 13:
67                  dst 170        blkciphere 12:
 172        cas6 14:
67href="+code=sg_init_t    s="sref">req*,
req tgcm.c# 152" id="L152" class="li6e" name="6173"> 173        cas6 15:
67href="+code=sg_set_buuuuu"iz 170        ">gcm 12:
gcm 12:
 174        cas6 16:
67href="+code=sde=err"     s="sref">req*gcm 12siz,
gcm 12sizreqgceq" ##L218" id="L218" class="li6e" name="6175"> 175           6    b67m.c#L196" id="L196" class="li6e" name="6176"> 176        def6ult:
67ode=len" clasr" clas#L218" id="L218" class="li6e" name="6177"> 177           6    r67m.c#L238" id="L238" class="li6e" name="6178"> 178        }
<6 href67ref="ass="sref">kfre>)
_freef">gc
gccm.c:238" id="L238" class="li6e   179
gc
gcname=s="sref">reqgceq" #L190" id="L190" class="li6e" name="6180"> 180        ret6rn 0;680de=len" clasr" class="sref">err);
 181}
 182
 183static void6 *(st * 170        *(st *ahretfrlen_done(sttfrname#214" id="L214" class="li6e" name="6184"> 184           6     68 hrefL216" id="L216" class="li6e" name="6185"> 185           6     68ak;
 *ahre"gcm_req_priv_ctx *req(sttfrname#L190" id="L190" class="li6e" name="6186"> 186{
 187        str6ct ctrgc
gcname=s="sref">reqgcm_req_priv_ctxu.gc
gceq" #L190" id="L190" class="li6e" name="6188"> 188        str6ct         * *reqgcm_req_priv_ctxu. tgcm.c#L190" id="L190" class="li6e   189        str6ct  190        str6ct  191        cryptinde=nc,
ahre/a> * + sizeof( 170       re=ggrync_requestre=ggrnamecllass="sref">ahretblen_done(sttbx" cp231" id="L231" class="li6e" name="6192"> 192
ahrefull_hreflen_done(stfull_hrefx" cp231" id="L231" class="li6e" name="6193"> 193        ahre tg_hreflen_done(st tg_hrefx" cp231" id="L231" class="li6e" name="6194"> 194        ahreghref=hreflen_done(stghref=hrefname#214" id="L214" class="li6e" name="6195"> 195
 196        *ahrealga href="crypto/gclgacm.cL230" id="L216" class="li6e" name="6197"> 197        cryptinde=nc,
ahreinde/a>,
 198        cryptalgync_request">cryptalgnameclass="sref">ahre"grync_request tgcm.cL230" id="L216" class="li6e" name="6199"> 199
cryptalgync_request">cryptalgnameclass="sref">ahreghref=algync_requestghref=algcm.cL230" id="L216" class="li7e" name="7200"> 200        ahreghref=ahref=algync_requestghref=ahref=algcm.cL230" id="L216" class="li7e1 name="7291"> 191        ahre>gcm_req_priv_ctx 192
err);
 203           7    <70m.c#L214" id="L214" class="li7e4 name="7294"> 194        etreggr_typ,
req(sttbx" c#L190" id="L190" class="li7e5 name="7295"> 195
u.req 196        errreq 197         198        requ.,
err,
u.(stmaskname#214" id="L214" class="li7e9 name="7299"> 199
 70                  sizr" class="sref">errEVALSS ||  210           7     71m.c#L231" id="L231" class="li7e" name="7211"> 211           7     711ref="+code=es="sref">errghref=algcm.c_gcm_reqctx" class="sref"findtalgync_request">cryptfindtalgname=s="sref">req(stghref=hrefname,c" class="sref">pctx<>*gcmtyp,
gcmtyp 212}
err,
 213
err,
 214static u.reqghref=algcm.c##214" id="L214" class="li7e5 name="7215"> 215{
errreqghref=algcm.c#L190" id="L190" class="li7e6 name="7216"> 216         217        ret7rn ctr)
 218}
       inde/a>,
ahreinde/a>,
ahre>gcm_req_priv_ctxdst ||  219
err,
 220static void7kfreout_put_g">gc
gccm.cL230" id="L216" class="li7e" name="7221"> 221static void7 222
req,
 223static int 7a hre72ode=ahash_request_set_crypt"shref=ahref=algync_requestghref=ahref=algcm.c_gcm_reqctx" class=onta>str_of int reqghref=algcm.c,lash_request" class="srahref=algync_requestahref=algcm.cpcs="sref">dsthalgcm.class="sref">ahrebas,
 224           7     724de=crypto_ahash_clear_flags>)
pctx<>gcm_req_priv_ctxu.gc
gceq" ,c" class="sref">pctxghref=ahref=algcm.class="sref">u.halgcm.cp231" id="L231" class="li7e5 name="7225"> 225           7     72ak;
err,
 226           7     72ode=len" clasclas"sref">u. == - 227           7     72        unsigned int gotolass="sref">kfre>)
_freefinde/a>,
 228{
 229        str7ct pctx<>gcm_req_priv_ctxu. tgcm.cpcs="sref">dst,
 230
kfre>)
*rabrskcipherync_request *rabrskciphername=" class="sref">pctx<>gcm_req_priv_ctxu. tgcm.cpcs="sref">dst(st tg_hrefx" cp 0p231" id="L231" class="li7e" name="7231"> 231        errrequ.,
 232           7     73                u.(stmaskname#LL190" id="L190" class="li7e" name="7233"> 233        err == - 234
kfre>)
_drop_g">gc
gccm.cL230" id="L216" class="li7e" name="7235"> 235        ret7rn  236}
u. tgcm.c_gcm_reqctx" class="sref"skcipher=spawntalgync_request">cryptskcipher=spawntalgname=" class="sref">pctx<>gcm_req_priv_ctxu. tgcm.cLL190" id="L190" class="li7e" name="7237"> 237
 238static int 7a hre73ref="+code=cr span"> 238/* We only support 16-byte blocks. */err tgcm.c class="sref">ctr *afeblkciphernamelass="sref">ahreivsiz,
 140
kfreout_put_"grync_requestout_put_"grcm.cL230" id="L216" class="li7e" name="7141"> 141         142        if 7 238/* Not alasheam cipher? */ 143           7    <74ode=ahash_request_set_crypt">)
EVALSS ||  144           7     744            clas"sref">u. tgcm.c class="sref">ctr,
 145           7    i74ak;
kfreout_put_"grync_requestout_put_"grcm.cL230" id="L216" class="li7e" name="7146"> 146           7     74     218" id="L218" class="li7e" name="7147"> 147        }
<7 href74             s="sref">ctr)
,
 148
req,
ctralgcm.class="sref">ahre>*afdriveg_hreflen_done(st *afdriveg_hrefcm.cpcs="sref">dst,
 149        if 7ss="ls="li7 141       ="L170"> 170_>"<="g90" (%s,%s)" id="L2dst tgcm.c class="sref">ctr(st *afdriveg_hrefcm.cpcs="sref">d31" class="li7 150<7a>           6    g65ode7kfree75       ctr)
ghref=algcm.c,lash_requef">ctr(st *afdriveg_hrefcm.cpcs="sref">) ">ct=31" class="li7 141
,
 152<7a>        kfreout_put_"grync_requestout_put_"grcm.cL230" id="L216" class="li7e" name="7153"> 153<7a>         154<7a>           6     65m.c7L235"75ahash_clear_flags>)
req,
ctralgcm.class="sref">ahre>*afdriveg_hrefe(st *afdriveg_href="sref">dst(stfull_hrefx" cp231" id="L2dt,
 145         156<7a>        u.ctralgcm.class="sref">ahre>*afdriveg_href"crypto/gcm.c#L171" href"crypqctx" class="sref"skciTYPE_AEAD/a>,
 147           6     65   7    u75  s="sref">ctr)
ctralgcm.class="sref">ahre>*afdriveg_href"crypto/gcm.c#L171" href"crypqctx"| class=grync_request tgcm.cL230" id="Lf">ctr 148
       inde/a>,
ctralgcm.class="sref">ahre>*afdriveg_hrefs="oritcode= href="+codveefs="oritcqctx" class="sref"skcipst tgcm.cL230" id="Lf">ctr 149ctralgcm.class="sref">ahre>*afdriveg_href>,
 160<7a>        kfre>)
f">ctralgcm.class="sref">ahre>*afdriveg_hrefn_done(st="sref"tfrdalefn_done tgcm.cL230" id="Lf">ctr(st="sref"tfrdalefn_done(st="sref"tfrd_fn_donof__f">req,
static inf"tfrdu_ahash id="L218" class="li6e   161<7a>        ret6rn errctralgcm.class="sref">ahre>*afdriveg_href href="c>*gcmaass="sref"sref">pctx->gcmtyp 162<7a>}
ctralgcm.class="sref">ahre>*afdriveg_hrefnest *trem.cx" class="sref">ahrereqsiz, 153<7a>
)
f">ctralgcm.class="sref">ahre>*afdriveg_hrefnest *trem.cx" class="sref">ahrereqsiz,max,
 154<7a>static int 6a hre664de7crypt7_ahash_clear_flags"gcm_req_pr href="cindem.c#_gc 170f">ctralgcm.class="sref">ahre>*afdriveg_hrefctx href="c>*afblocksiz<"+ctx hre238" d=0"> 170        ">gcm 12:
"gcm_req_priv_ctx * 145           6     66   7     7   s="sref">reqgcm_req_pr href="cindem.c#_gc 170f">ctralgcm.class="sref">ahre>*afdriveg_hrefspawf="c>*afblocksiz<"+spawqctx" class>*rabrskciphelen_done(st * 17218" class="li6e   156<7a>{
u.ctralgcm.class="sref">ahre>*afdriveg_hrefe="Lf="c>*afblocksiz<"+e="Lqctx" class>*rabrskciphelen_done(st * 17218" class="li6e   147        swi6ch (<66   7     7   s="sref">ctrctralgcm.class="sref">ahre>*afdriveg_hrefnest *trem.cx" class="sref">ahrereqsiz,setkecode= href="+codsetkecqctx" class>*rabrskciphelensetkecode= href="+codrskciphelensetkec> 17218" class="li6e   148        cas6 4:
<66ref7"+cod7=cr 170        l=le int < href="cindem.c#_gc 170f">ctralgcm.class="sref">ahre>*afdriveg_hrefnest *trem.cx" class="sref">ahrereqsiz,set,
*rabrskciphelenset,
 149        cas6 8:
<66ode7ablkc7pher_request_set_ctfrlen_done href="cindem.c#_gc 170f">ctralgcm.class="sref">ahre>*afdriveg_hrefnest *trem.cx" class="sref">ahrereqsiz,en"li6eypto/gcm.c#_gcESn"li6eqctx" class>*rabrskciphelen_n"li6eypto/gcm.c#_gcErskciphelen_n"li6e> 17218" class="li6e   170<7a>        cas6 12:
67   7     77class="sref">kfre>)
f">ctralgcm.class="sref">ahre>*afdriveg_hrefnest *trem.cx" class="sref">ahrereqsiz,request **rabrskciphelenrequest * 17218" class="li6e   161<7a>        cas6 13:
67   7     77d="L152" class="li7e" name="7172"> 172<7a>        cas6 14:
67hre7="+co7e=sg_ikfreout_put_"gryncout_put_"grcm.sg_i238" class="li6e   173<7a>        cas6 15:
67hre7="+co77equest_set_crypt">)
 *req,
ghref=algcm.c#L190" id="L190" class="li7e6 name="7274"> 174<7a>        cas6 16:
67hre7="+co7e=sde=err"    ref">err 175<7a>           6    b67m.c7L196"7id="L196" class="li6e" name="6776"> 176<7a>        def6ult:
67ode7len" 7lasr" kfreout_put_"grync_requestout_put_"grcm.cL230" id="L238" class="li6e   147           6    r67m.c7L238"77  s="sref">ctrgc
m.cL2_request *rabrskciphm.cL2_requestf">reef">pctx<>gcm_req_priv_ctxu. tgcm.cLL190" id="L190" class="li7e" name="7278"> 178<7a>        }
<6 href67ref7"ass=7sref">kfre>)
_freef">gc
<gccm.cL230" id="L238" class="li6e   149
gc
m.cL2ef="crypt *gcnm.cL2ef="cf">reef">pctx<>gcm_req_priv_ctxu.gceq" #L190" id="L190" class="li6e" name="6780"> 180<7a>        ret6rn 0;680de7len" 7lasr" kfre>)
_freef">gc
<>,
 181<7a>}
err)
_freefink.cL2f">req,
 172<7a>
gccm.cL230" id="L238" class="li6e   173<7a>static void6)
" class>*rabhref="cryptERR_PTRname=ESS" class=kfre>)
_freef">gc
f="c>)
_freefindec"sreL190" class="li6e" name="6784"> 174<7a>           6     68 hr7fL21678=sde=err"    ref">kfreout_put_"gryncout_put_"grcm.sg_i190" class="li6e" name="6785"> 175<7a>           6     68ak;7 186<7a>{
 187<7a>        str6ct cryptinde=nc,
ahre/a> *  *       re=ggrync_requestre=ggrnamecllass="sref">ahretblen_done(sttbx" cp231" id="L238" class="li7e" name="7188"> 188<7a>        str6ct  189<7a>        str6ct ahre tg_hreflen_talgnae(st *afdriveg_htalgnae 190<7a>        str6ct sref">.(st tg_hrefx" cp 0p231" id[lagsalga href="TYPE_AEE/a>,
 181<7a>        sref">.(stfull_hrefx" cp231" id="L[lagsalga href="TYPE_AEE/a>,
 172<7a>
 193<7a>        )
(st *afdriveg_htalgnae(st *afdriveg_hrpherede=s=sknae)
_freef">/a>(sttbx" cp231" id="L[1]L190" class="li6e" name="6794"> 194<7a>        .req(st *afdriveg_htalgnae 195<7a>
errreq(st *afdriveg_htalgnae 186<7a>         197<7a>        req,
(st tg_hrefx" cp 0p231" id="lagsalga href="TYPE_AEE/a>,
 170_>"cp (%s)" id="L2dst(st *afdriveg_htalgnaect=31" class="li7 198<7a>        )
,
 199<7a>
errEVALSS/a>,
 200<8a>         191<8a>        u.req,
(stfull_hrefx" cp231" id="L2dt,
 170_>"nam(%s)" id="L2dst(st *afdriveg_htalgnaect=31" class="li7 192<8a>
)
,
 203<8a>           7    <70m.c8L214"80=sg_set_buuuuu+coddddref">errEVALSS/a>,
 203<8a>         195<8a>
ref">err + sizeof( 170kfre>)
_freef">/a>(sttbx" cp231" id="Ldst(stfull_hrefx" cp231" id="L2dt(st tg_hrefx" cp 0p231" id="l      ="L170"> 170_>"n0" i" id="L2L190" class="li6e" name="6806"> 195<8a>         197<8a>         198<8a>         *)
_freefinexe=dtfrlen.cL2=lass=/a>       re=ggrync_r=nc,
ahre/a> * 199<8a>
 70   8     8      216" class="li6e" name="6810"> 210<8a>           7     71m.c8L231"81clash_request" class="srahref=algyng="gcm_req_priv_ctxahre>gcm_req_priv_ctxreq,
 211<8a>           7     711re8="+co81d="L152" class="li7e" name="7812"> 212<8a>}
gc
m.cL2_request *rabrskciphm.cL2_requestf">reef">pctx<>gcm_req_priv_ctxu. tgcm.cLL190" id="L190" class="li7e" name="7813"> 213<8a>
)
gcnm.cL2ef="cf">reef">pctx<>gcm_req_priv_ctxu.gceq" #L190" id="L190" class="li6e" name="6814"> 214<8a>static req,
 215<8a>{
 216<8a>         217<8a>        ret7rn cryptinde=nctemplatef="cr* *)
_freefinexe=dtfrlentmpld="L" c216" class="li6e" name="6818"> 198<8a>}
   >ahrereqsiz,e(st tg_hrefx" e 170_>"nam" id="L2d16" class="li6e" name="6819"> 199<8a>
*rabrskciphelen  * 220<8a>static void7ahrereqsiz,.cL2f="c>)
_freefin.cL2f">r" class>*rabrskciphelen.cL2f="c>)
_freefinexe=dtfrlen.cL2=lasd16" class="li6e" name="6821"> 211<8a>static void7ahrereqsiz,modulef="ceuthsizr" class>*rabTHIS_MODULef="cCRYPTO_MAX_THIS_MODULe=lasd16" class="li6e" name="6822"> 212<8a>
 223<8a>static int 7a hre72ode8ahash82d="L214" class="li7e4 name="7824"> 224<8a>           7     724de8crypt8_ahash_aead" class="sref">cryptinde=nc,
ahre/a> *  * =lass=/a>       re=ggrync_requestre=ggrnamecllass="sref">ahretblen_done(sttbx" cp231" id="L238" class="li7e" name="7825"> 225<8a>           7     72ak;8 226<8a>           7     72ode8len" 8lasclas"sref">lass="sref">ahre tg_hreflen_done(st tg_hrefx" cp231" id="L190" class="li6e" name="6827"> 217<8a>           7     72   8    u8signed int gotlass="sref">ahreghref=hreflen_done(stghref=hrefname#214" id="L190" class="li6e" name="6828"> 198<8a>{
   sref">.(stfull_hrefx" cp231" id="L[lagsalga href="TYPE_AEE/a>,
 229<8a>        str7ct  230<8a>
kfre>)
(st tg_hrefx" cp231" id="L" class *(st *afdriveg_hrpherede=s=sknae)
_freef">/a>(sttbx" cp231" id="L[1]L190" class="li6e" name="6831"> 231<8a>        u.req(st tg_hrefx" cp231" id="LL214" class="li7e5 name="7832"> 232<8a>           7     73   8     8      errreq(st tg_hrefx" cp231" id="LL190" class="li6e" name="6833"> 223<8a>         234<8a>
(stghref=hrefname#214" id="L" class *(st *afdriveg_hrpherede=s=sknae)
_freef">/a>(sttbx" cp231" id="L[2]L190" class="li6e" name="6835"> 225<8a>        ret7rn u.req 226<8a>}
errreq 217<8a>
 238<8a>static int 7a hre73ref8"+cod83c#clasSS" class="srefsnprintf int req,
(stfull_hrefx" cp231" id="L2dt,
 170_>"namg90" (%s,%s)" id="L2d38" class="li7e" name="7839"> 229<8L171>complete7/a>, 73="+8ode=e837  3lassme="7141"> 141 ,
(st tg_hrefx" cp 0p231" id="lagsalga href="en_done(stghref=hrefname#214" id="L2 ">ct=oypt">)
,
 140<8a>
errEVALSS/a>,
 141<8a>         142<8a>        if 7 238ref">err + sizeof( 170kfre>)
_freef">/a>(sttbx" cp231" id="Ldst(stfull_hrefx" cp231" id="L2dt(st tg_hrefx" cp 0p231" id="l 143<8a>           7    <74ode8ahash8reques207" class="li6e" name="6844"> 144<8a>           7     744  8     84d="L235" class="li6e" name="6845"> 145<8a>           7    i74ak;8cryptinde=nctemplatef="cr* * 146<8a>           7     74   8 218"84f="+code=er" >ahrereqsiz,e(st tg_hrefx" e 170_>"namn90" " id="L2d38" class="li7e" name="7847"> 147<8a>        }
<7 href74   8     8   s="sref">ct>ahrereqsiz,  **rabrskciphelen90" n  * =lasd38" class="li7e" name="7848"> 238<8a>
)
_freefin.cL2f">r" class>*rabrskciphelen.cL2f="c>)
_freefinexe=dtfrlen.cL2=lasd16" class="li6e" name="6849"> 149<8a>        if 7ss="ls="li8r" class>*rabTHIS_MODULef="cCRYPTO_MAX_THIS_MODULe=lasd16" class="li6e" name="6850"> 150<8a>           6    g65ode8kfree85     }190" class="li6e" name="6851"> 141<8a>
 152<8a>        err);
nestsref">ahre/a> * *trem.cx" par al" id="lass="ahre/a> * *trem.cx" u8sref">ahre/a> * 143<8a>        err);
 154<8a>           6     65m.c8L235"85id="L216" class="li6e" name="6855"> 145<8a>        ahre>gcm_req_priv_ctx 170kfre>)
_freef">par ala/a> *trem.cx" par al" id2190" class="li6e" name="6856"> 156<8a>        nestsref">ahre/a> * *trem.cx" chiltd="L" class="sref"odde=v_ctxu. *trem.cx" chiltd="L190" class="li6e" name="6857"> 147<8a>           6     65   8    u85  s="sref">ct">err);
 148<8a>
 149<8a>err 160<8a>        er"sref">EVALSS ||  161<8a>        ret6rn  162<8a>}
 143<8a>
)
req,
u. 154<8a>static int 6a hre664de8crypt86d="L235" class="li6e" name="6865"> 145<8a>           6     66   8     8   s="sref">reqgcm_req_pr=nc<="g"_flaileara"crypto/gcm.c#L171" hrc<="g"_flaileara"crypf">req,
 *trem.cx" chiltd="L2dt 156<8a>{
u.req,
 *trem.cx" chiltd="L2dtreq,
 *trem.cx" par al" id2ref">p90" class="li6e" name="6867"> 147<8a>        swi6ch (<66   8     8   s="sref">cttttttttttttttttttttttttttttttt 148<8a>        cas6 4:
<66ref8"+cod8=cr 170        l=le int <"crypto/gcm.c#_gcm_reqctx" class>*rabrskciph"_flar=skecode= href="+codrskciph"_flar=skecf">req,
 *trem.cx" chiltd="L2dt 149<8a>        cas6 8:
<66ode8ablkc8pher_request_set_ctfrlen_donehrc<="g"_flar=sp"crypto/gcm.c#L171" hrc<="g"_flar=sp"crypf">req,
 *trem.cx" par al" id="treq,
 *trem.cx" chiltd="L2ref">p90" class="li6e" name="6870"> 170<8a>        cas6 12:
67   8     87       cttttttttttttttttttt 161<8a>        cas6 13:
67   8     87d="L152" class="li7e" name="7872"> 172<8a>        cas6 14:
67hre8="+co87=s span"> 238ref">err 173<8a>        cas6 15:
67hre8="+co87eques207" class="li6e" name="6874"> 174<8a>        cas6 16:
67hre8="+co87d="L235" class="li6e" name="6875"> 175<8a>           6    b67m.c8L196"87=""+c_aead" ">err);
nestsref">ahre/a> * *trem.cx" par al" id=35" class="li6e" name="6876"> 156<8a>        def6ult:
67ode8len" 87f="+code=er" class="sssssssssssssssssssssssunsigned ">err);
 147<8a>           6    r67m.c8L238"87  s="216" class="li6e" name="6878"> 178<8a>        }
<6 href67ref8"ass=87cr 170   " class="sr *ahre>gcm_req_priv_ctx 170kfre>)
_freef">par ala/a> *trem.cx" par al" id2190" class="li6e" name="f8"9"> 149<8a>
 180<8a>        ret6rn 0;680de8len" 88clash_request"witcherr 181<8a>}
ercase 8238" class="li6e   172<8a>
ercase 12238" class="li6e   173<8a>static void6 174<8a>           6     68 hr8fL21688=sde=err"            break190" class="li6e" name="f885"> 175<8a>           6     68ak;8redefault238" class="li6e   156<8a>{
er"sref">EVALSS ||  187<8a>        str6ct ct207" class="li6e" name="6888"> 188<8a>        str6ct  189<8a>        str6ct errreq,
u. *trem.cx" chiltd="L2dt 190<8a>        str6ct  181<8a>         172<8a>
ahre>gcm_req_princ<="grfc4106ninc<=ctx<="sref"odde=nc<="grfc4106ninc<==lass=/a>       re=ggrync_rc_fla"+naeref="cindem.c# clc_fla"+naeresref">ahre>gcm_req_pr"+nf="cindem.c# cl"+n=las238" class="li7e" name="7893"> 193<8a>         194<8a>               re=ggrync_rc_fla"+naeref="cindem.c# clc_fla"+naeresref">ahre>gcm_req_prsub"+nf="cindem.c# clsub"+nd="L" class="sref"oddec_fla"+naereaiv_ctx<="sref"oddec_fla"+naereaiv_f">req,
 175<8a>
 *trem.cx" clcnestsref">ahre/a> * *trem.cx" nestsref" class="sref"odde=nc<="g"_fla"+n(st *req,
 156<8a>        ahre>gcm_req_priv_ctx 170kfre>)
_freef">nest *trem.cx" nestsref2216" class="li7e" name="7897"> 187<8a>        nestsref">ahre/a> * *trem.cx" chiltd="L" class="sref"odde=v_ctxu. *trem.cx" chiltd="L190" class="li6e" name="6898"> 198<8a>                l=le int  *trem.cx" u8sref">ahre/a> * *trem.cx" ivd="L" class="sref"oddePTR_ALIGNa/a> *trem.cx" PTR_ALIGN> 170eq,
 *trem.cx" u8sref">)"srefsnprintf intub"+nf="cindem.c# clsub"+nd="L"+ 1) +flags gcm_req_prexe=dtf"_fla"+n href="cr*req,
 *trem.cx" chiltd="L2=35" class="li6e" name="6899"> 199<8a>
(st="sref"tfrdale=dtf"_flan_donereq,
 *trem.cx" chiltd="L2r+="L218" class="li6e   200<9a>         191<9a>        errreq,
 *trem.cx" ivd="L2dtu. 192<9a>
req,
 *trem.cx" ivd="Lr+=42dtu. *trem.cx" ivd="L2d82216" class="li7e" name="7993"> 192<9a>         203<9a>        (st *req,
 203<9a>
reqgcm_req_prc_fla"+naerear=spcallbaca>(st="sref"tfrdc_fla"+naerear=spcallbacaf">req,
u.ahrereqsiz,.crypto/gcm.c#L171" "crypf">r2dtu.ahrereqsiz,completef="cr* 195<9a>        u.ahrereqsiz,dataf="cindem.c# cldatad="L2216" class="li7e" name="7997"> 195<9a>        ctrreq,
u. *u.u. 195<9a>          * f">req,
u.  * f">r2dtu. leof( leod="L2216" class="li7e" name="7999"> 195<9a>
 210<9a>           7     71m.c9L231"91clash_requestref">err 211<9a>           7     711re9="+co91d="L1207" class="li6e" name="6912"> 212<9a>}
 213<9a>
err);
       re=ggrync_rc_fla"+naeref="cindem.c# clc_fla"+naeresref">ahre>gcm_req_pr"+nf="cindem.c# cl"+n=las238" class="li7e" name="7914"> 214<9a>static  215<9a>{
reqgcm_req_pr"+nf="cindem.c# cl"+n=las" class="sref"odde=nc<="grfc4106ninc<=ctx<="sref"odde=nc<="grfc4106ninc<==lassq,
 216<9a>         217<9a>        ret7rn err,
 195<9a>}
 195<9a>
 220<9a>static void7err);
 *       re=ggrync_rc_fla"+naeref="cindem.c# clc_fla"+naeresref">ahre>gcm_req_pr"+nf="cindem.c# cl"+n=las238" class="li7e" name="7921"> 211<9a>static void7 212<9a>
,
 223<9a>static int 7a hre72ode9ahash92d="L214" class="li7e4 name="7924"> 224<9a>           7     724de9crypt92=sde=err"    ref">err *,
 215<9a>           7     72ak;9 226<9a>           7     72ode9len" 92d="L218" class="li7e" name="7927"> 217<9a>           7     72   9    u927    _aead" ">err);
(st *       re=ggrync_rode=dtf(st *ahre>gcm_req_pr(st * 195<9a>{
 229<9a>        str7ct        re=ggrync_r=nc,
ahre/a> *gcm_req_pr(st *u.ghref=algcm_nintuestd="L216" class="li7e" name="7930"> 230<9a>
ahre>gcm_req_prspawof(req,
 231<9a>        " class="sr>*ahre>gcm_req_priv_ctxreq,
(st * 212<9a>           7     73   9     9       *trem.cx" clcnestsref">ahre/a> * *trem.cx" nestsref190" class="li7e" name="7933"> 223<9a>         *trem.cx" n_donsref190" class="li7e" name="7934"> 224<9a>
 225<9a>        ret7rn reqgcm_req_prc_fl *trem.cx" nestsref" class="sref"odde=nc<="grpawoenest *trem.cx" clcrpawoenestf">req,
 226<9a>}
.req 217<9a>
ctttttttttref">errreq 195<9a>static int 7a hre73ref9"+cod93d="L159" class="li7e" name="7939"> 229<9L171>complete7/a>, 73="+9ode=e93her_request_set_ctfrlen_donehv_ctxu. *trem.cx" chiltd="L" class="sref"oddec_fl *trem.cx" nestsref190" class="li7e" name="7940"> 140<9a>
 141<9a>        err *trem.cx" n_donsref" class="sref"odde=nc<="g"_flan_done(st="sref"tfrdale=dtf"_flan_donereq,
 *trem.cx" nestsref2190" class="li7e" name="7942"> 142<9a>        if 7p= ~eq,
 *trem.cx" =nc<="gre) -="L218" class="li6e   143<9a>           7    <74ode9ahash94equest_set_crypt">)
(st *u. *trem.cx" cltss="sref">ahrereqsiz,"+n href="cr*r" c hreofs=/a>       re=ggrync_rc_fla"+naeref="cindem.c# clc_fla"+naeresref) +18" class="li6e   224<9a>           7     744  9     94=sde=err"                                re=ggrync_rALIGNa/a> *trem.cx" ALIGN> 170lass="sref"odde=nc<="g"_fla"+n href="cr*req,
 *trem.cx" nestsref2=35" class="li6e" name="6945"> 145<9a>           7    i74ak;9 *trem.cx" =nc<="gre)) +18" class="li6e   226<9a>           7     74   9 218"94f="+code=er" class="ssssssssssssssssslags gcm_req_prc_don *trem.cx" n_donsref"+ 16218" class="li6e   217<9a>        }
<7 href74   9     94d="L238" class="li7e" name="7948"> 238<9a>
er0218" class="li6e   229<9a>        if 7ss="ls="li9 150<9a>           6    g65ode9kfree95d="L231" class="li7e" name="7951"> 141<9a>
 *(st *       re=ggrync_rode=dtf(st *ahre>gcm_req_pr(st * 152<9a>         143<9a>        ahre>gcm_req_priv_ctxreq,
(st * 154<9a>           6     65m.c9L235"95d="L235" class="li6e" name="6955"> 145<9a>        reqgcm_req_pr=nc<="g.cL23nest *trem.cx" clc.cL23nest> 170lass="sref"odde=v_ctxu. *trem.cx" chiltd="L2190" class="li7e" name="7956"> 226<9a>         147<9a>           6     65   9    u95d="L238" class="li7e" name="7958"> 148<9a>
cryptinde=nc,
ahre/a> *  * =lass=/a>       re=ggrync_requestre=ggrnamecllass="sref">ahretblen_done(sttbx" cp231" id="L238" class="li7e" name="7959"> 149<9a> 160<9a>        ahre/a> * 161<9a>        ret6rn " class="sr>*ahre/a> * 152<9a>}
ahre>gcm_req_prspawof( 143<9a>
ahre/a> * 154<9a>static int 6a hre664de9crypt96=sde=err"    lass="sref">ahre tg_hreflen_cmne(st tg_hrefx" ccmne 145<9a>           6     66   9     9   s="sref">re">err);
 156<9a>{
 147<9a>        swi6ch (<66   9     96  s="sref">ctr*rabrskciphe=sp e=s=typef="cr*req,
(sttbx" cp231" id="L2216" class="li7e" name="7968"> 148<9a>        cas6 4:
<66ref9"+cod9=cr 170   u.req 149<9a>        cas6 8:
<66ode9ablkc96       sizr" class="sref">errreq 170<9a>        cas6 12:
67   9     97d="L231" class="li7e" name="7971"> 161<9a>        cas6 13:
67   9     97asclas"sref">uu.ptru.(st="sref"tfrder238" class="li7e" name="7972"> 172<9a>        cas6 14:
67hre9="+co97     errEVALSS ||  143<9a>        cas6 15:
67hre9="+co97d="L214" class="li7e4 name="7974"> 174<9a>        cas6 16:
67hre9="+co97ahash_clear_flags"gcm_req_pr_cmne(st tg_hrefx" ccmne(st *afdriveg_hrpherede=s=sknae)
_freef">/a>(sttbx" cp231" id="L[1]L190" class="li6e" name="6975"> 175<9a>           6    b67m.c9L196"97  clas"sref">u.req 156<9a>        def6ult:
67ode9len" 97f="+code=er" class="sref">errreq(st tg_hrefx" ccmne 147<9a>           6    r67m.c9L238"97d="L238" class="li7e" name="7978"> 178<9a>        }
<6 href67ref9"ass=97cr 170        l=le int < href="cindem.c#)190" id="L" c     l=le int   * =lass=hreofs>ahre/a> * 149<9a>
er!ahre/a> * 180<9a>        ret6rn 0;680de9len" 98       errEVALSS/OMEMryptERR_PTRname=/OMEMsref2190" class="li6e" name="6981"> 181<9a>}
 172<9a>
req,
 173<9a>static void6)
retenestarpawof(req,
 174<9a>           6     68 hr9fL21698ahash_clear_flags"gcm_req_pr"crypto/gcm.c#_gcm_reqctx" class>*rabrskciphgrab3nest *trem.cx" clcgrab3nestf">req,
 175<9a>           6     68ak;9requ.(st="sref"tfrder2L190" class="li7e" name="7986"> 156<9a>{
. 147<9a>        str6ct ctttttttttgotodt.cL23 href="cindem.c#LL1out>.cL23 hred="L216" class="li7e" name="7988"> 188<9a>        str6ct  189<9a>        str6ct *rabrskciph"_flarpawoenstghref=algcm_typreq,
 190<9a>        str6ct  181<9a>        errEVALSS ||  172<9a>
 193<9a>        /* We only support 16-byte ba> ks. */ id="L223" class="li6e" name="6994"> 174<9a>        . *trem.cx" class="sref">ahrereqsiz,iv href="cr* 175<9a>
m.cL2elgd="L216" class="li7e" name="7996"> 156<9a>         187<9a>        /* Not au" ceam cipher? */ id="L223" class="li6e" name="6998"> 188<9a>           u. kshref="cr* kshresde=e!= 1290" class="li6e" name="6999"> 189<9a>
m.cL2elgd="L216" class="li7e" name="71000"> 200<1000">a href="c6ypto/699ef1000">1000="L218/pre>
a href=do6ypt 20043/b4/90e2427648f9db4f95d3d6531b8f93ea4f31_3/1000">6" class="li7e" name="71001"> 200<100>         >100=es="sref">errEVALSS/a>,
 200<100>
req,
 200<100>         170_>"rfc4106(%s)" id="L2dset_ctfrlen_donenlgf="cindem.c# clclgsref>u.(st *afdriveg_hra31" id="L2 ">ct=oypt">)
,
 200<100>        .req,
 200<100>
 170_>"rfc4106(%s)" id="L2dset_ctfrlen_donenlgf="cindem.c# clclgsref>u.(st tg_hrefx" cea3driveonect=16" class="li7e" name="71006"> 200<100>        ,
 200<100>        ctttttttttgotodtm.cL2elgf="cindem.c# clout>m.cL2elgd="L216" class="li7e" name="71008"> 200<100>         200<100>
r" class>*rabALG_NAMep23TYPE_AEADf="cr* 200<10a>           7     71m.c10a> >10a>er_request_set_ctfrlen_done href="cindem.c#LL190" id=">u.r"| class="sref"oddeclgf="cindem.c# clclgsref>u.r"ef">ptr 200<10a>           7     711re10a> >10a=es="sref">errr" class>*rabclgf="cindem.c# clclgsref>u.r216" class="li7e" name="71012"> 200<10a>}
 kshresde=e= 1216" class="li7e" name="71013"> 200<10a>
)
r" class>*rabclgf="cindem.c# clclgsref>u.(st="sref"tfrdalaan_doner216" class="li7e" name="71014"> 200<10a>static plass>*rabrskciphnive_flatypef="cr*r216" class="li7e" name="71015"> 200<10a>{
 200<10a>        u.ahrereqsiz,iv href="cr* 200<10a>        ret7rn  >10a  s="sref">ctrahrereqsiz,max,
 200<10a>}
 200<10a>

>10aher_request_set_ctfrlen_done href="cindem.c#LL190" id=">u.       re=ggrync_r_typ 200<10a>static void7s>10a>="L159" class="li7e" name="71021"> 200<10a>static void7s>10a=es="sref">err*rabrskciphrfc4106n_done(st * 200<10a>
*rabrskciphrfc4106n_xone(st * 200<10a>static int 7a hre72ode10a>s>10ad="L214" class="li7e4 name="710a4"> 200<10a>           7     724de10a> >10aahash_clear_flags"gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,r=skecode= href="+codr=skecf">r" class>*rabrskciphrfc4106nsetkecode= href="+codrskciphrfc4106nsetkec=las190" class="li7e" name="71025"> 200<10a>           7     72ak;10a> >10a  s="sref">reqgcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,r=s,
r" class>*rabrskciphrfc4106nset,
 200<10a>           7     72ode10a> >10af="sref">u.ahrereqsiz,_n"li6eypto/gcm.c#_gcE_n"li6e=las" class>*rabrskciphrfc4106n_n"li6eypto/gcm.c#_gcErskciphrfc4106n_n"li6e=las190" class="li7e" name="71027"> 200<10a>           7     72   10a> >10a  s="sref">ctrahrereqsiz,request **rabrskciphrfc4106nrequest * 200<10a>{
 200<10a>        str7ct  >10aher_request_set_ctfrlen_done href="cindem.c#LL190" id=">u.ahrereqsiz,gen va/a> *trem.cx" gen v=las" cl      ="L170"> 170_>"seqiv" id="L2190" class="li7e" name="71030"> 200<10a>
 200<10a>         200<10a>           7     73   10a> >10a=s span"> 238ref">err 200<10a>         200<10a>
m.cL2elgf="cindem.c# clout>m.cL2elgd="L238" class="li6e   200<10a>        ret7rn  >10a  s="sref">reqgcm_req_pr=nc<="gm.cL2eest *trem.cx" clcm.cL2eestf">req,
 200<10a>}
.cL23 href="cindem.c#LL1out>.cL23 hred="L238" class="li6e   200<10a>
ctrreq,
 200<10a>static int 7a hre73ref10a>s>10acr 170        l=le int < href="cindem.c#)190" id="L" c     l=le int ,_crypto/gcm.c#_gcm_reqctx2190" class="li7e" name="710a9"> 200<10L171>complete7/a>, 73="+10L17>10aher_request_sgotodt 200<10a>
 200<10a>         200<10a>        if 7 >10a     _aead" _crypt" c/a> *ahre/a> * 200<10a>           7    <74ode10a> >10aeques216" class="li6e" name="610a4"> 200<10a>           7     744  10a> >10aahash_clear_flags"gcm_req_pr_lcm.cL2rpawof(,=nc<="gcm_req_priv_ctx<="sref"odde=nc<="gcname=s="sref">req,
 200<10a>           7    i74ak;10a> >10a  s="sref">reqgcm_req_prk.cL2f="cindem.c#LL1k.cL2f">req,
 200<10a>           7     74   10a> >10af="+c207" class="li6e" name="610a7"> 200<10a>        }
<7 href74   10a> >10ad="L238" class="li7e" name="710a8"> 200<10a>
cryptinde=nctemplatef="cr*template s="st" c/a> * 200<10a>        if 7ss="ls="li10a> >10aher_request_s>ahrereqsiz,e(st tg_hrefx" e 170_>"rfc4106" id="L2d16" class="li6e" name="61050"> 200<10a>           6    g65ode10a> >10a>er_request_s>ahrereqsiz,  * =las" class>*rabrskciphrfc4106n  * =lasd16" class="li6e" name="61051"> 200<10a>
r" class>*rabrskciphrfc4106n.cL2f="cindem.c#LL1exe=dtfrfc4106n.cL2lassd16" class="li6e" name="61052"> 200<10a>        r" class>*rabTHIS_MODULef="cCRYPTO_MAX_THIS_MODULelassd16" class="li6e" name="61053"> 200<10a>         200<10a>           6     65m.c10a> >10ad="L235" class="li6e" name="610a5"> 200<10a>        r"=/a>       re=ggrync_r_typahre/a> *re35" class="li6e" name="610a6"> 200<10a>        ahre>gcm_req_pr"+nf="cindem.c# cl"+n=las238" class="li7e" name="710a7"> 200<10a>           6     65   10a> >10a7ques216" class="li6e" name="61058"> 200<10a>
(st="sref"tfrdale=dtf"_flan_donereq,
(st *req,
 200<10a> 200<10a>         238ref">er(_cryp*)ahre>gcm_req_prPTR_ALIGNa/a> *trem.cx" PTR_ALIGN> 170eq,
 *trem.cx" u8sref">)="sr>*req,
 *trem.cx" n_donsref"+ 1L190" class="li7e" name="71061"> 200<10a>        ret6rn  >10ad="L1207" class="li6e" name="610a2"> 200<10a>}
 200<10a>
err);
* *trem.cx" clcnestsref">ahre/a> * *trem.cx" par allassd lass="q,
 *trem.cx" u8sref">qgcm_req_prkecode= href="+codkeclassd16" class="li6e" name="61064"> 200<10a>static int 6a hre664de10a>s>10a=sde=err"                             unsigned ">err);
 200<10a>           6     66   10a> >10a5ques216" class="li6e" name="61066"> 200<10a>{
ahre>gcm_req_priv_ctx 170kfre>)
_freef">par ala/a> *trem.cx" par allassL190" class="li7e" name="71067"> 200<10a>        swi6ch (<66   10a> >10acrypto_aead" " class="sr>*est *trem.cx" clcnestsref">ahre/a> * *trem.cx" chiltd="L" class="sref"odde=v_ctxu. *trem.cx" chiltd="L190" class="li6e" name="610a8"> 200<10a>        cas6 4:
<66ref10a> >10acr 170   u>err);
 200<10a>        cas6 8:
<66ode10a> >10aher_r90" class="li6e" name="61070"> 200<10a>        cas6 12:
67   10a> >10a>r 170   u. 200<10a>        cas6 13:
67   10a> >10a1sde=err"            ref">er"sref">EVALSS ||  200<10a>        cas6 14:
67hre10a> >10ad="L223" class="li6e" name="61073"> 200<10a>        cas6 15:
67hre10a> >10aequest_set_crypt">)
 200<10a>        cas6 16:
67hre10a> >10aahash_clear_flags"gcm_req_prmemcpcode= href="+codmemcpcf">req,
u.)
 200<10a>           6    b67m.c10a> >10a5="L159" class="li7e" name="71076"> 200<10a>        def6ult:
67ode10a> >10af="sref">u.req,
 *trem.cx" chiltd="L2dt *trem.cx" ALG_NAMTFM_REQ_MASKlassL190" class="li7e" name="71077"> 200<10a>           6    r67m.c10a> >10a  s="sref">ctrreq,
 *trem.cx" chiltd="L2dtreq,
 *trem.cx" par allassL"ef">p90" class="li7e" name="71078"> 200<10a>        }
<6 href67ref10a> >10a8sde=err"                                 t *trem.cx" ALG_NAMTFM_REQ_MASKlassL190" class="li7e" name="71079"> 200<10a>
*rabrskciph"_flaretkecode= href="+codrskciph"_flaretkecf">req,
 *trem.cx" chiltd="L2dt 200<10a>        ret6rn 0;680de10a> >10a> s="sref">ctrreq,
 *trem.cx" par allassd treq,
 *trem.cx" chiltd="L2"ef">p90" class="li7e" name="71081"> 200<10a>}
 *trem.cx" ALG_NAMTFM_RES_MASKlassL190" class="li7e" name="71082"> 200<10a>
 200<10a>static void6err 200<10a>           6     68 hr10a> >10a4="L1207" class="li6e" name="61085"> 200<10a>           6     68ak;10a> >10a5="L159" class="li7e" name="71086"> 200<10a>{
err);
nestsref">ahre/a> * *trem.cx" par allassd59" class="li7e" name="71087"> 200<10a>        str6ct  >10a  s="sref">ctttttttttttttttttttttttttttttttunsigned ">err);
 200<10a>        str6ct  >10acr 17216" class="li6e" name="610a9"> 200<10a>        str6ct  >10a       sizr" =/a>       re=ggrync_r=ncrfc4543 iv_ctx<="sref"odde=nc<="grfc4543 iv_sref">ahre>gcm_req_priv_ctx 170kfre>)
_freef">par ala/a> *trem.cx" par allassL190" class="li7e" name="71090"> 200<10a>        str6ct  >10a>="L159" class="li7e" name="71091"> 200<10a>         >10aasclas"sref">u);
 200<10a>
er"sref">EVALSS ||  200<10a>         200<10a>        errreq,
u. *trem.cx" chiltd="L2dt 200<10a>
 200<10a>         200<10a>        ahre>gcm_req_pr=nc<="grfc4543 inc<=ctx<="sref"odde=nc<="grfc4543 inc<=lass=" class="sr>*ahre>gcm_req_pr"+nf="cindem.c# cl"+n=lasd59" class="li7e" name="71098"> 200<10a>        err);
 *r290" class="li6e" name="610a9"> 200<10a>
 200<1100">a href="c6ypto/699ef1100">110clash_request" class="srahref=algyn#euthsi"_fl *trem.cx" clcnestsref">ahre/a> * *trem.cx" nestsref" class="sref"odde=nc<="g"_fla"+n(st *req,
 200<110>         >110asclas"sref">" class="sr>*ahre>gcm_req_priv_ctx 170kfre>)
_freef">nest *trem.cx" nestsref2190" class="li7e" name="71102"> 200<110>
ahre/a> *req,
 200<110>        ahre>gcm_req_prsub"+nf="cindem.c# clsub"+nd="L" cef">plass>*rabriv_ctx<="sref"odder" id="L>u. 200<110>        ahre>gcm_req_prdref="cindem.c# cld id="L" c     l=le int <"+nf="cindem.c# cl"+n=las>u. 200<110>
ahre>gcm_req_prcipherctx<="sref"odde=ipherd="L" c     l=le int <"iv_ctx<="sref"odder" id="L>u. 200<110>        ahre>gcm_req_prpaylost *trem.cx" paylostd="L" c     l=le int <"iv_ctx<="sref"odder" id="L>u. *trem.cx" paylostd="L216" class="li7e" name="71107"> 200<110>        ahre>gcm_req_prind>  * d="L" c     l=le int <"iv_ctx<="sref"odder" id="L>u.  * d="L216" class="li7e" name="71108"> 200<110>        err);
req,
 *trem.cx" nestsref2190" class="li7e" name="71109"> 200<110>
err);
 leof( leod="L" c     l=le int <"+nf="cindem.c# cl"+n=las>u. leof( leod="L190" class="li7e" name="71110"> 200<11a>           7     71m.c11a> >111clash_request" class="srahref=algynpagef="cr*ahre>gcm_req_prdrepf="cindem.c# cld ipd="L190" class="li7e" name="71111"> 200<11a>           7     711re11a> >11a=es="sref">err *trem.cx" u8sref">qgcm_req_prvdref="cindem.c# clvd id="L216" class="li7e" name="71112"> 200<11a>}
qgcm_req_pr va/a> *trem.cx"  v=las" clgcm_req_prPTR_ALIGNa/a> *trem.cx" PTR_ALIGN> 170eq,
 *trem.cx" u8sref">)eq,
)
req,
u. *trem.cx" chiltd="L2d59" class="li7e" name="71113"> 200<11a>
(st="sref"tfrdale=dtf"_flan_donereq,
u. *trem.cx" chiltd="L2"+ 1L190" class="li7e" name="71114"> 200<11a>static  200<11a>{
reqgcm_req_prmemcpcode= href="+codmemcpcf">req,
 *trem.cx"  v=lasd tu. 200<11a>        u.req,
 *trem.cx"  v=las"+ 4d tu. *trem.cx"  v=lasd 82216" class="li7e" name="71117"> 200<11a>        ret7rn  >111d="L238" class="li7e" name="711a8"> 200<11a>}
/* lass=class=ipher/pla">eext */ id="L223" class="li6e" name="61119"> 200<11a>

>111" class="sref">err);
 *r290" class="li6e" name="61120"> 200<11a>static void7s>112       req,
 200<11a>static void7s>11a=es="sref">erelse16" class="li7e" name="71122"> 200<11a>
req,
 200<11a>static int 7a hre72ode11a>s>112=sg_set_buuuuu+codddddddddlear_f href="+codddd="sr>*u. 200<11a>           7     724de11a> >11aahash_clear_fu+codddddddddlear_f href="+codddd="sr>* 200<11a>           7     72ak;11a> >1125="L159" class="li7e" name="71126"> 200<11a>           7     72ode11a> >11af="sref">u.req,
 200<11a>           7     72   11a> >112d="L238" class="li7e" name="71128"> 200<11a>{
/* lass=classthe aad */ id="L223" class="li6e" name="61129"> 200<11a>        str7ct  >11aher_request_set_ctfrlen_donedrepf="cindem.c# cld ipd="L" clgcm_req_prsgnpagef="cr*req,
 200<11a>
ctrgcm_req_prPageHighMea>(st *req,
req,
)
 200<11a>         200<11a>           7     73   11a> >113ahash_clear_flags gcm_req_prsgn_donetablef="cr*req,
 *trem.cx" paylostd="L, 22216" class="li7e" name="71133"> 200<11a>        )
req,
 *trem.cx" paylostd="L, tu. *trem.cx"  v=lasd 82216" class="li7e" name="71134"> 200<11a>
ode= href="+codscatterwalk_ale=dtfcha">f">req,
 *trem.cx" paylostd="L, tu. *trem.cx"  v=las"+ 8, 22216" class="li7e" name="71135"> 200<11a>        ret7rn  >11a  s="sref">reqgcm_req_pr,nd> leof( leod="L"+= 8 + ypt">)
u.);
 *r ?c0":s="srahref=algyn,
 200<11a>}
 200<11a>
ct">err);
u.  * d="L>u. *u. leof( leod="L)c216" class="li6e" name="611a8"> 200<11a>static int 7a hre73ref11a>s>1138sde=err"            lags gcm_req_prsgn_donetablef="cr*req,
  * d="L, 22216" class="li7e" name="71139"> 200<11L171>complete7/a>, 73="+11L17>113       sizr" class="sypt">)
req,
  * d="L, lgcm_req_prsgnpagef="cr*req,
u.  * d="L2dset_ctfrlen_done"+nf="cindem.c# cl"+n=las>u.  * d="L>u. * 200<11a>
)
u.  * d="L>u. 200<11a>        er}relsec216" class="li6e" name="611a2"> 200<11a>        if 7 >114     * *trem.cx" BUG_ONf">req,
u. leof( leod="L"u buef="+snprintfnamind> bued="L22216" class="li7e" name="711a3"> 200<11a>           7    <74ode11a> >114d="L214" class="li7e4 name="711a4"> 200<11a>           7     744  11a> >114ahash_clear_fu+codddd="sr>*req,
 buef="+snprintfnamind> bued="Ldset_ctfrlen_done"+nf="cindem.c# cl"+n=las>u.  * d="Ld 0214" class="li7e4 name="711a5"> 200<11a>           7    i74ak;11a> >11a  s="sref">reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeq,
u. leof( leod="Ld 02216" class="li7e" name="71146"> 200<11a>           7     74   11a> >114d="L218" class="li7e" name="711a7"> 200<11a>        }
<7 href74   11a> >114  s="sref">ctttttttttlags gcm_req_prsgn_donetablef="cr*req,
  * d="L, 22216" class="li7e" name="711a8"> 200<11a>
req,
  * d="L, lgcm_req_pr"iv_ctx<="sref"odder" id="L>u. buef="+snprintfnamind> bued="Ldset_ctfrlen_done"+nf="cindem.c# cl"+n=las>u. leof( leod="L)216" class="li7e" name="711a9"> 200<11a>        if 7ss="ls="li11a> >11aher_request_s207" class="li6e" name="61150"> 200<11a>           6    g65ode11a> >115> s="sref">ctrode= href="+codscatterwalk_ale=dtfcha">f">req,
  * d="L, lgcm_req_prpaylost *trem.cx" paylostd="L, 0, 22216" class="li7e" name="71151"> 200<11a>
 200<11a>        (st *req,
u. *trem.cx" chiltd="L2216" class="li7e" name="71153"> 200<11a>        )
(st="sref"tfrdc_fla"+naerearetecallbacaf">req,
u.ahrereqsiz,.crypto/gcm.c#L171" "crypf">rd tu.ahrereqsiz,completef="cr* 200<11a>           6     65m.c11a> >115ahash_clear_fu+codddddddddlear_f href="tu.ahrereqsiz,dataf="cindem.c# cldatad="L2216" class="li7e" name="71155"> 200<11a>        reqgcm_req_pr,_fla"+naerearetecnc<=ctx<="sref"odde,_fla"+naerearetecnc<=f">req,
 *r ?c0":s="srahref=algyn,
 200<11a>        u.  * f">req,
gcm_req_pr,nd> leof( leod="L)216" class="li7e" name="711a7"> 200<11a>           6     65   11a> >115d="L238" class="li7e" name="71158"> 200<11a>
err 200<11a> 200<11a>         200<11a>        ret6rn  >11ad="L1_aead" ">err);
re" class="sr>*ahre>gcm_req_pr"+nf="cindem.c# cl"+n=las238" class="li7e" name="711a2"> 200<11a>}
 200<11a>
 *trem.cx" clcnestsref">ahre/a> * *trem.cx" nestsref" class="sref"odde=nc<="g"_fla"+n(st *req,
 200<11a>static int 6a hre664de11a>s>11a=sde=err"    " class="sr *ahre/a> *req,
 200<11a>           6     66   11a> >116=""+code=er" " class="sr>*ahre>gcm_req_prsub"+nf="cindem.c# clsub"+nd="L216" class="li7e" name="71166"> 200<11a>{
 200<11a>        swi6ch (<66   11a> >116d="L238" class="li7e" name="711a8"> 200<11a>        cas6 4:
<66ref11a> >11acr 170   ahre>gcm_req_prsub"+nf="cindem.c# clsub"+nd="L" class="sref"odde=nc<="grfc4543 inc<=ctx<="sref"odde=nc<="grfc4543 inc<=lass=q,
 200<11a>        cas6 8:
<66ode11a> >116her_request_set_ctfrlen_done"crypto/gcm.c#_gcm_reqctx" class>*rabrskciph"_fla_n"li6eypto/gcm.c#_gcErskciph"_fla_n"li6ef">req,
 200<11a>        cas6 12:
67   11a> >11a>r 170   u. 200<11a>        cas6 13:
67   11a> >11a1sde=err"            ref">err);
 200<11a>        cas6 14:
67hre11a> >11ad="L223" class="li6e" name="61173"> 200<11a>        cas6 15:
67hre11a> >11aequest_set_crypt">)
req,
u.u. 200<11a>        cas6 16:
67hre11a> >117ahash_clear_fu+codddddddddlear_f href=lass>*rabrskciph"_flan
req,
 *trem.cx" nestsref2, 1L190" class="li7e" name="711a5"> 200<11a>           6    b67m.c11a> >11a5="L159" class="li7e" name="71176"> 200<11a>        def6ult:
67ode11a> >11af="sref">uer0190" class="li7e" name="711a7"> 200<11a>           6    r67m.c11a> >11a  s="207" class="li6e" name="61178"> 200<11a>        }
<6 href67ref11a> >117d="L159" class="li7e" name="71179"> 200<11a>
err);
 *re" class="sr>*ahre>gcm_req_pr"+nf="cindem.c# cl"+n=las238" class="li7e" name="71180"> 200<11a>        ret6rn 0;680de11a> >11a> s="216" class="li6e" name="61181"> 200<11a>}
gcm_req_pr"+nf="cindem.c# cl"+n=las" class="sref"odde=nc<="grfc4543 inc<=ctx<="sref"odde=nc<="grfc4543 inc<=lass=q,
 200<11a>
 200<11a>static void6err *req,
 200<11a>           6     68 hr11a> >11a4="L1207" class="li6e" name="61185"> 200<11a>           6     68ak;11a> >11a5="L159" class="li7e" name="71186"> 200<11a>{
err);
(st *re" class="sr>*(st *r">ahre>gcm_req_prt/a>(st *r238" class="li7e" name="71187"> 200<11a>        str6ct  >1187ques216" class="li6e" name="61188"> 200<11a>        str6ct  >118cr 170   " class="sr>*ahre/a> *gcm_req_prt/a>(st *r>u. 200<11a>        str6ct  >11a       sizr" =/a>       re=ggrync_r=nc"_flaspawof(ahre>gcm_req_prspawof(req,
 200<11a>        str6ct  >119clash_request" class="srahref=algyn#euthsirfc4543 iv_ctx<="sref"odde=nc<="grfc4543 iv_sref">ahre>gcm_req_priv_ctxreq,
(st *r2216" class="li7e" name="71191"> 200<11a>         >11aasclas"sref">" class="sr>* *trem.cx" clcnestsref">ahre/a> * *trem.cx" nestsref216" class="li7e" name="71192"> 200<11a>
 200<11a>         200<11a>         *trem.cx" nestsref" class="sref"odde=nc<="grpawoi"_fl *trem.cx" clcrpawoi"_flf">req,
 200<11a>
.req,
 *trem.cx" nestsref2238" class="li7e" name="711a6"> 200<11a>        uerrreq,
 *trem.cx" nestsref2190" class="li7e" name="71197"> 200<11a>         200<11a>        u. *trem.cx" chiltd="L" class="sref"oddec_fl *trem.cx" nestsref216" class="li7e" name="71199"> 200<11a>
 200<1200">a href="c6ypto/699ef1200">120> s="sref">ctr(st="sref"tfrdale=dtf"_flan_donereq,
 *trem.cx" nestsref2190" class="li7e" name="71201"> 200<120>         >1201sde=err"    ahre>gcm_req_prc_don *trem.cx" n_donsref"ef">p= ~eq,
 *trem.cx" ale=dtft/a iv_an_done alf">re) - 1L190" class="li7e" name="71202"> 200<120>
r>u. *trem.cx" clti"_flf">r>ahrereqsiz,"+n href="cr*r" c hreofs" class="sr * 200<120>         *trem.cx" ALIGN> 170lass="sref"odde=nc<="g"_fla"+n href="cr*req,
 *trem.cx" nestsref2,90" class="li7e" name="71204"> 200<120>        re)) +90" class="li7e" name="71205"> 200<120>
reeeeeeeeeeeeeeeeeeeeeeeeeahre>gcm_req_prc_don *trem.cx" n_donsref"+ 16190" class="li7e" name="71206"> 200<120>         200<120>        er0190" class="li7e" name="71208"> 200<120>         200<120>
 200<12a>           7     71m.c12a> >121clash_aead" _cryp="sr *(st *re" class="sr>*(st *r">ahre>gcm_req_prt/a>(st *r238" class="li7e" name="71211"> 200<12a>           7     711re12a> >12a=es="216" class="li6e" name="61212"> 200<12a>}
ahre>gcm_req_priv_ctxreq,
(st *r2216" class="li7e" name="71213"> 200<12a>
 200<12a>static  *trem.cx" clc.cL2i"_fl> 170lass="sref"odde=d_ctxu. *trem.cx" chiltd="L2216" class="li7e" name="71215"> 200<12a>{
 200<12a>         200<12a>        ret7rn  >1217    _aead" " class="sr>*ahre/a> *  * f">re" class="sr>*>ahre>gcm_req_prtb>(st *r238" class="li7e" name="71218"> 200<12a>}
 200<12a>

>121       sizr" =/a>       re=ggrync_r=nc"atc_typef="cr*ahre/a> * 200<12a>static void7s>122clash_request" class="srahref=algyn#euthsi,
ahre/a> * 200<12a>static void7s>122asclas"sref">" class="sr>*ahre>gcm_req_prspawof( 200<12a>
ahre/a> * 200<12a>static int 7a hre72ode12a>s>122=sg_set_buuuulass="char">ahre/a> * 200<12a>           7     724de12a> >12aahash_clear_fu>err);
 200<12a>           7     72ak;12a> >1225="L159" class="li7e" name="71226"> 200<12a>           7     72ode12a> >12af="sref">u.req,
(st *r2216" class="li7e" name="71227"> 200<12a>           7     72   12a> >122  s="sref">ct">err);
req,
 200<12a>{
errreq,
 200<12a>        str7ct  >122her_r90" class="li6e" name="61230"> 200<12a>
u.pa>.u.(st="sref"tfrder238" class="li7e" name="71231"> 200<12a>        err);
re"sref">EVALSS ||  200<12a>           7     73   12a> >123d="L223" class="li6e" name="61233"> 200<12a>        )
req,
(st *r[1]2216" class="li7e" name="712a4"> 200<12a>
err);
req,
 200<12a>        ret7rn  >123  s="sref">reeeeeeeeeref">errreq,
 200<12a>}
 200<12a>
ctrre"hreofs>ahre/a> *ahre/a> *. 200<12a>static int 7a hre73ref12a>s>1238sde=err"    ">er!ahre/a> * 200<12L171>complete7/a>, 73="+12L17>123       sizr" class="sref">err);
re"sref">EVALSSNOMEMryptERR_PTRnameENOMEMsref2216" class="li7e" name="71240"> 200<12a>
 200<12a>        gcm_req_prspawof(req,
 200<12a>        if 7 >124ahash_clear_flags gcm_req_prclcreti"_flaspawof(req,
 200<12a>           7    <74ode12a> >124equest_set_crypt">)
*rabrskciphgrabi"_fl *trem.cx" clcgrabi"_flf">req,
 200<12a>           7     744  12a> >124ahash_clear_fu+codddddddddddddddddddahre/a> * *req,
u.gcm_req_pr,lgef="cindem.c# clclgesref>u.(st="sref"tfrder2L216" class="li7e" name="712a5"> 200<12a>           7    i74ak;12a> >124=""+code=er" u. 200<12a>           7     74   12a> >124f="sref">ugcm_req_prout>.cL2i href="cindem.c#LL1out>.cL2i hred="L216" class="li7e" name="712a7"> 200<12a>        }
<7 href74   12a> >124d="L238" class="li7e" name="712a8"> 200<12a>
req,
 200<12a>        if 7ss="ls="li12a> >124her_r90" class="li6e" name="61250"> 200<12a>           6    g65ode12a> >125> s="sref">ctrEVALSS ||  200<12a>
 200<12a>        /* We only support 16-byte bl> ks. */ id="L223" class="li6e" name="61253"> 200<12a>        u. *trem.cx" clai"_flf">r>ahrereqsiz,iv href="cr* 200<12a>           6     65m.c12a> >125ahash_clear_fu+coddddgoto lgcm_req_prout>dropi"lgf="cindem.c# clout>dropi"lgd="L216" class="li7e" name="71255"> 200<12a>         200<12a>        u      ="L170"L17 ala>/* Not a=" ceams=ipher? */ id="L223" class="li6e" name="61257"> 200<12a>           6     65   12a> >125  s="sref">ct">err);
 kshref="cr* kshrequest!= 1290" class="li6e" name="61258"> 200<12a>
gcm_req_prout>dropi"lgf="cindem.c# clout>dropi"lgd="L216" class="li7e" name="71259"> 200<12a> 200<12a>        ctrEVALSSNAMETOOLONGryptERR_PTRnameENAMETOOLONGd="L216" class="li7e" name="71261"> 200<12a>        ret6rn  >1261 s="sref">ct">err);
req,
 200<12a>}
u      ="L170" cing">"rfc4543(%s)" id="L2, lgcm_req_pr,lgf="cindem.c# clclgsref>u. 200<12a>
req,
 200<12a>static int 6a hre664de12a>s>126ahash_clear_fu+coddddddddd>      ="L170" cing">"rfc4543(%s)" id="L2, lgcm_req_pr,lgf="cindem.c# clclgsref>u. 200<12a>           6     66   12a> >126  s="sref">reeeeer 200<12a>{
ugcm_req_prout>dropi"lgf="cindem.c# clout>dropi"lgd="L216" class="li7e" name="71267"> 200<12a>        swi6ch (<66   12a> >126d="L238" class="li7e" name="712a8"> 200<12a>        cas6 4:
<66ref12a> >12acr 170   ahre>gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceai.crypto/gcm.c#L171" ceai.crypsref" class="sref"oddeALG_NAMALG_TYPE_AEADf="cr* 200<12a>        cas6 8:
<66ode12a> >126her_request_set_ctfrlen_done href="cindem.c#LL190" id=">u.ahrereqsiz,ceai.crypto/gcm.c#L171" ceai.crypsref"| class="sref"oddeclgf="cindem.c# clclgsref>u.pa>. 200<12a>        cas6 12:
67   12a> >127> s="sref">ctr 200<12a>        cas6 13:
67   12a> >1271sde=err"    ahre>gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceaibl> kshref="cr* kshrequest= 1216" class="li7e" name="71272"> 200<12a>        cas6 14:
67hre12a> >127ahash_clear_flags gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceain_done(st="sref"tfrdalaan_doner" class="sref"oddeclgf="cindem.c# clclgsref>u.(st="sref"tfrdalaan_doner216" class="li7e" name="71273"> 200<12a>        cas6 15:
67hre12a> >12aequest_set_crypt">)
plass="sref"odde=nc<="gnive_flatypef="cr*r216" class="li7e" name="71274"> 200<12a>        cas6 16:
67hre12a> >127d="L235" class="li6e" name="612a5"> 200<12a>           6    b67m.c12a> >127  s="sref">reqgcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceain_fl *trem.cx" clai"_flf">r>ahrereqsiz,iv href="cr* 200<12a>        def6ult:
67ode12a> >127f="sref">u.r>ahrereqsiz,maxn
 200<12a>           6    r67m.c12a> >127d="L238" class="li7e" name="71278"> 200<12a>        }
<6 href67ref12a> >127cr 170   ahre>gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceaictxshref="cr* 200<12a>
 200<12a>        ret6rn 0;680de12a> >128> s="sref">ctr(st *r216" class="li7e" name="71281"> 200<12a>}
gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceaiexonf="cr*(st *r216" class="li7e" name="71282"> 200<12a>
 200<12a>static void6)
r>ahrereqsiz,setkecode= href="+codsetkecsref" class="sref"odde=nc<="grfc4543 setkecode= href="+cod=nc<="grfc4543 setkecf">r216" class="li7e" name="71284"> 200<12a>           6     68 hr12a> >128ahash_clear_flags"gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceain_fl *trem.cx" clai"_flf">r>ahrereqsiz,setn
r216" class="li7e" name="71285"> 200<12a>           6     68ak;12a> >128  s="sref">reqgcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceain_fl *trem.cx" clai"_flf">r>ahrereqsiz,_n"li6eypto/gcm.c#_gcE_n"li6ef">r" class="sref"odde=nc<="grfc4543 en"li6eypto/gcm.c#_gcErskciphrfc4543 _n"li6ef">r216" class="li7e" name="71286"> 200<12a>{
u.r>ahrereqsiz,request *r" class="sref"odde=nc<="grfc4543 request *r216" class="li7e" name="71287"> 200<12a>        str6ct  >128d="L238" class="li7e" name="71288"> 200<12a>        str6ct  >128cr 170   ahre>gcm_req_pr href="cindem.c#LL190" id=">u.ahrereqsiz,ceain_fl *trem.cx" clai"_flf">r>ahrereqsiz,gen va/a> *trem.cx" gen vf">r" cl      ="L170" cing">"seqiv" id="L2216" class="li7e" name="71289"> 200<12a>        str6ct  >128her_r90" class="li6e" name="61290"> 200<12a>        str6ct  >129clashlgcm_req_proutf="cindem.c# cloutlash:90" class="li6e" name="61291"> 200<12a>         >12aasclas"sref">ref">err);
 200<12a>
 200<12a>        gcm_req_prout>dropi"lgf="cindem.c# clout>dropi"lgd="L:90" class="li6e" name="61294"> 200<12a>         *trem.cx" clcdropi"_flf">req,
 200<12a>
gcm_req_prout>.cL2i href="cindem.c#LL1out>.cL2i hred="L:90" class="li6e" name="61296"> 200<12a>        u.req,
 200<12a>        ctrreahrereqsiz,_crypto/gcm.c#_gcm_reqctx2216" class="li7e" name="71298"> 200<12a>         200<12a>
 200<1300">a href="c6ypto/699ef1300">130>="L159" class="li7e" name="71301"> 200<130>         >130d="L1_aead" _cryp="sr *re" class="srahref=algyn#euthsi,
ahre/a> * 200<130>
 200<130>        )
dropispawof(reahrereqsiz,=nc<="gcm_req_priv_ctx<="sref"odde=nc<="gcname=s="sref">req,
 200<130>        req,
 200<130>
 200<130>         200<130>         200<130>        "rfc4543" id="L2,16" class="li6e" name="61309"> 200<130>
r" class="sref"odde=nc<="grfc4543 all>  * f">r,16" class="li6e" name="61310"> 200<13a>           7     71m.c13a> >1310r 170   >ahrereqsiz,.cL2f="cindem.c#LL1.cL2f">r" class="sref"odde=nc<="grfc4543 .cL2f="cindem.c#LL1"gcm_rerfc4543 .cL2f">r,16" class="li6e" name="61311"> 200<13a>           7     711re13a> >1311r 170   >ahrereqsiz,modulef="cr*r" class="sref"oddeTHIS_MODULEf="cr*r,16" class="li6e" name="61312"> 200<13a>}
 200<13a>
 200<13a>static err);
re_cry290" class="li6e" name="61315"> 200<13a>{
 200<13a>         200<13a>        ret7rn  >131d="L238" class="li7e" name="71318"> 200<13a>}
r" class="sref"oddekzall>  * f">re16d >. 200<13a>

>131       sizr" ">er!ahre/a> *r290" class="li6e" name="61320"> 200<13a>static void7s>132clash_requests"sref">ref">er"sref">EVALSSNOMEMryptERR_PTRnameENOMEMsref216" class="li7e" name="71321"> 200<13a>static void7s>132d="L152" class="li7e" name="71322"> 200<13a>
*rabrskciphregisteratemplatef="cr*reef">plass="sref"odde=nc<="gnam_base tmplf="cindem.c#LL1"gcm_renam_base tmplsref2216" class="li7e" name="71323"> 200<13a>static int 7a hre72ode13a>s>132equest_set_cru);
 200<13a>           7     724de13a> >13aahash_clear_f0   goto lgcm_req_proutf="cindem.c# cloutlash216" class="li7e" name="71325"> 200<13a>           7     72ak;13a> >1325="L159" class="li7e" name="71326"> 200<13a>           7     72ode13a> >13af="sref">u.*rabrskciphregisteratemplatef="cr*reef">plass="sref"odde=nc<="gnam_tmplf="cindem.c#LL1"gcm_renam_tmplsref2216" class="li7e" name="71327"> 200<13a>           7     72   13a> >132  s="sref">ct">err);
 200<13a>{
gcm_req_prout>undo_basef="cr*undo_baselash216" class="li7e" name="71329"> 200<13a>        str7ct  >132her_r90" class="li6e" name="61330"> 200<13a>
ctr*rabrskciphregisteratemplatef="cr*reef">plass="sref"odde=nc<="grfc4106 tmplf="cindem.c#LL1"gcm_rerfc4106 tmplsref2216" class="li7e" name="71331"> 200<13a>        ct">err);
 200<13a>           7     73   13a> >133     undo_namlash216" class="li7e" name="71333"> 200<13a>         200<13a>
*rabrskciphregisteratemplatef="cr*reef">plass="sref"odde=nc<="grfc4543 tmplf="cindem.c#LL1"gcm_rerfc4543 tmpld="L2216" class="li7e" name="71335"> 200<13a>        ret7rn  >133  s="sref">re">err);
 200<13a>}
ugcm_req_prout>undo_rfc4106f="cr*undo_rfc4106lash216" class="li7e" name="71337"> 200<13a>
 200<13a>static int 7a hre73ref13a>s>1338sde=err"    ref">er0190" class="li7e" name="713a9"> 200<13L171>complete7/a>, 73="+13L17>133her_r90" class="li6e" name="61340"> 200<13a>
undo_rfc4106lash:90" class="li6e" name="613a1"> 200<13a>        gcm_req_pr"gcm_reunregisteratemplatef="cr*reef">plass="sref"odde=nc<="grfc4106 tmplf="cindem.c#LL1"gcm_rerfc4106 tmplsref2216" class="li7e" name="713a2"> 200<13a>        if 7 >134ahashlgcm_req_prout>undo_namf="cr*undo_namlash:90" class="li6e" name="613a3"> 200<13a>           7    <74ode13a> >134equest_set_crypt">)
reef">plass="sref"odde=nc<="gnam_tmplf="cindem.c#LL1"gcm_renam_tmplsref2216" class="li7e" name="713a4"> 200<13a>           7     744  13a> >134ahashlgcm_req_prout>undo_basef="cr*undo_baselash:90" class="li6e" name="613a5"> 200<13a>           7    i74ak;13a> >134=""+code=er" ypt">)
reef">plass="sref"odde=nc<="gnam_base tmplf="cindem.c#LL1"gcm_renam_base tmplsref2216" class="li7e" name="71346"> 200<13a>           7     74   13a> >134f="srlgcm_req_proutf="cindem.c# cloutlash:90" class="li6e" name="613a7"> 200<13a>        }
<7 href74   13a> >134  s="sref">ctrreq,
r2216" class="li7e" name="71348"> 200<13a>
err);
 200<13a>        if 7ss="ls="li13a> >134her_r207" class="li6e" name="61350"> 200<13a>           6    g65ode13a> >135>="L159" class="li7e" name="71351"> 200<13a>
re_cry290" class="li6e" name="61352"> 200<13a>         200<13a>        )
req,
r2216" class="li7e" name="71354"> 200<13a>           6     65m.c13a> >135ahash_clear_flags"gcm_req_prdec52" unregisteratemplatef="cr*reef">plass="sref"odde=nc<="grfc4543 tmplf="cindem.c#LL1"gcm_rerfc4543 tmpld="L2216" class="li7e" name="71355"> 200<13a>        )
reef">plass="sref"odde=nc<="grfc4106 tmplf="cindem.c#LL1"gcm_rerfc4106 tmplsref2216" class="li7e" name="71356"> 200<13a>        u.reef">plass="sref"odde=nc<="gnam_tmplf="cindem.c#LL1"gcm_renam_tmplsref2216" class="li7e" name="71357"> 200<13a>           6     65   13a> >135  s="sref">ctrreef">plass="sref"odde=nc<="gnam_base tmplf="cindem.c#LL1"gcm_renam_base tmplsref2216" class="li7e" name="71358"> 200<13a>
 200<13a> 200<13a>        relass="sref"odde=nc<="gnam_modulei_donf="cr*r2216" class="li7e" name="71361"> 200<13a>        ret6rn  >1361 s="lgcm_req_prmoduleiexonf="cr*relass="sref"odde=nc<="gnam_moduleiexonf="cr*r2216" class="li7e" name="71362"> 200<13a>}
 200<13a>
gcm_req_prMODULE_LICENSEf="cr*rel      ="L170" cing">"GPL" id="L22216" class="li7e" name="71364"> 200<13a>static int 6a hre664de13a>s>136ahashlgcm_req_prMODULE_DESCRIPTIONa/a> *trem.cx" MODULE_DESCRIPTIONf">rel      ="L170" cing">"Galois/Counter Mq_p" id="L22216" class="li7e" name="71365"> 200<13a>           6     66   13a> >136=""+clgcm_req_prMODULE_AUTHOcryptERR_PTRnameMODULE_AUTHOcf">rel      ="L170" cing">"Mikko H" ianen <mh1@iki.fiu 200<13a>{
gcm_req_prMODULE_ALIASryptERR_PTRnameMODULE_ALIASf">rel      ="L170" cing">"nam_base" id="L22216" class="li7e" name="71367"> 200<13a>        swi6ch (<66   13a> >136d="L2lgcm_req_prMODULE_ALIASryptERR_PTRnameMODULE_ALIASf">rel      ="L170" cing">"rfc4106" id="L22216" class="li7e" name="71368"> 200<13a>        cas6 4:
<66ref13a> >13acr 17lgcm_req_prMODULE_ALIASryptERR_PTRnameMODULE_ALIASf">rel      ="L170" cing">"rfc4543" id="L22216" class="li7e" name="71369"> 200<13a>        cas6 8:
<66ode13a> >136her_r


The original LXR software by the 6" class=http://sourceforge.net/projects/lxr">LXR "L17unitcsref, this experi7 alal version by 6" class=mailto:lxr@as6ux.no">lxr@as6ux.nosref.
lxr.as6ux.no kindly hosted by 6" class=http://www.redpill-as6pro.no">Redpill Ls6pro ASf">r, provider of Ls6uxulassulting and opereadass services since 1995.