linux/crypto/ablkcipher.c
<<
4" /spaion /formon a 4" href="../linux+v3.7.6/crypto/ablkcipher.c">4" img src="../.static/gfx/right.png" alt=">>">4" /spaion4" spai class="lxr_search">4" 4" input typluehidden" namluenavtarget" n value">4" input typluetext" namluesearch" iduesearch">4" butttiotypluesubmit">Search4" Prefsn /a>4" /spaion /divon form acopti="ajax+*" method="post" onsubmit="return false;">4" input typluehidden" namlueajax_lookup" idueajax_lookup" n value">4 /formon4 div class="headingbotttm">n div iduefile_contents"o
 
1 /a> spai class="comment">/* /spaion
 
2 /a> spai class="comment"> * Asynchronous block chaining cipher operaoptis. /spaion
 
3 /a> spai class="comment"> * /spaion
 
4 /a> spai class="comment"> * This is the asynchronous versptioof blkcipher.c indicaopng compleopti /spaion
 
5 /a> spai class="comment"> * via a callback. /spaion
 
6 /a> spai class="comment"> * /spaion
 
7 /a> spai class="comment"> * Copyright (c) 2006 Herbert Xu <herbert@gondor.apaia.org.au> /spaion
 
8 /a> spai class="comment"> * /spaion
 
9 /a> spai class="comment"> * This program is free software; you can redistribute it and/or modify it /spaion
 8.10a> spai class="comment"> * under the termsoof the GNU General Public License as published by the Free /spaion
 11 /a> spai class="comment"> * Software Foundaopti; either versptio2oof the License, or (at your opopti) /spaion
 12 /a> spai class="comment"> * any later verspti. /spaion
 13 /a> spai class="comment"> * /spaion
 14 /a> spai class="comment"> */ /spaion
 15 /a>n
 16 /a>#include <crypto/internal/skcipher.h /a>>n
 17 /a>#include <linux/cpumask.h /a>>n
 18 /a>#include <linux/err.h /a>>n
 19 /a>#include <linux/init.h /a>>n
 20 /a>#include <linux/kernel.h /a>>n
 21 /a>#include <linux/module.h /a>>n
 22 /a>#include <linux/rtnetlink.h /a>>n
 23 /a>#include <linux/sched.h /a>>n
 24 /a>#include <linux/slab.h /a>>n
 25 /a>#include <linux/seq_file.h /a>>n
 26 /a>#include <linux/cryptouser.h /a>>n
 27 /a>#include <net/netlink.h /a>>n
 28 /a>n
 29 /a>#include <crypto/scaoterwalk.h /a>>n
 30 /a>n
 31 /a>#include "internal.h /a>"n
 32 /a>n
 33 /a>static const char * a href="+code=skcipher_default_geniv" class="sref">skcipher_default_geniv /a>  a href="+code=__read_mostly" class="sref">__read_mostly /a>;n
 34 /a>n
 35 /a>struct  a href="+code=ablkcipher_buffer" class="sref">ablkcipher_buffer /a> {n
 36 /a>        struct  a href="+code=list_head" class="sref">list_head /a>         a href="+code=entry" class="sref">entry /a>;n
 37 /a>        struct  a href="+code=scaoter_walk" class="sref">scaoter_walk /a>      a href="+code=dst" class="sref">dst /a>;n
 38 /a>        unsigned int             a href="+code=len" class="sref">len /a>;n
 39 /a>        void                    * a href="+code=daoa" class="sref">daoa /a>;n
 40 /a>};n
 41 /a>n
 42 /a>enum {n
 43 /a>         a href="+code=ABLKCIPHER_WALK_SLOW" class="sref">ABLKCIPHER_WALK_SLOW /a> = 1 << 0,n
 44 /a>};n
 45 /a>n
 46 /a>static  a href="+code=inline" class="sref">inline /a> void  a href="+code=ablkcipher_buffer_write" class="sref">ablkcipher_buffer_write /a>(struct  a href="+code=ablkcipher_buffer" class="sref">ablkcipher_buffer /a> * a href="+code=p" class="sref">p /a>)n
 47 /a>{n
 48 /a>         a href="+code=scaoterwalk_copychunks" class="sref">scaoterwalk_copychunks /a>( a href="+code=p" class="sref">p /a>-> a href="+code=daoa" class="sref">daoa /a>, & a href="+code=p" class="sref">p /a>-> a href="+code=dst" class="sref">dst /a>,  a href="+code=p" class="sref">p /a>-> a href="+code=len" class="sref">len /a>, 1);n
 49 /a>}n
 50 /a>n
 51 /a>void  a href="+code=__ablkcipher_walk_compleoe" class="sref">__ablkcipher_walk_compleoe /a>(struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>)n
 52 /a>{n
 53 /a>        struct  a href="+code=ablkcipher_buffer" class="sref">ablkcipher_buffer /a> * a href="+code=p" class="sref">p /a>, * a href="+code=tmp" class="sref">tmp /a>;n
 54 /a>n
 55 /a>         a href="+code=list_for_each_entry_safe" class="sref">list_for_each_entry_safe /a>( a href="+code=p" class="sref">p /a>,  a href="+code=tmp" class="sref">tmp /a>, & a href="+code=walk" class="sref">walk /a>-> a href="+code=buffers" class="sref">buffers /a>,  a href="+code=entry" class="sref">entry /a>) {n
 56 /a>                 a href="+code=ablkcipher_buffer_write" class="sref">ablkcipher_buffer_write /a>( a href="+code=p" class="sref">p /a>);n
 57 /a>                 a href="+code=list_del" class="sref">list_del /a>(& a href="+code=p" class="sref">p /a>-> a href="+code=entry" class="sref">entry /a>);n
 58 /a>                 a href="+code=kfree" class="sref">kfree /a>( a href="+code=p" class="sref">p /a>);n
 59 /a>        }n
 60 /a>}n
 61 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=__ablkcipher_walk_compleoe" class="sref">__ablkcipher_walk_compleoe /a>);n
 62 /a>n
 63 /a>static  a href="+code=inline" class="sref">inline /a> void  a href="+code=ablkcipher_queue_write" class="sref">ablkcipher_queue_write /a>(struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>,n
 64 /a>                                          struct  a href="+code=ablkcipher_buffer" class="sref">ablkcipher_buffer /a> * a href="+code=p" class="sref">p /a>)n
 65 /a>{n
 66 /a>         a href="+code=p" class="sref">p /a>-> a href="+code=dst" class="sref">dst /a> =  a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>;n
 67 /a>         a href="+code=list_add_tail" class="sref">list_add_tail /a>(& a href="+code=p" class="sref">p /a>-> a href="+code=entry" class="sref">entry /a>, & a href="+code=walk" class="sref">walk /a>-> a href="+code=buffers" class="sref">buffers /a>);n
 68 /a>}n
 69 /a>n
 7.10a> spai class="comment">/* Get a spotoof the specified length that does notostraddle a page. /spaion
 71 /a> spai class="comment"> * The caller needs to ensure that there is enough space for this operaopti. /spaion
 72 /a> spai class="comment"> */ /spaion
 73 /a>static  a href="+code=inline" class="sref">inline /a>  a href="+code=u8" class="sref">u8 /a> * a href="+code=ablkcipher_get_spot" class="sref">ablkcipher_get_spot /a>( a href="+code=u8" class="sref">u8 /a> * a href="+code=start" class="sref">start /a>, unsigned int  a href="+code=len" class="sref">len /a>)n
 74 /a>{n
 75 /a>         a href="+code=u8" class="sref">u8 /a> * a href="+code=end_page" class="sref">end_page /a> = ( a href="+code=u8" class="sref">u8 /a> *)(((unsigned long)( a href="+code=start" class="sref">start /a> +  a href="+code=len" class="sref">len /a> - 1)) &  a href="+code=PAGE_MASK" class="sref">PAGE_MASK /a>);n
 76 /a>        return  a href="+code=max" class="sref">max /a>( a href="+code=start" class="sref">start /a>,  a href="+code=end_page" class="sref">end_page /a>);n
 77 /a>}n
 78 /a>n
 79 /a>static  a href="+code=inline" class="sref">inline /a> unsigned int  a href="+code=ablkcipher_done_slow" class="sref">ablkcipher_done_slow /a>(struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>,n
 80 /a>                                                unsigned int  a href="+code=bsize" class="sref">bsize /a>)n
 81 /a>{n
 82 /a>        unsigned int  a href="+code=n" class="sref">n /a> =  a href="+code=bsize" class="sref">bsize /a>;n
 83 /a>n
 84 /a>        for (;;) {n
 85 /a>                unsigned int  a href="+code=len_this_page" class="sref">len_this_page /a> =  a href="+code=scaoterwalk_pagelen" class="sref">scaoterwalk_pagelen /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>);n
 86 /a>n
 87 /a>                if ( a href="+code=len_this_page" class="sref">len_this_page /a> >  a href="+code=n" class="sref">n /a>)n
 88 /a>                         a href="+code=len_this_page" class="sref">len_this_page /a> =  a href="+code=n" class="sref">n /a>;n
 89 /a>                 a href="+code=scaoterwalk_advance" class="sref">scaoterwalk_advance /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>,  a href="+code=n" class="sref">n /a>);n
 90 /a>                if ( a href="+code=n" class="sref">n /a> ==  a href="+code=len_this_page" class="sref">len_this_page /a>)n
 91 /a>                        break;n
 92 /a>                 a href="+code=n" class="sref">n /a> -=  a href="+code=len_this_page" class="sref">len_this_page /a>;n
 93 /a>                 a href="+code=scaoterwalk_start" class="sref">scaoterwalk_start /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>,  a href="+code=scaoterwalk_sg_next" class="sref">scaoterwalk_sg_next /a>( a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>. a href="+code=sg" class="sref">sg /a>));n
 94 /a>        }n
 95 /a>n
 96 /a>        return  a href="+code=bsize" class="sref">bsize /a>;n
 97 /a>}n
 98 /a>n
 99 /a>static  a href="+code=inline" class="sref">inline /a> unsigned int  a href="+code=ablkcipher_done_fast" class="sref">ablkcipher_done_fast /a>(struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>,n
100 /a>                                                unsigned int  a href="+code=n" class="sref">n /a>)n
101 /a>{n
102 /a>         a href="+code=scaoterwalk_advance" class="sref">scaoterwalk_advance /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>,  a href="+code=n" class="sref">n /a>);n
103 /a>         a href="+code=scaoterwalk_advance" class="sref">scaoterwalk_advance /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>,  a href="+code=n" class="sref">n /a>);n
104 /a>n
105 /a>        return  a href="+code=n" class="sref">n /a>;n
106 /a>}n
107 /a>n
108 /a>static int  a href="+code=ablkcipher_walk_next" class="sref">ablkcipher_walk_next /a>(struct  a href="+code=ablkcipher_request" class="sref">ablkcipher_request /a> * a href="+code=req" class="sref">req /a>,n
109 /a>                                struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>);n
110 /a>n
111 /a>int  a href="+code=ablkcipher_walk_done" class="sref">ablkcipher_walk_done /a>(struct  a href="+code=ablkcipher_request" class="sref">ablkcipher_request /a> * a href="+code=req" class="sref">req /a>,n
112 /a>                         struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>, int  a href="+code=err" class="sref">err /a>)n
113 /a>{n
114 /a>        struct  a href="+code=crypto_tfm" class="sref">crypto_tfm /a> * a href="+code=tfm" class="sref">tfm /a> =  a href="+code=req" class="sref">req /a>-> a href="+code=base" class="sref">base /a>. a href="+code=tfm" class="sref">tfm /a>;n
115 /a>        unsigned int  a href="+code=nbytes" class="sref">nbytes /a> = 0;n
116 /a>n
117 /a>        if ( a href="+code=likely" class="sref">likely /a>( a href="+code=err" class="sref">err /a> >= 0)) {n
118 /a>                unsigned int  a href="+code=n" class="sref">n /a> =  a href="+code=walk" class="sref">walk /a>-> a href="+code=nbytes" class="sref">nbytes /a> -  a href="+code=err" class="sref">err /a>;n
119 /a>n
120 /a>                if ( a href="+code=likely" class="sref">likely /a>(!( a href="+code=walk" class="sref">walk /a>-> a href="+code=flags" class="sref">flags /a> &  a href="+code=ABLKCIPHER_WALK_SLOW" class="sref">ABLKCIPHER_WALK_SLOW /a>)))n
121 /a>                         a href="+code=n" class="sref">n /a> =  a href="+code=ablkcipher_done_fast" class="sref">ablkcipher_done_fast /a>( a href="+code=walk" class="sref">walk /a>,  a href="+code=n" class="sref">n /a>);n
122 /a>                else if ( a href="+code=WARN_ON" class="sref">WARN_ON /a>( a href="+code=err" class="sref">err /a>)) {n
123 /a>                         a href="+code=err" class="sref">err /a> = - a href="+code=EINVAL" class="sref">EINVAL /a>;n
124 /a>                        goto  a href="+code=err" class="sref">err /a>;n
125 /a>                } elsen
126 /a>                         a href="+code=n" class="sref">n /a> =  a href="+code=ablkcipher_done_slow" class="sref">ablkcipher_done_slow /a>( a href="+code=walk" class="sref">walk /a>,  a href="+code=n" class="sref">n /a>);n
127 /a>n
128 /a>                 a href="+code=nbytes" class="sref">nbytes /a> =  a href="+code=walk" class="sref">walk /a>-> a href="+code=total" class="sref">total /a> -  a href="+code=n" class="sref">n /a>;n
129 /a>                 a href="+code=err" class="sref">err /a> = 0;n
130 /a>        }n
131 /a>n
132 /a>         a href="+code=scaoterwalk_done" class="sref">scaoterwalk_done /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>, 0,  a href="+code=nbytes" class="sref">nbytes /a>);n
133 /a>         a href="+code=scaoterwalk_done" class="sref">scaoterwalk_done /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>, 1,  a href="+code=nbytes" class="sref">nbytes /a>);n
134 /a>n
135 /a> a href="+code=err" class="sref">err /a>:n
136 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=total" class="sref">total /a> =  a href="+code=nbytes" class="sref">nbytes /a>;n
137 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=nbytes" class="sref">nbytes /a> =  a href="+code=nbytes" class="sref">nbytes /a>;n
138 /a>n
139 /a>        if ( a href="+code=nbytes" class="sref">nbytes /a>) {n
140 /a>                 a href="+code=crypto_yield" class="sref">crypto_yield /a>( a href="+code=req" class="sref">req /a>-> a href="+code=base" class="sref">base /a>. a href="+code=flags" class="sref">flags /a>);n
141 /a>                return  a href="+code=ablkcipher_walk_next" class="sref">ablkcipher_walk_next /a>( a href="+code=req" class="sref">req /a>,  a href="+code=walk" class="sref">walk /a>);n
142 /a>        }n
143 /a>n
144 /a>        if ( a href="+code=walk" class="sref">walk /a>-> a href="+code=iv" class="sref">iv /a> !=  a href="+code=req" class="sref">req /a>-> a href="+code=info" class="sref">info /a>)n
145 /a>                 a href="+code=memcpy" class="sref">memcpy /a>( a href="+code=req" class="sref">req /a>-> a href="+code=info" class="sref">info /a>,  a href="+code=walk" class="sref">walk /a>-> a href="+code=iv" class="sref">iv /a>,  a href="+code=tfm" class="sref">tfm /a>-> a href="+code=crt_ablkcipher" class="sref">crt_ablkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a>);n
146 /a>         a href="+code=kfree" class="sref">kfree /a>( a href="+code=walk" class="sref">walk /a>-> a href="+code=iv_buffer" class="sref">iv_buffer /a>);n
147 /a>n
148 /a>        return  a href="+code=err" class="sref">err /a>;n
149 /a>}n
150 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=ablkcipher_walk_done" class="sref">ablkcipher_walk_done /a>);n
151 /a>n
152 /a>static  a href="+code=inline" class="sref">inline /a> int  a href="+code=ablkcipher_next_slow" class="sref">ablkcipher_next_slow /a>(struct  a href="+code=ablkcipher_request" class="sref">ablkcipher_request /a> * a href="+code=req" class="sref">req /a>,n
153 /a>                                       struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>,n
154 /a>                                       unsigned int  a href="+code=bsize" class="sref">bsize /a>,n
155 /a>                                       unsigned int  a href="+code=alignmask" class="sref">alignmask /a>,n
156 /a>                                       void ** a href="+code=src_p" class="sref">src_p /a>, void ** a href="+code=dst_p" class="sref">dst_p /a>)n
157 /a>{n
158 /a>        unsigned  a href="+code=aligned_bsize" class="sref">aligned_bsize /a> =  a href="+code=ALIGN" class="sref">ALIGN /a>( a href="+code=bsize" class="sref">bsize /a>,  a href="+code=alignmask" class="sref">alignmask /a> + 1);n
159 /a>        struct  a href="+code=ablkcipher_buffer" class="sref">ablkcipher_buffer /a> * a href="+code=p" class="sref">p /a>;n
160 /a>        void * a href="+code=src" class="sref">src /a>, * a href="+code=dst" class="sref">dst /a>, * a href="+code=base" class="sref">base /a>;n
161 /a>        unsigned int  a href="+code=n" class="sref">n /a>;n
162 /a>n
163 /a>         a href="+code=n" class="sref">n /a> =  a href="+code=ALIGN" class="sref">ALIGN /a>(sizeof(struct  a href="+code=ablkcipher_buffer" class="sref">ablkcipher_buffer /a>),  a href="+code=alignmask" class="sref">alignmask /a> + 1);n
164 /a>         a href="+code=n" class="sref">n /a> += ( a href="+code=aligned_bsize" class="sref">aligned_bsize /a> * 3 - ( a href="+code=alignmask" class="sref">alignmask /a> + 1) +n
165 /a>              ( a href="+code=alignmask" class="sref">alignmask /a> & ~( a href="+code=crypto_tfm_ctx_alignment" class="sref">crypto_tfm_ctx_alignment /a>() - 1)));n
166 /a>n
167 /a>         a href="+code=p" class="sref">p /a> =  a href="+code=kmalloc" class="sref">kmalloc /a>( a href="+code=n" class="sref">n /a>,  a href="+code=GFP_ATOMIC" class="sref">GFP_ATOMIC /a>);n
168 /a>        if (! a href="+code=p" class="sref">p /a>)n
169 /a>                return  a href="+code=ablkcipher_walk_done" class="sref">ablkcipher_walk_done /a>( a href="+code=req" class="sref">req /a>,  a href="+code=walk" class="sref">walk /a>, - a href="+code=ENOMEM" class="sref">ENOMEM /a>);n
170 /a>n
171 /a>         a href="+code=base" class="sref">base /a> =  a href="+code=p" class="sref">p /a> + 1;n
172 /a>n
173 /a>         a href="+code=dst" class="sref">dst /a> = ( a href="+code=u8" class="sref">u8 /a> *) a href="+code=ALIGN" class="sref">ALIGN /a>((unsigned long) a href="+code=base" class="sref">base /a>,  a href="+code=alignmask" class="sref">alignmask /a> + 1);n
174 /a>         a href="+code=src" class="sref">src /a> =  a href="+code=dst" class="sref">dst /a> =  a href="+code=ablkcipher_get_spot" class="sref">ablkcipher_get_spot /a>( a href="+code=dst" class="sref">dst /a>,  a href="+code=bsize" class="sref">bsize /a>);n
175 /a>n
176 /a>         a href="+code=p" class="sref">p /a>-> a href="+code=len" class="sref">len /a> =  a href="+code=bsize" class="sref">bsize /a>;n
177 /a>         a href="+code=p" class="sref">p /a>-> a href="+code=daoa" class="sref">daoa /a> =  a href="+code=dst" class="sref">dst /a>;n
178 /a>n
179 /a>         a href="+code=scaoterwalk_copychunks" class="sref">scaoterwalk_copychunks /a>( a href="+code=src" class="sref">src /a>, & a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>,  a href="+code=bsize" class="sref">bsize /a>, 0);n
180 /a>n
181 /a>         a href="+code=ablkcipher_queue_write" class="sref">ablkcipher_queue_write /a>( a href="+code=walk" class="sref">walk /a>,  a href="+code=p" class="sref">p /a>);n
182 /a>n
183 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=nbytes" class="sref">nbytes /a> =  a href="+code=bsize" class="sref">bsize /a>;n
184 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=flags" class="sref">flags /a> |=  a href="+code=ABLKCIPHER_WALK_SLOW" class="sref">ABLKCIPHER_WALK_SLOW /a>;n
185 /a>n
186 /a>        * a href="+code=src_p" class="sref">src_p /a> =  a href="+code=src" class="sref">src /a>;n
187 /a>        * a href="+code=dst_p" class="sref">dst_p /a> =  a href="+code=dst" class="sref">dst /a>;n
188 /a>n
189 /a>        return 0;n
190 /a>}n
191 /a>n
192 /a>static  a href="+code=inline" class="sref">inline /a> int  a href="+code=ablkcipher_copy_iv" class="sref">ablkcipher_copy_iv /a>(struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>,n
193 /a>                                     struct  a href="+code=crypto_tfm" class="sref">crypto_tfm /a> * a href="+code=tfm" class="sref">tfm /a>,n
194 /a>                                     unsigned int  a href="+code=alignmask" class="sref">alignmask /a>)n
195 /a>{n
196 /a>        unsigned  a href="+code=bs" class="sref">bs /a> =  a href="+code=walk" class="sref">walk /a>-> a href="+code=blocksize" class="sref">blocksize /a>;n
197 /a>        unsigned int  a href="+code=ivsize" class="sref">ivsize /a> =  a href="+code=tfm" class="sref">tfm /a>-> a href="+code=crt_ablkcipher" class="sref">crt_ablkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a>;n
198 /a>        unsigned  a href="+code=aligned_bs" class="sref">aligned_bs /a> =  a href="+code=ALIGN" class="sref">ALIGN /a>( a href="+code=bs" class="sref">bs /a>,  a href="+code=alignmask" class="sref">alignmask /a> + 1);n
199 /a>        unsigned int  a href="+code=size" class="sref">size /a> =  a href="+code=aligned_bs" class="sref">aligned_bs /a> * 2 +  a href="+code=ivsize" class="sref">ivsize /a> +  a href="+code=max" class="sref">max /a>( a href="+code=aligned_bs" class="sref">aligned_bs /a>,  a href="+code=ivsize" class="sref">ivsize /a>) -n
200 /a>                            ( a href="+code=alignmask" class="sref">alignmask /a> + 1);n
201 /a>         a href="+code=u8" class="sref">u8 /a> * a href="+code=iv" class="sref">iv /a>;n
202 /a>n
203 /a>         a href="+code=size" class="sref">size /a> +=  a href="+code=alignmask" class="sref">alignmask /a> & ~( a href="+code=crypto_tfm_ctx_alignment" class="sref">crypto_tfm_ctx_alignment /a>() - 1);n
204 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=iv_buffer" class="sref">iv_buffer /a> =  a href="+code=kmalloc" class="sref">kmalloc /a>( a href="+code=size" class="sref">size /a>,  a href="+code=GFP_ATOMIC" class="sref">GFP_ATOMIC /a>);n
205 /a>        if (! a href="+code=walk" class="sref">walk /a>-> a href="+code=iv_buffer" class="sref">iv_buffer /a>)n
206 /a>                return - a href="+code=ENOMEM" class="sref">ENOMEM /a>;n
207 /a>n
208 /a>         a href="+code=iv" class="sref">iv /a> = ( a href="+code=u8" class="sref">u8 /a> *) a href="+code=ALIGN" class="sref">ALIGN /a>((unsigned long) a href="+code=walk" class="sref">walk /a>-> a href="+code=iv_buffer" class="sref">iv_buffer /a>,  a href="+code=alignmask" class="sref">alignmask /a> + 1);n
209 /a>         a href="+code=iv" class="sref">iv /a> =  a href="+code=ablkcipher_get_spot" class="sref">ablkcipher_get_spot /a>( a href="+code=iv" class="sref">iv /a>,  a href="+code=bs" class="sref">bs /a>) +  a href="+code=aligned_bs" class="sref">aligned_bs /a>;n
210 /a>         a href="+code=iv" class="sref">iv /a> =  a href="+code=ablkcipher_get_spot" class="sref">ablkcipher_get_spot /a>( a href="+code=iv" class="sref">iv /a>,  a href="+code=bs" class="sref">bs /a>) +  a href="+code=aligned_bs" class="sref">aligned_bs /a>;n
211 /a>         a href="+code=iv" class="sref">iv /a> =  a href="+code=ablkcipher_get_spot" class="sref">ablkcipher_get_spot /a>( a href="+code=iv" class="sref">iv /a>,  a href="+code=ivsize" class="sref">ivsize /a>);n
212 /a>n
213 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=iv" class="sref">iv /a> =  a href="+code=memcpy" class="sref">memcpy /a>( a href="+code=iv" class="sref">iv /a>,  a href="+code=walk" class="sref">walk /a>-> a href="+code=iv" class="sref">iv /a>,  a href="+code=ivsize" class="sref">ivsize /a>);n
214 /a>        return 0;n
215 /a>}n
216 /a>n
217 /a>static  a href="+code=inline" class="sref">inline /a> int  a href="+code=ablkcipher_next_fast" class="sref">ablkcipher_next_fast /a>(struct  a href="+code=ablkcipher_request" class="sref">ablkcipher_request /a> * a href="+code=req" class="sref">req /a>,n
218 /a>                                       struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>)n
219 /a>{n
220 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=src" class="sref">src /a>. a href="+code=page" class="sref">page /a> =  a href="+code=scaoterwalk_page" class="sref">scaoterwalk_page /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>);n
221 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=src" class="sref">src /a>. a href="+code=offset" class="sref">offset /a> =  a href="+code=offset_in_page" class="sref">offset_in_page /a>( a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>. a href="+code=offset" class="sref">offset /a>);n
222 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=dst" class="sref">dst /a>. a href="+code=page" class="sref">page /a> =  a href="+code=scaoterwalk_page" class="sref">scaoterwalk_page /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>);n
223 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=dst" class="sref">dst /a>. a href="+code=offset" class="sref">offset /a> =  a href="+code=offset_in_page" class="sref">offset_in_page /a>( a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>. a href="+code=offset" class="sref">offset /a>);n
224 /a>n
225 /a>        return 0;n
226 /a>}n
227 /a>n
228 /a>static int  a href="+code=ablkcipher_walk_next" class="sref">ablkcipher_walk_next /a>(struct  a href="+code=ablkcipher_request" class="sref">ablkcipher_request /a> * a href="+code=req" class="sref">req /a>,n
229 /a>                                struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>)n
230 /a>{n
231 /a>        struct  a href="+code=crypto_tfm" class="sref">crypto_tfm /a> * a href="+code=tfm" class="sref">tfm /a> =  a href="+code=req" class="sref">req /a>-> a href="+code=base" class="sref">base /a>. a href="+code=tfm" class="sref">tfm /a>;n
232 /a>        unsigned int  a href="+code=alignmask" class="sref">alignmask /a>,  a href="+code=bsize" class="sref">bsize /a>,  a href="+code=n" class="sref">n /a>;n
233 /a>        void * a href="+code=src" class="sref">src /a>, * a href="+code=dst" class="sref">dst /a>;n
234 /a>        int  a href="+code=err" class="sref">err /a>;n
235 /a>n
236 /a>         a href="+code=alignmask" class="sref">alignmask /a> =  a href="+code=crypto_tfm_alg_alignmask" class="sref">crypto_tfm_alg_alignmask /a>( a href="+code=tfm" class="sref">tfm /a>);n
237 /a>         a href="+code=n" class="sref">n /a> =  a href="+code=walk" class="sref">walk /a>-> a href="+code=total" class="sref">total /a>;n
238 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>( a href="+code=n" class="sref">n /a> <  a href="+code=crypto_tfm_alg_blocksize" class="sref">crypto_tfm_alg_blocksize /a>( a href="+code=tfm" class="sref">tfm /a>))) {n
239 /a>                 a href="+code=req" class="sref">req /a>-> a href="+code=base" class="sref">base /a>. a href="+code=flags" class="sref">flags /a> |=  a href="+code=CRYPTO_TFM_RES_BAD_BLOCK_LEN" class="sref">CRYPTO_TFM_RES_BAD_BLOCK_LEN /a>;n
240 /a>                return  a href="+code=ablkcipher_walk_done" class="sref">ablkcipher_walk_done /a>( a href="+code=req" class="sref">req /a>,  a href="+code=walk" class="sref">walk /a>, - a href="+code=EINVAL" class="sref">EINVAL /a>);n
241 /a>        }n
242 /a>n
243 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=flags" class="sref">flags /a> &= ~ a href="+code=ABLKCIPHER_WALK_SLOW" class="sref">ABLKCIPHER_WALK_SLOW /a>;n
244 /a>         a href="+code=src" class="sref">src /a> =  a href="+code=dst" class="sref">dst /a> =  a href="+code=NULL" class="sref">NULL /a>;n
245 /a>n
246 /a>         a href="+code=bsize" class="sref">bsize /a> =  a href="+code=min" class="sref">min /a>( a href="+code=walk" class="sref">walk /a>-> a href="+code=blocksize" class="sref">blocksize /a>,  a href="+code=n" class="sref">n /a>);n
247 /a>         a href="+code=n" class="sref">n /a> =  a href="+code=scaoterwalk_clamp" class="sref">scaoterwalk_clamp /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>,  a href="+code=n" class="sref">n /a>);n
248 /a>         a href="+code=n" class="sref">n /a> =  a href="+code=scaoterwalk_clamp" class="sref">scaoterwalk_clamp /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>,  a href="+code=n" class="sref">n /a>);n
249 /a>n
250 /a>        if ( a href="+code=n" class="sref">n /a> <  a href="+code=bsize" class="sref">bsize /a> ||n
251 /a>            ! a href="+code=scaoterwalk_aligned" class="sref">scaoterwalk_aligned /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>,  a href="+code=alignmask" class="sref">alignmask /a>) ||n
252 /a>            ! a href="+code=scaoterwalk_aligned" class="sref">scaoterwalk_aligned /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>,  a href="+code=alignmask" class="sref">alignmask /a>)) {n
253 /a>                 a href="+code=err" class="sref">err /a> =  a href="+code=ablkcipher_next_slow" class="sref">ablkcipher_next_slow /a>( a href="+code=req" class="sref">req /a>,  a href="+code=walk" class="sref">walk /a>,  a href="+code=bsize" class="sref">bsize /a>,  a href="+code=alignmask" class="sref">alignmask /a>,n
254 /a>                                           & a href="+code=src" class="sref">src /a>, & a href="+code=dst" class="sref">dst /a>);n
255 /a>                goto  a href="+code=set_phys_lowmem" class="sref">set_phys_lowmem /a>;n
256 /a>        }n
257 /a>n
258 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=nbytes" class="sref">nbytes /a> =  a href="+code=n" class="sref">n /a>;n
259 /a>n
260 /a>        return  a href="+code=ablkcipher_next_fast" class="sref">ablkcipher_next_fast /a>( a href="+code=req" class="sref">req /a>,  a href="+code=walk" class="sref">walk /a>);n
261 /a>n
262 /a> a href="+code=set_phys_lowmem" class="sref">set_phys_lowmem /a>:n
263 /a>        if ( a href="+code=err" class="sref">err /a> >= 0) {n
264 /a>                 a href="+code=walk" class="sref">walk /a>-> a href="+code=src" class="sref">src /a>. a href="+code=page" class="sref">page /a> =  a href="+code=virt_to_page" class="sref">virt_to_page /a>( a href="+code=src" class="sref">src /a>);n
265 /a>                 a href="+code=walk" class="sref">walk /a>-> a href="+code=dst" class="sref">dst /a>. a href="+code=page" class="sref">page /a> =  a href="+code=virt_to_page" class="sref">virt_to_page /a>( a href="+code=dst" class="sref">dst /a>);n
266 /a>                 a href="+code=walk" class="sref">walk /a>-> a href="+code=src" class="sref">src /a>. a href="+code=offset" class="sref">offset /a> = ((unsigned long) a href="+code=src" class="sref">src /a> & ( a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE /a> - 1));n
267 /a>                 a href="+code=walk" class="sref">walk /a>-> a href="+code=dst" class="sref">dst /a>. a href="+code=offset" class="sref">offset /a> = ((unsigned long) a href="+code=dst" class="sref">dst /a> & ( a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE /a> - 1));n
268 /a>        }n
269 /a>n
270 /a>        return  a href="+code=err" class="sref">err /a>;n
271 /a>}n
272 /a>n
273 /a>static int  a href="+code=ablkcipher_walk_first" class="sref">ablkcipher_walk_first /a>(struct  a href="+code=ablkcipher_request" class="sref">ablkcipher_request /a> * a href="+code=req" class="sref">req /a>,n
274 /a>                                 struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>)n
275 /a>{n
276 /a>        struct  a href="+code=crypto_tfm" class="sref">crypto_tfm /a> * a href="+code=tfm" class="sref">tfm /a> =  a href="+code=req" class="sref">req /a>-> a href="+code=base" class="sref">base /a>. a href="+code=tfm" class="sref">tfm /a>;n
277 /a>        unsigned int  a href="+code=alignmask" class="sref">alignmask /a>;n
278 /a>n
279 /a>         a href="+code=alignmask" class="sref">alignmask /a> =  a href="+code=crypto_tfm_alg_alignmask" class="sref">crypto_tfm_alg_alignmask /a>( a href="+code=tfm" class="sref">tfm /a>);n
280 /a>        if ( a href="+code=WARN_ON_ONCE" class="sref">WARN_ON_ONCE /a>( a href="+code=in_irq" class="sref">in_irq /a>()))n
281 /a>                return - a href="+code=EDEADLK" class="sref">EDEADLK /a>;n
282 /a>n
283 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=nbytes" class="sref">nbytes /a> =  a href="+code=walk" class="sref">walk /a>-> a href="+code=total" class="sref">total /a>;n
284 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>(! a href="+code=walk" class="sref">walk /a>-> a href="+code=total" class="sref">total /a>))n
285 /a>                return 0;n
286 /a>n
287 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=iv_buffer" class="sref">iv_buffer /a> =  a href="+code=NULL" class="sref">NULL /a>;n
288 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=iv" class="sref">iv /a> =  a href="+code=req" class="sref">req /a>-> a href="+code=info" class="sref">info /a>;n
289 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>(((unsigned long) a href="+code=walk" class="sref">walk /a>-> a href="+code=iv" class="sref">iv /a> &  a href="+code=alignmask" class="sref">alignmask /a>))) {n
290 /a>                int  a href="+code=err" class="sref">err /a> =  a href="+code=ablkcipher_copy_iv" class="sref">ablkcipher_copy_iv /a>( a href="+code=walk" class="sref">walk /a>,  a href="+code=tfm" class="sref">tfm /a>,  a href="+code=alignmask" class="sref">alignmask /a>);n
291 /a>                if ( a href="+code=err" class="sref">err /a>)n
292 /a>                        return  a href="+code=err" class="sref">err /a>;n
293 /a>        }n
294 /a>n
295 /a>         a href="+code=scaoterwalk_start" class="sref">scaoterwalk_start /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>,  a href="+code=walk" class="sref">walk /a>-> a href="+code=in" class="sref">in /a>. a href="+code=sg" class="sref">sg /a>);n
296 /a>         a href="+code=scaoterwalk_start" class="sref">scaoterwalk_start /a>(& a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>,  a href="+code=walk" class="sref">walk /a>-> a href="+code=out" class="sref">out /a>. a href="+code=sg" class="sref">sg /a>);n
297 /a>n
298 /a>        return  a href="+code=ablkcipher_walk_next" class="sref">ablkcipher_walk_next /a>( a href="+code=req" class="sref">req /a>,  a href="+code=walk" class="sref">walk /a>);n
299 /a>}n
300 /a>n
301 /a>int  a href="+code=ablkcipher_walk_phys" class="sref">ablkcipher_walk_phys /a>(struct  a href="+code=ablkcipher_request" class="sref">ablkcipher_request /a> * a href="+code=req" class="sref">req /a>,n
302 /a>                         struct  a href="+code=ablkcipher_walk" class="sref">ablkcipher_walk /a> * a href="+code=walk" class="sref">walk /a>)n
303 /a>{n
304 /a>         a href="+code=walk" class="sref">walk /a>-> a href="+code=blocksize" class="sref">blocksize /a> =  a href="+code=crypto_tfm_alg_blocksize" class="sref">crypto_tfm_alg_blocksize /a>( a href="+code=req" class="sref">req /a>-> a href="+code=base" class="sref">base /a>. a href="+code=tfm" class="sref">tfm /a>);n
305 /a>        return  a href="+code=ablkcipher_walk_first" class="sref">ablkcipher_walk_first /a>( a href="+code=req" class="sref">req /a>,  a href="+code=walk" class="sref">walk /a>);n
306 /a>}n
307 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=ablkcipher_walk_phys" class="sref">ablkcipher_walk_phys /a>);n
308 /a>n
309 /a>static int  a href="+code=setkey_unaligned" class="sref">setkey_unaligned /a>(struct  a href="+code=crypto_ablkcipher" class="sref">crypto_ablkcipher /a> * a href="+code=tfm" class="sref">tfm /a>, const  a href="+code=u8" class="sref">u8 /a> * a href="+code=key" class="sref">key /a>,n
310 /a>                            unsigned int  a href="+code=keylen" class="sref">keylen /a>)n
311 /a>{n
312 /a>        struct  a href="+code=ablkcipher_alg" class="sref">ablkcipher_alg /a> * a href="+code=cipher" class="sref">cipher /a> =  a href="+code=crypto_ablkcipher_alg" class="sref">crypto_ablkcipher_alg /a>( a href="+code=tfm" class="sref">tfm /a>);n
313 /a>        unsigned long  a href="+code=alignmask" class="sref">alignmask /a> =  a href="+code=crypto_ablkcipher_alignmask" class="sref">crypto_ablkcipher_alignmask /a>( a href="+code=tfm" class="sref">tfm /a>);n
314 /a>        int  a href="+code=ret" class="sref">ret /a>;n
315 /a>         a href="+code=u8" class="sref">u8 /a> * a href="+code=buffer" class="sref">buffer /a>, * a href="+code=alignbuffer" class="sref">alignbuffer /a>;n
316 /a>        unsigned long  a href="+code=absize" class="sref">absize /a>;n
317 /a>n
318 /a>         a href="+code=absize" class="sref">absize /a> =  a href="+code=keylen" class="sref">keylen /a> +  a href="+code=alignmask" class="sref">alignmask /a>;n
319 /a>         a href="+code=buffer" class="sref">buffer /a> =  a href="+code=kmalloc" class="sref">kmalloc /a>( a href="+code=absize" class="sref">absize /a>,  a href="+code=GFP_ATOMIC" class="sref">GFP_ATOMIC /a>);n
320 /a>        if (! a href="+code=buffer" class="sref">buffer /a>)n
321 /a>                return - a href="+code=ENOMEM" class="sref">ENOMEM /a>;n
322 /a>n
323 /a>         a href="+code=alignbuffer" class="sref">alignbuffer /a> = ( a href="+code=u8" class="sref">u8 /a> *) a href="+code=ALIGN" class="sref">ALIGN /a>((unsigned long) a href="+code=buffer" class="sref">buffer /a>,  a href="+code=alignmask" class="sref">alignmask /a> + 1);n
324 /a>         a href="+code=memcpy" class="sref">memcpy /a>( a href="+code=alignbuffer" class="sref">alignbuffer /a>,  a href="+code=key" class="sref">key /a>,  a href="+code=keylen" class="sref">keylen /a>);n
325 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=cipher" class="sref">cipher /a>-> a href="+code=setkey" class="sref">setkey /a>( a href="+code=tfm" class="sref">tfm /a>,  a href="+code=alignbuffer" class="sref">alignbuffer /a>,  a href="+code=keylen" class="sref">keylen /a>);n
326 /a>         a href="+code=memset" class="sref">memset /a>( a href="+code=alignbuffer" class="sref">alignbuffer /a>, 0,  a href="+code=keylen" class="sref">keylen /a>);n
327 /a>         a href="+code=kfree" class="sref">kfree /a>( a href="+code=buffer" class="sref">buffer /a>);n
328 /a>        return  a href="+code=ret" class="sref">ret /a>;n
329 /a>}n
330 /a>n
331 /a>static int  a href="+code=setkey" class="sref">setkey /a>(struct  a href="+code=crypto_ablkcipher" class="sref">crypto_ablkcipher /a> * a href="+code=tfm" class="sref">tfm /a>, const  a href="+code=u8" class="sref">u8 /a> * a href="+code=key" class="sref">key /a>,n
332 /a>                  unsigned int  a href="+code=keylen" class="sref">keylen /a>)n
333 /a>{n
334 /a>        struct  a href="+code=ablkcipher_alg" class="sref">ablkcipher_alg /a> * a href="+code=cipher" class="sref">cipher /a> =  a href="+code=crypto_ablkcipher_alg" class="sref">crypto_ablkcipher_alg /a>( a href="+code=tfm" class="sref">tfm /a>);n
335 /a>        unsigned long  a href="+code=alignmask" class="sref">alignmask /a> =  a href="+code=crypto_ablkcipher_alignmask" class="sref">crypto_ablkcipher_alignmask /a>( a href="+code=tfm" class="sref">tfm /a>);n
336 /a>n
337 /a>        if ( a href="+code=keylen" class="sref">keylen /a> <  a href="+code=cipher" class="sref">cipher /a>-> a href="+code=min_keysize" class="sref">min_keysize /a> ||  a href="+code=keylen" class="sref">keylen /a> >  a href="+code=cipher" class="sref">cipher /a>-> a href="+code=max_keysize" class="sref">max_keysize /a>) {n
338 /a>                 a href="+code=crypto_ablkcipher_set_flags" class="sref">crypto_ablkcipher_set_flags /a>( a href="+code=tfm" class="sref">tfm /a>,  a href="+code=CRYPTO_TFM_RES_BAD_KEY_LEN" class="sref">CRYPTO_TFM_RES_BAD_KEY_LEN /a>);n
339 /a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;n
340 /a>        }n
341 /a>n
342 /a>        if ((unsigned long) a href="+code=key" class="sref">key /a> &  a href="+code=alignmask" class="sref">alignmask /a>)n
343 /a>                return  a href="+code=setkey_unaligned" class="sref">setkey_unaligned /a>( a href="+code=tfm" class="sref">tfm /a>,  a href="+code=key" class="sref">key /a>,  a href="+code=keylen" class="sref">keylen /a>);n
344 /a>n
345 /a>        return  a href="+code=cipher" class="sref">cipher /a>-> a href="+code=setkey" class="sref">setkey /a>( a href="+code=tfm" class="sref">tfm /a>,  a href="+code=key" class="sref">key /a>,  a href="+code=keylen" class="sref">keylen /a>);n
346 /a>}n
347 /a>n
348 /a>static unsigned int  a href="+code=crypto_ablkcipher_ctxsize" class="sref">crypto_ablkcipher_ctxsize /a>(struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=type" class="sref">type /a>,n
349 /a>                                               a href="+code=u32" class="sref">u32 /a>  a href="+code=mask" class="sref">mask /a>)n
350 /a>{n
351 /a>        return  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ctxsize" class="sref">cra_ctxsize /a>;n
352 /a>}n
353 /a>n
354 /a>int  a href="+code=skcipher_null_givencrypt" class="sref">skcipher_null_givencrypt /a>(struct  a href="+code=skcipher_givcrypt_request" class="sref">skcipher_givcrypt_request /a> * a href="+code=req" class="sref">req /a>)n
355 /a>{n
356 /a>        return  a href="+code=crypto_ablkcipher_encrypt" class="sref">crypto_ablkcipher_encrypt /a>(& a href="+code=req" class="sref">req /a>-> a href="+code=creq" class="sref">creq /a>);n
357 /a>}n
358 /a>n
359 /a>int  a href="+code=skcipher_null_givdecrypt" class="sref">skcipher_null_givdecrypt /a>(struct  a href="+code=skcipher_givcrypt_request" class="sref">skcipher_givcrypt_request /a> * a href="+code=req" class="sref">req /a>)n
360 /a>{n
361 /a>        return  a href="+code=crypto_ablkcipher_decrypt" class="sref">crypto_ablkcipher_decrypt /a>(& a href="+code=req" class="sref">req /a>-> a href="+code=creq" class="sref">creq /a>);n
362 /a>}n
363 /a>n
364 /a>static int  a href="+code=crypto_init_ablkcipher_ops" class="sref">crypto_init_ablkcipher_ops /a>(struct  a href="+code=crypto_tfm" class="sref">crypto_tfm /a> * a href="+code=tfm" class="sref">tfm /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=type" class="sref">type /a>,n
365 /a>                                       a href="+code=u32" class="sref">u32 /a>  a href="+code=mask" class="sref">mask /a>)n
366 /a>{n
367 /a>        struct  a href="+code=ablkcipher_alg" class="sref">ablkcipher_alg /a> * a href="+code=alg" class="sref">alg /a> = & a href="+code=tfm" class="sref">tfm /a>-> a href="+code=__crt_alg" class="sref">__crt_alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>;n
368 /a>        struct  a href="+code=ablkcipher_tfm" class="sref">ablkcipher_tfm /a> * a href="+code=crt" class="sref">crt /a> = & a href="+code=tfm" class="sref">tfm /a>-> a href="+code=crt_ablkcipher" class="sref">crt_ablkcipher /a>;n
369 /a>n
370 /a>        if ( a href="+code=alg" class="sref">alg /a>-> a href="+code=ivsize" class="sref">ivsize /a> >  a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE /a> / 8)n
371 /a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;n
372 /a>n
373 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=setkey" class="sref">setkey /a> =  a href="+code=setkey" class="sref">setkey /a>;n
374 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=encrypt" class="sref">encrypt /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=encrypt" class="sref">encrypt /a>;n
375 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=decrypt" class="sref">decrypt /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=decrypt" class="sref">decrypt /a>;n
376 /a>        if (! a href="+code=alg" class="sref">alg /a>-> a href="+code=ivsize" class="sref">ivsize /a>) {n
377 /a>                 a href="+code=crt" class="sref">crt /a>-> a href="+code=givencrypt" class="sref">givencrypt /a> =  a href="+code=skcipher_null_givencrypt" class="sref">skcipher_null_givencrypt /a>;n
378 /a>                 a href="+code=crt" class="sref">crt /a>-> a href="+code=givdecrypt" class="sref">givdecrypt /a> =  a href="+code=skcipher_null_givdecrypt" class="sref">skcipher_null_givdecrypt /a>;n
379 /a>        }n
380 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=base" class="sref">base /a> =  a href="+code=__crypto_ablkcipher_cast" class="sref">__crypto_ablkcipher_cast /a>( a href="+code=tfm" class="sref">tfm /a>);n
381 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=ivsize" class="sref">ivsize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=ivsize" class="sref">ivsize /a>;n
382 /a>n
383 /a>        return 0;n
384 /a>}n
385 /a>n
386 /a>#ifdef  a href="+code=CONFIG_NET" class="sref">CONFIG_NET /a>n
387 /a>static int  a href="+code=crypto_ablkcipher_report" class="sref">crypto_ablkcipher_report /a>(struct  a href="+code=sk_buff" class="sref">sk_buff /a> * a href="+code=skb" class="sref">skb /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
388 /a>{n
389 /a>        struct  a href="+code=crypto_report_blkcipher" class="sref">crypto_report_blkcipher /a>  a href="+code=rblkcipher" class="sref">rblkcipher /a>;n
390 /a>n
391 /a>         a href="+code=snprintf" class="sref">snprintf /a>( a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=type" class="sref">type /a>,  a href="+code=CRYPTO_MAX_ALG_NAME" class="sref">CRYPTO_MAX_ALG_NAME /a>,  span class="string">"%s",  span class="string">"ablkcipher");n
392 /a>         a href="+code=snprintf" class="sref">snprintf /a>( a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=geniv" class="sref">geniv /a>,  a href="+code=CRYPTO_MAX_ALG_NAME" class="sref">CRYPTO_MAX_ALG_NAME /a>,  span class="string">"%s",n
393 /a>                  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=geniv" class="sref">geniv /a> ?:  span class="string">"<default>");n
394 /a>n
395 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=blocksize" class="sref">blocksize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blocksize" class="sref">cra_blocksize /a>;n
396 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=min_keysize" class="sref">min_keysize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=min_keysize" class="sref">min_keysize /a>;n
397 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=max_keysize" class="sref">max_keysize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=max_keysize" class="sref">max_keysize /a>;n
398 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a>;n
399 /a>n
400 /a>        if ( a href="+code=nla_put" class="sref">nla_put /a>( a href="+code=skb" class="sref">skb /a>,  a href="+code=CRYPTOCFGA_REPORT_BLKCIPHER" class="sref">CRYPTOCFGA_REPORT_BLKCIPHER /a>,n
401 /a>                    sizeof(struct  a href="+code=crypto_report_blkcipher" class="sref">crypto_report_blkcipher /a>), & a href="+code=rblkcipher" class="sref">rblkcipher /a>))n
402 /a>                goto  a href="+code=nla_put_failure" class="sref">nla_put_failure /a>;n
403 /a>        return 0;n
404 /a>n
405 /a> a href="+code=nla_put_failure" class="sref">nla_put_failure /a>:n
406 /a>        return - a href="+code=EMSGSIZE" class="sref">EMSGSIZE /a>;n
407 /a>}n
408 /a>#elsen
409 /a>static int  a href="+code=crypto_ablkcipher_report" class="sref">crypto_ablkcipher_report /a>(struct  a href="+code=sk_buff" class="sref">sk_buff /a> * a href="+code=skb" class="sref">skb /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
410 /a>{n
411 /a>        return - a href="+code=ENOSYS" class="sref">ENOSYS /a>;n
412 /a>}n
413 /a>#endifn
414 /a>n
415 /a>static void  a href="+code=crypto_ablkcipher_show" class="sref">crypto_ablkcipher_show /a>(struct  a href="+code=seq_file" class="sref">seq_file /a> * a href="+code=m" class="sref">m /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
416 /a>         a href="+code=__attribute__" class="sref">__attribute__ /a> (( a href="+code=unused" class="sref">unused /a>));n
417 /a>static void  a href="+code=crypto_ablkcipher_show" class="sref">crypto_ablkcipher_show /a>(struct  a href="+code=seq_file" class="sref">seq_file /a> * a href="+code=m" class="sref">m /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
418 /a>{n
419 /a>        struct  a href="+code=ablkcipher_alg" class="sref">ablkcipher_alg /a> * a href="+code=ablkcipher" class="sref">ablkcipher /a> = & a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>;n
420 /a>n
421 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"type         : ablkcipher\n");n
422 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"async        : %s\n",  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_ASYNC" class="sref">CRYPTO_ALG_ASYNC /a> ?n
423 /a>                                              span class="string">"yes" :  span class="string">"no");n
424 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"blocksize    : %u\n",  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blocksize" class="sref">cra_blocksize /a>);n
425 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"min keysize  : %u\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=min_keysize" class="sref">min_keysize /a>);n
426 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"max keysize  : %u\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=max_keysize" class="sref">max_keysize /a>);n
427 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"ivsize       : %u\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=ivsize" class="sref">ivsize /a>);n
428 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"geniv        : %s\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=geniv" class="sref">geniv /a> ?:  span class="string">"<default>");n
429 /a>}n
430 /a>n
431 /a>const struct  a href="+code=crypto_type" class="sref">crypto_type /a>  a href="+code=crypto_ablkcipher_type" class="sref">crypto_ablkcipher_type /a> = {n
432 /a>        . a href="+code=ctxsize" class="sref">ctxsize /a> =  a href="+code=crypto_ablkcipher_ctxsize" class="sref">crypto_ablkcipher_ctxsize /a>,n
433 /a>        . a href="+code=init" class="sref">init /a> =  a href="+code=crypto_init_ablkcipher_ops" class="sref">crypto_init_ablkcipher_ops /a>,n
434 /a>#ifdef  a href="+code=CONFIG_PROC_FS" class="sref">CONFIG_PROC_FS /a>n
435 /a>        . a href="+code=show" class="sref">show /a> =  a href="+code=crypto_ablkcipher_show" class="sref">crypto_ablkcipher_show /a>,n
436 /a>#endifn
437 /a>        . a href="+code=report" class="sref">report /a> =  a href="+code=crypto_ablkcipher_report" class="sref">crypto_ablkcipher_report /a>,n
438 /a>};n
439 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=crypto_ablkcipher_type" class="sref">crypto_ablkcipher_type /a>);n
440 /a>n
441 /a>static int  a href="+code=no_givdecrypt" class="sref">no_givdecrypt /a>(struct  a href="+code=skcipher_givcrypt_request" class="sref">skcipher_givcrypt_request /a> * a href="+code=req" class="sref">req /a>)n
442 /a>{n
443 /a>        return - a href="+code=ENOSYS" class="sref">ENOSYS /a>;n
444 /a>}n
445 /a>n
446 /a>static int  a href="+code=crypto_init_givcipher_ops" class="sref">crypto_init_givcipher_ops /a>(struct  a href="+code=crypto_tfm" class="sref">crypto_tfm /a> * a href="+code=tfm" class="sref">tfm /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=type" class="sref">type /a>,n
447 /a>                                       a href="+code=u32" class="sref">u32 /a>  a href="+code=mask" class="sref">mask /a>)n
448 /a>{n
449 /a>        struct  a href="+code=ablkcipher_alg" class="sref">ablkcipher_alg /a> * a href="+code=alg" class="sref">alg /a> = & a href="+code=tfm" class="sref">tfm /a>-> a href="+code=__crt_alg" class="sref">__crt_alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>;n
450 /a>        struct  a href="+code=ablkcipher_tfm" class="sref">ablkcipher_tfm /a> * a href="+code=crt" class="sref">crt /a> = & a href="+code=tfm" class="sref">tfm /a>-> a href="+code=crt_ablkcipher" class="sref">crt_ablkcipher /a>;n
451 /a>n
452 /a>        if ( a href="+code=alg" class="sref">alg /a>-> a href="+code=ivsize" class="sref">ivsize /a> >  a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE /a> / 8)n
453 /a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;n
454 /a>n
455 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=setkey" class="sref">setkey /a> =  a href="+code=tfm" class="sref">tfm /a>-> a href="+code=__crt_alg" class="sref">__crt_alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_GENIV" class="sref">CRYPTO_ALG_GENIV /a> ?n
456 /a>                       a href="+code=alg" class="sref">alg /a>-> a href="+code=setkey" class="sref">setkey /a> :  a href="+code=setkey" class="sref">setkey /a>;n
457 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=encrypt" class="sref">encrypt /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=encrypt" class="sref">encrypt /a>;n
458 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=decrypt" class="sref">decrypt /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=decrypt" class="sref">decrypt /a>;n
459 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=givencrypt" class="sref">givencrypt /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=givencrypt" class="sref">givencrypt /a>;n
460 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=givdecrypt" class="sref">givdecrypt /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=givdecrypt" class="sref">givdecrypt /a> ?:  a href="+code=no_givdecrypt" class="sref">no_givdecrypt /a>;n
461 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=base" class="sref">base /a> =  a href="+code=__crypto_ablkcipher_cast" class="sref">__crypto_ablkcipher_cast /a>( a href="+code=tfm" class="sref">tfm /a>);n
462 /a>         a href="+code=crt" class="sref">crt /a>-> a href="+code=ivsize" class="sref">ivsize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=ivsize" class="sref">ivsize /a>;n
463 /a>n
464 /a>        return 0;n
465 /a>}n
466 /a>n
467 /a>#ifdef  a href="+code=CONFIG_NET" class="sref">CONFIG_NET /a>n
468 /a>static int  a href="+code=crypto_givcipher_report" class="sref">crypto_givcipher_report /a>(struct  a href="+code=sk_buff" class="sref">sk_buff /a> * a href="+code=skb" class="sref">skb /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
469 /a>{n
470 /a>        struct  a href="+code=crypto_report_blkcipher" class="sref">crypto_report_blkcipher /a>  a href="+code=rblkcipher" class="sref">rblkcipher /a>;n
471 /a>n
472 /a>         a href="+code=snprintf" class="sref">snprintf /a>( a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=type" class="sref">type /a>,  a href="+code=CRYPTO_MAX_ALG_NAME" class="sref">CRYPTO_MAX_ALG_NAME /a>,  span class="string">"%s",  span class="string">"givcipher");n
473 /a>         a href="+code=snprintf" class="sref">snprintf /a>( a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=geniv" class="sref">geniv /a>,  a href="+code=CRYPTO_MAX_ALG_NAME" class="sref">CRYPTO_MAX_ALG_NAME /a>,  span class="string">"%s",n
474 /a>                  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=geniv" class="sref">geniv /a> ?:  span class="string">"<built-in>");n
475 /a>n
476 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=blocksize" class="sref">blocksize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blocksize" class="sref">cra_blocksize /a>;n
477 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=min_keysize" class="sref">min_keysize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=min_keysize" class="sref">min_keysize /a>;n
478 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=max_keysize" class="sref">max_keysize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=max_keysize" class="sref">max_keysize /a>;n
479 /a>         a href="+code=rblkcipher" class="sref">rblkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a>;n
480 /a>n
481 /a>        if ( a href="+code=nla_put" class="sref">nla_put /a>( a href="+code=skb" class="sref">skb /a>,  a href="+code=CRYPTOCFGA_REPORT_BLKCIPHER" class="sref">CRYPTOCFGA_REPORT_BLKCIPHER /a>,n
482 /a>                    sizeof(struct  a href="+code=crypto_report_blkcipher" class="sref">crypto_report_blkcipher /a>), & a href="+code=rblkcipher" class="sref">rblkcipher /a>))n
483 /a>                goto  a href="+code=nla_put_failure" class="sref">nla_put_failure /a>;n
484 /a>        return 0;n
485 /a>n
486 /a> a href="+code=nla_put_failure" class="sref">nla_put_failure /a>:n
487 /a>        return - a href="+code=EMSGSIZE" class="sref">EMSGSIZE /a>;n
488 /a>}n
489 /a>#elsen
490 /a>static int  a href="+code=crypto_givcipher_report" class="sref">crypto_givcipher_report /a>(struct  a href="+code=sk_buff" class="sref">sk_buff /a> * a href="+code=skb" class="sref">skb /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
491 /a>{n
492 /a>        return - a href="+code=ENOSYS" class="sref">ENOSYS /a>;n
493 /a>}n
494 /a>#endifn
495 /a>n
496 /a>static void  a href="+code=crypto_givcipher_show" class="sref">crypto_givcipher_show /a>(struct  a href="+code=seq_file" class="sref">seq_file /a> * a href="+code=m" class="sref">m /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
497 /a>         a href="+code=__attribute__" class="sref">__attribute__ /a> (( a href="+code=unused" class="sref">unused /a>));n
498 /a>static void  a href="+code=crypto_givcipher_show" class="sref">crypto_givcipher_show /a>(struct  a href="+code=seq_file" class="sref">seq_file /a> * a href="+code=m" class="sref">m /a>, struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
499 /a>{n
500 /a>        struct  a href="+code=ablkcipher_alg" class="sref">ablkcipher_alg /a> * a href="+code=ablkcipher" class="sref">ablkcipher /a> = & a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>;n
501 /a>n
502 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"type         : givcipher\n");n
503 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"async        : %s\n",  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_ASYNC" class="sref">CRYPTO_ALG_ASYNC /a> ?n
504 /a>                                              span class="string">"yes" :  span class="string">"no");n
505 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"blocksize    : %u\n",  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blocksize" class="sref">cra_blocksize /a>);n
506 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"min keysize  : %u\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=min_keysize" class="sref">min_keysize /a>);n
507 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"max keysize  : %u\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=max_keysize" class="sref">max_keysize /a>);n
508 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"ivsize       : %u\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=ivsize" class="sref">ivsize /a>);n
509 /a>         a href="+code=seq_printf" class="sref">seq_printf /a>( a href="+code=m" class="sref">m /a>,  span class="string">"geniv        : %s\n",  a href="+code=ablkcipher" class="sref">ablkcipher /a>-> a href="+code=geniv" class="sref">geniv /a> ?:  span class="string">"<built-in>");n
510 /a>}n
511 /a>n
512 /a>const struct  a href="+code=crypto_type" class="sref">crypto_type /a>  a href="+code=crypto_givcipher_type" class="sref">crypto_givcipher_type /a> = {n
513 /a>        . a href="+code=ctxsize" class="sref">ctxsize /a> =  a href="+code=crypto_ablkcipher_ctxsize" class="sref">crypto_ablkcipher_ctxsize /a>,n
514 /a>        . a href="+code=init" class="sref">init /a> =  a href="+code=crypto_init_givcipher_ops" class="sref">crypto_init_givcipher_ops /a>,n
515 /a>#ifdef  a href="+code=CONFIG_PROC_FS" class="sref">CONFIG_PROC_FS /a>n
516 /a>        . a href="+code=show" class="sref">show /a> =  a href="+code=crypto_givcipher_show" class="sref">crypto_givcipher_show /a>,n
517 /a>#endifn
518 /a>        . a href="+code=report" class="sref">report /a> =  a href="+code=crypto_givcipher_report" class="sref">crypto_givcipher_report /a>,n
519 /a>};n
520 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=crypto_givcipher_type" class="sref">crypto_givcipher_type /a>);n
521 /a>n
522 /a>const char * a href="+code=crypto_default_geniv" class="sref">crypto_default_geniv /a>(const struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>)n
523 /a>{n
524 /a>        if ((( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>) ==n
525 /a>              a href="+code=CRYPTO_ALG_TYPE_BLKCIPHER" class="sref">CRYPTO_ALG_TYPE_BLKCIPHER /a> ?  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blkcipher" class="sref">cra_blkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a> :n
526 /a>                                          a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a>) !=n
527 /a>             a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blocksize" class="sref">cra_blocksize /a>)n
528 /a>                return  span class="string">"chainiv";n
529 /a>n
530 /a>        return  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_ASYNC" class="sref">CRYPTO_ALG_ASYNC /a> ?n
531 /a>                span class="string">"eseqiv" :  a href="+code=skcipher_default_geniv" class="sref">skcipher_default_geniv /a>;n
532 /a>}n
533 /a>n
534 /a>static int  a href="+code=crypto_givcipher_default" class="sref">crypto_givcipher_default /a>(struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=type" class="sref">type /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=mask" class="sref">mask /a>)n
535 /a>{n
536 /a>        struct  a href="+code=rtattr" class="sref">rtattr /a> * a href="+code=tb" class="sref">tb /a>[3];n
537 /a>        struct {n
538 /a>                struct  a href="+code=rtattr" class="sref">rtattr /a>  a href="+code=attr" class="sref">attr /a>;n
539 /a>                struct  a href="+code=crypto_attr_type" class="sref">crypto_attr_type /a>  a href="+code=data" class="sref">data /a>;n
540 /a>        }  a href="+code=ptype" class="sref">ptype /a>;n
541 /a>        struct {n
542 /a>                struct  a href="+code=rtattr" class="sref">rtattr /a>  a href="+code=attr" class="sref">attr /a>;n
543 /a>                struct  a href="+code=crypto_attr_alg" class="sref">crypto_attr_alg /a>  a href="+code=data" class="sref">data /a>;n
544 /a>        }  a href="+code=palg" class="sref">palg /a>;n
545 /a>        struct  a href="+code=crypto_template" class="sref">crypto_template /a> * a href="+code=tmpl" class="sref">tmpl /a>;n
546 /a>        struct  a href="+code=crypto_instance" class="sref">crypto_instance /a> * a href="+code=inst" class="sref">inst /a>;n
547 /a>        struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=larval" class="sref">larval /a>;n
548 /a>        const char * a href="+code=geniv" class="sref">geniv /a>;n
549 /a>        int  a href="+code=err" class="sref">err /a>;n
550 /a>n
551 /a>         a href="+code=larval" class="sref">larval /a> =  a href="+code=crypto_larval_lookup" class="sref">crypto_larval_lookup /a>( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_driver_naml" class="sref">cra_driver_naml /a>,n
552 /a>                                      ( a href="+code=type" class="sref">type /a> & ~ a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>) |n
553 /a>                                       a href="+code=CRYPTO_ALG_TYPE_GIVCIPHER" class="sref">CRYPTO_ALG_TYPE_GIVCIPHER /a>,n
554 /a>                                       a href="+code=mask" class="sref">mask /a> |  a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>);n
555 /a>         a href="+code=err" class="sref">err /a> =  a href="+code=PTR_ERR" class="sref">PTR_ERR /a>( a href="+code=larval" class="sref">larval /a>);n
556 /a>        if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=larval" class="sref">larval /a>))n
557 /a>                goto  a href="+code=out" class="sref">out /a>;n
558 /a>n
559 /a>         a href="+code=err" class="sref">err /a> = - a href="+code=EAGAIN" class="sref">EAGAIN /a>;n
560 /a>        if (! a href="+code=crypto_is_larval" class="sref">crypto_is_larval /a>( a href="+code=larval" class="sref">larval /a>))n
561 /a>                goto  a href="+code=drop_larval" class="sref">drop_larval /a>;n
562 /a>n
563 /a>         a href="+code=ptype" class="sref">ptype /a>. a href="+code=attr" class="sref">attr /a>. a href="+code=rta_len" class="sref">rta_len /a> = sizeof( a href="+code=ptype" class="sref">ptype /a>);n
564 /a>         a href="+code=ptype" class="sref">ptype /a>. a href="+code=attr" class="sref">attr /a>. a href="+code=rta_type" class="sref">rta_type /a> =  a href="+code=CRYPTOA_TYPE" class="sref">CRYPTOA_TYPE /a>;n
565 /a>         a href="+code=ptype" class="sref">ptype /a>. a href="+code=data" class="sref">data /a>. a href="+code=type" class="sref">type /a> =  a href="+code=type" class="sref">type /a> |  a href="+code=CRYPTO_ALG_GENIV" class="sref">CRYPTO_ALG_GENIV /a>;n
566 /a>         span class="comment">/* GENIV tells the template that we're making a default geniv. */n
567 /a>         a href="+code=ptype" class="sref">ptype /a>. a href="+code=data" class="sref">data /a>. a href="+code=mask" class="sref">mask /a> =  a href="+code=mask" class="sref">mask /a> |  a href="+code=CRYPTO_ALG_GENIV" class="sref">CRYPTO_ALG_GENIV /a>;n
568 /a>         a href="+code=tb" class="sref">tb /a>[0] = & a href="+code=ptype" class="sref">ptype /a>. a href="+code=attr" class="sref">attr /a>;n
569 /a>n
570 /a>         a href="+code=palg" class="sref">palg /a>. a href="+code=attr" class="sref">attr /a>. a href="+code=rta_len" class="sref">rta_len /a> = sizeof( a href="+code=palg" class="sref">palg /a>);n
571 /a>         a href="+code=palg" class="sref">palg /a>. a href="+code=attr" class="sref">attr /a>. a href="+code=rta_type" class="sref">rta_type /a> =  a href="+code=CRYPTOA_ALG" class="sref">CRYPTOA_ALG /a>;n
572 /a>         span class="comment">/* Must use the exact naml to locate ourselves. */n
573 /a>         a href="+code=memcpy" class="sref">memcpy /a>( a href="+code=palg" class="sref">palg /a>. a href="+code=data" class="sref">data /a>. a href="+code=naml" class="sref">naml /a>,  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_driver_naml" class="sref">cra_driver_naml /a>,  a href="+code=CRYPTO_MAX_ALG_NAME" class="sref">CRYPTO_MAX_ALG_NAME /a>);n
574 /a>         a href="+code=tb" class="sref">tb /a>[1] = & a href="+code=palg" class="sref">palg /a>. a href="+code=attr" class="sref">attr /a>;n
575 /a>n
576 /a>         a href="+code=tb" class="sref">tb /a>[2] =  a href="+code=NULL" class="sref">NULL /a>;n
577 /a>n
578 /a>        if (( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>) ==n
579 /a>             a href="+code=CRYPTO_ALG_TYPE_BLKCIPHER" class="sref">CRYPTO_ALG_TYPE_BLKCIPHER /a>)n
580 /a>                 a href="+code=geniv" class="sref">geniv /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blkcipher" class="sref">cra_blkcipher /a>. a href="+code=geniv" class="sref">geniv /a>;n
581 /a>        elsen
582 /a>                 a href="+code=geniv" class="sref">geniv /a> =  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=geniv" class="sref">geniv /a>;n
583 /a>n
584 /a>        if (! a href="+code=geniv" class="sref">geniv /a>)n
585 /a>                 a href="+code=geniv" class="sref">geniv /a> =  a href="+code=crypto_default_geniv" class="sref">crypto_default_geniv /a>( a href="+code=alg" class="sref">alg /a>);n
586 /a>n
587 /a>         a href="+code=tmpl" class="sref">tmpl /a> =  a href="+code=crypto_lookup_template" class="sref">crypto_lookup_template /a>( a href="+code=geniv" class="sref">geniv /a>);n
588 /a>         a href="+code=err" class="sref">err /a> = - a href="+code=ENOENT" class="sref">ENOENT /a>;n
589 /a>        if (! a href="+code=tmpl" class="sref">tmpl /a>)n
590 /a>                goto  a href="+code=kill_larval" class="sref">kill_larval /a>;n
591 /a>n
592 /a>         a href="+code=inst" class="sref">inst /a> =  a href="+code=tmpl" class="sref">tmpl /a>-> a href="+code=alloc" class="sref">alloc /a>( a href="+code=tb" class="sref">tb /a>);n
593 /a>         a href="+code=err" class="sref">err /a> =  a href="+code=PTR_ERR" class="sref">PTR_ERR /a>( a href="+code=inst" class="sref">inst /a>);n
594 /a>        if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=inst" class="sref">inst /a>))n
595 /a>                goto  a href="+code=put_tmpl" class="sref">put_tmpl /a>;n
596 /a>n
597 /a>        if (( a href="+code=err" class="sref">err /a> =  a href="+code=crypto_register_instance" class="sref">crypto_register_instance /a>( a href="+code=tmpl" class="sref">tmpl /a>,  a href="+code=inst" class="sref">inst /a>))) {n
598 /a>                 a href="+code=tmpl" class="sref">tmpl /a>-> a href="+code=free" class="sref">free /a>( a href="+code=inst" class="sref">inst /a>);n
599 /a>                goto  a href="+code=put_tmpl" class="sref">put_tmpl /a>;n
600 /a>        }n
601 /a>n
602 /a>         span class="comment">/* Redo the lookup to use the instance we just registered. */n
603 /a>         a href="+code=err" class="sref">err /a> = - a href="+code=EAGAIN" class="sref">EAGAIN /a>;n
604 /a>n
605 /a> a href="+code=put_tmpl" class="sref">put_tmpl /a>:n
606 /a>         a href="+code=crypto_tmpl_put" class="sref">crypto_tmpl_put /a>( a href="+code=tmpl" class="sref">tmpl /a>);n
607 /a> a href="+code=kill_larval" class="sref">kill_larval /a>:n
608 /a>         a href="+code=crypto_larval_kill" class="sref">crypto_larval_kill /a>( a href="+code=larval" class="sref">larval /a>);n
609 /a> a href="+code=drop_larval" class="sref">drop_larval /a>:n
610 /a>         a href="+code=crypto_mod_put" class="sref">crypto_mod_put /a>( a href="+code=larval" class="sref">larval /a>);n
611 /a> a href="+code=out" class="sref">out /a>:n
612 /a>         a href="+code=crypto_mod_put" class="sref">crypto_mod_put /a>( a href="+code=alg" class="sref">alg /a>);n
613 /a>        return  a href="+code=err" class="sref">err /a>;n
614 /a>}n
615 /a>n
616 /a>struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=crypto_lookup_skcipher" class="sref">crypto_lookup_skcipher /a>(const char * a href="+code=naml" class="sref">naml /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=type" class="sref">type /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=mask" class="sref">mask /a>)n
617 /a>{n
618 /a>        struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>;n
619 /a>n
620 /a>         a href="+code=alg" class="sref">alg /a> =  a href="+code=crypto_alg_mod_lookup" class="sref">crypto_alg_mod_lookup /a>( a href="+code=naml" class="sref">naml /a>,  a href="+code=type" class="sref">type /a>,  a href="+code=mask" class="sref">mask /a>);n
621 /a>        if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=alg" class="sref">alg /a>))n
622 /a>                return  a href="+code=alg" class="sref">alg /a>;n
623 /a>n
624 /a>        if (( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>) ==n
625 /a>             a href="+code=CRYPTO_ALG_TYPE_GIVCIPHER" class="sref">CRYPTO_ALG_TYPE_GIVCIPHER /a>)n
626 /a>                return  a href="+code=alg" class="sref">alg /a>;n
627 /a>n
628 /a>        if (!(( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>) ==n
629 /a>               a href="+code=CRYPTO_ALG_TYPE_BLKCIPHER" class="sref">CRYPTO_ALG_TYPE_BLKCIPHER /a> ?  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blkcipher" class="sref">cra_blkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a> :n
630 /a>                                           a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a>))n
631 /a>                return  a href="+code=alg" class="sref">alg /a>;n
632 /a>n
633 /a>         a href="+code=crypto_mod_put" class="sref">crypto_mod_put /a>( a href="+code=alg" class="sref">alg /a>);n
634 /a>         a href="+code=alg" class="sref">alg /a> =  a href="+code=crypto_alg_mod_lookup" class="sref">crypto_alg_mod_lookup /a>( a href="+code=naml" class="sref">naml /a>,  a href="+code=type" class="sref">type /a> |  a href="+code=CRYPTO_ALG_TESTED" class="sref">CRYPTO_ALG_TESTED /a>,n
635 /a>                                     a href="+code=mask" class="sref">mask /a> & ~ a href="+code=CRYPTO_ALG_TESTED" class="sref">CRYPTO_ALG_TESTED /a>);n
636 /a>        if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=alg" class="sref">alg /a>))n
637 /a>                return  a href="+code=alg" class="sref">alg /a>;n
638 /a>n
639 /a>        if (( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>) ==n
640 /a>             a href="+code=CRYPTO_ALG_TYPE_GIVCIPHER" class="sref">CRYPTO_ALG_TYPE_GIVCIPHER /a>) {n
641 /a>                if (( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> ^  a href="+code=type" class="sref">type /a> ^ ~ a href="+code=mask" class="sref">mask /a>) &  a href="+code=CRYPTO_ALG_TESTED" class="sref">CRYPTO_ALG_TESTED /a>) {n
642 /a>                         a href="+code=crypto_mod_put" class="sref">crypto_mod_put /a>( a href="+code=alg" class="sref">alg /a>);n
643 /a>                         a href="+code=alg" class="sref">alg /a> =  a href="+code=ERR_PTR" class="sref">ERR_PTR /a>(- a href="+code=ENOENT" class="sref">ENOENT /a>);n
644 /a>                }n
645 /a>                return  a href="+code=alg" class="sref">alg /a>;n
646 /a>        }n
647 /a>n
648 /a>         a href="+code=BUG_ON" class="sref">BUG_ON /a>(!(( a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_flags" class="sref">cra_flags /a> &  a href="+code=CRYPTO_ALG_TYPE_MASK" class="sref">CRYPTO_ALG_TYPE_MASK /a>) ==n
649 /a>                  a href="+code=CRYPTO_ALG_TYPE_BLKCIPHER" class="sref">CRYPTO_ALG_TYPE_BLKCIPHER /a> ?  a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_blkcipher" class="sref">cra_blkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a> :n
650 /a>                                              a href="+code=alg" class="sref">alg /a>-> a href="+code=cra_ablkcipher" class="sref">cra_ablkcipher /a>. a href="+code=ivsize" class="sref">ivsize /a>));n
651 /a>n
652 /a>        return  a href="+code=ERR_PTR" class="sref">ERR_PTR /a>( a href="+code=crypto_givcipher_default" class="sref">crypto_givcipher_default /a>( a href="+code=alg" class="sref">alg /a>,  a href="+code=type" class="sref">type /a>,  a href="+code=mask" class="sref">mask /a>));n
653 /a>}n
654 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=crypto_lookup_skcipher" class="sref">crypto_lookup_skcipher /a>);n
655 /a>n
656 /a>int  a href="+code=crypto_grab_skcipher" class="sref">crypto_grab_skcipher /a>(struct  a href="+code=crypto_skcipher_spawn" class="sref">crypto_skcipher_spawn /a> * a href="+code=spawn" class="sref">spawn /a>, const char * a href="+code=naml" class="sref">naml /a>,n
657 /a>                          a href="+code=u32" class="sref">u32 /a>  a href="+code=type" class="sref">type /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=mask" class="sref">mask /a>)n
658 /a>{n
659 /a>        struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>;n
660 /a>        int  a href="+code=err" class="sref">err /a>;n
661 /a>n
662 /a>         a href="+code=type" class="sref">type /a> =  a href="+code=crypto_skcipher_type" class="sref">crypto_skcipher_type /a>( a href="+code=type" class="sref">type /a>);n
663 /a>         a href="+code=mask" class="sref">mask /a> =  a href="+code=crypto_skcipher_mask" class="sref">crypto_skcipher_mask /a>( a href="+code=mask" class="sref">mask /a>);n
664 /a>n
665 /a>         a href="+code=alg" class="sref">alg /a> =  a href="+code=crypto_lookup_skcipher" class="sref">crypto_lookup_skcipher /a>( a href="+code=naml" class="sref">naml /a>,  a href="+code=type" class="sref">type /a>,  a href="+code=mask" class="sref">mask /a>);n
666 /a>        if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=alg" class="sref">alg /a>))n
667 /a>                return  a href="+code=PTR_ERR" class="sref">PTR_ERR /a>( a href="+code=alg" class="sref">alg /a>);n
668 /a>n
669 /a>         a href="+code=err" class="sref">err /a> =  a href="+code=crypto_init_spawn" class="sref">crypto_init_spawn /a>(& a href="+code=spawn" class="sref">spawn /a>-> a href="+code=base" class="sref">base /a>,  a href="+code=alg" class="sref">alg /a>,  a href="+code=spawn" class="sref">spawn /a>-> a href="+code=base" class="sref">base /a>. a href="+code=inst" class="sref">inst /a>,  a href="+code=mask" class="sref">mask /a>);n
670 /a>         a href="+code=crypto_mod_put" class="sref">crypto_mod_put /a>( a href="+code=alg" class="sref">alg /a>);n
671 /a>        return  a href="+code=err" class="sref">err /a>;n
672 /a>}n
673 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=crypto_grab_skcipher" class="sref">crypto_grab_skcipher /a>);n
674 /a>n
675 /a>struct  a href="+code=crypto_ablkcipher" class="sref">crypto_ablkcipher /a> * a href="+code=crypto_alloc_ablkcipher" class="sref">crypto_alloc_ablkcipher /a>(const char * a href="+code=alg_naml" class="sref">alg_naml /a>,n
676 /a>                                                   a href="+code=u32" class="sref">u32 /a>  a href="+code=type" class="sref">type /a>,  a href="+code=u32" class="sref">u32 /a>  a href="+code=mask" class="sref">mask /a>)n
677 /a>{n
678 /a>        struct  a href="+code=crypto_tfm" class="sref">crypto_tfm /a> * a href="+code=tfm" class="sref">tfm /a>;n
679 /a>        int  a href="+code=err" class="sref">err /a>;n
680 /a>n
681 /a>         a href="+code=type" class="sref">type /a> =  a href="+code=crypto_skcipher_type" class="sref">crypto_skcipher_type /a>( a href="+code=type" class="sref">type /a>);n
682 /a>         a href="+code=mask" class="sref">mask /a> =  a href="+code=crypto_skcipher_mask" class="sref">crypto_skcipher_mask /a>( a href="+code=mask" class="sref">mask /a>);n
683 /a>n
684 /a>        for (;;) {n
685 /a>                struct  a href="+code=crypto_alg" class="sref">crypto_alg /a> * a href="+code=alg" class="sref">alg /a>;n
686 /a>n
687 /a>                 a href="+code=alg" class="sref">alg /a> =  a href="+code=crypto_lookup_skcipher" class="sref">crypto_lookup_skcipher /a>( a href="+code=alg_naml" class="sref">alg_naml /a>,  a href="+code=type" class="sref">type /a>,  a href="+code=mask" class="sref">mask /a>);n
688 /a>                if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=alg" class="sref">alg /a>)) {n
689 /a>                         a href="+code=err" class="sref">err /a> =  a href="+code=PTR_ERR" class="sref">PTR_ERR /a>( a href="+code=alg" class="sref">alg /a>);n
690 /a>                        goto  a href="+code=err" class="sref">err /a>;n
691 /a>                }n
692 /a>n
693 /a>                 a href="+code=tfm" class="sref">tfm /a> =  a href="+code=__crypto_alloc_tfm" class="sref">__crypto_alloc_tfm /a>( a href="+code=alg" class="sref">alg /a>,  a href="+code=type" class="sref">type /a>,  a href="+code=mask" class="sref">mask /a>);n
694 /a>                if (! a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=tfm" class="sref">tfm /a>))n
695 /a>                        return  a href="+code=__crypto_ablkcipher_cast" class="sref">__crypto_ablkcipher_cast /a>( a href="+code=tfm" class="sref">tfm /a>);n
696 /a>n
697 /a>                 a href="+code=crypto_mod_put" class="sref">crypto_mod_put /a>( a href="+code=alg" class="sref">alg /a>);n
698 /a>                 a href="+code=err" class="sref">err /a> =  a href="+code=PTR_ERR" class="sref">PTR_ERR /a>( a href="+code=tfm" class="sref">tfm /a>);n
699 /a>n
700 /a> a href="+code=err" class="sref">err /a>:n
701 /a>                if ( a href="+code=err" class="sref">err /a> != - a href="+code=EAGAIN" class="sref">EAGAIN /a>)n
702 /a>                        break;n
703 /a>                if ( a href="+code=signal_pending" class="sref">signal_pending /a>( a href="+code=current" class="sref">current /a>)) {n
704 /a>                         a href="+code=err" class="sref">err /a> = - a href="+code=EINTR" class="sref">EINTR /a>;n
705 /a>                        break;n
706 /a>                }n
707 /a>        }n
708 /a>n
709 /a>        return  a href="+code=ERR_PTR" class="sref">ERR_PTR /a>( a href="+code=err" class="sref">err /a>);n
710 /a>}n
711 /a> a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL /a>( a href="+code=crypto_alloc_ablkcipher" class="sref">crypto_alloc_ablkcipher /a>);n
712 /a>n
713 /a>static int  a href="+code=__init" class="sref">__init /a>  a href="+code=skcipher_module_init" class="sref">skcipher_module_init /a>(void)n
714 /a>{n
715 /a>         a href="+code=skcipher_default_geniv" class="sref">skcipher_default_geniv /a> =  a href="+code=num_possible_cpus" class="sref">num_possible_cpus /a>() > 1 ?n
716 /a>                                  span class="string">"eseqiv" :  span class="string">"chainiv";n
717 /a>        return 0;n
718 /a>}n
719 /a>n
720 /a>static void  a href="+code=skcipher_module_exit" class="sref">skcipher_module_exit /a>(void)n
721 /a>{n
722 /a>}n
723 /a>n
724 /a> a href="+code=module_init" class="sref">module_init /a>( a href="+code=skcipher_module_init" class="sref">skcipher_module_init /a>);n
725 /a> a href="+code=module_exit" class="sref">module_exit /a>( a href="+code=skcipher_module_exit" class="sref">skcipher_module_exit /a>);n
726 /a>
lxr.linux.no kindly hosted by Redpill Linpro AS /a>, provider of Linux consulting and operations services since 1995.