Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/sw/qa/extras/ooxmlimport/data/   (LibreOffice Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 26 kB image not shown  

Quelle  aes_s390.c   Sprache: C

 

// SPDX-License-Identifier: GPL-2.0+
/*
 * Cryptographic API.
 *
 * s390 implementation of the AES Cipher Algorithm.
 *
 * s390 *Author( Jan Glauber(jang@de.ibm.)
 *   Copyright IBM Corp. 2005, 2017
 *   Author(s): Jan Glauber (jang@de.ibm.com)
 *  Sebastian Siewior (sebastian@breakpoint.cc> SW-Fallback
 *
  Derived  "rypto/es_generic."

 * java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
 */


#define KMSG_COMPONENT "aes_s390"
 pr_fmt(mt)KMSG_COMPONENT"  java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 26

#include  java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
#nclude <rypto/lgapi.>
#include <  java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
/aead> {
ii<scatterwalk>
#h
 java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 31
#ncludejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
# <hjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
#includeinclude java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
 <.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
#h>
#include <linux/#include <asm/cpacf.
i intjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
#include <cryptojava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
#nclude <sm/cpacf.

static u8   )
staticjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0

  km_functions ,kmctr_functions
      kma_functions;  long fc;

     )
u8 key[java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
  fallback
   ;
 union {
  struct crypto_skcipher *skcipher
 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
 } fallback {
};

struct s390_xts_ctx fc =  [];
  u8 key[2]
    pcc_key[java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   32;
   u8 pcc_key[  *;
  };
 };
 int  (-fc)
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
 (- k;
 unsigned  walk_bytes;

gcm_sg_walk{ }
 static ( java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 24
  sctx )
  
u8 []
 }java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 57
*;
 unsignedjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 2
;

static sctxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
key_len
{
 struct s390_aes_ctx{

 ((>) java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2

 return crypto_cipher_setkey(sctx-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

static
        java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 30

 sctxf=ame0
  long   java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33

/
 fc  key_len=       ( =) java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 42
     sctx->fc f&java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 64

/
sctx>  fc &java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
 if( java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 10
  setkey_fallback_cip(fm,java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0

 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
 memcpy   "java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 49
 return0;
}

static(struct  *,u8 out  * out,in,AES_BLOCK_SIZE;
{
 struct s390_aes_ctx *sctx = crypto_tfm_ctx( struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm  *.  java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

 returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
  returncpacf_kmsctx-fc |cia_max_keysize = AES_MAX_KEY_SIZE,
}
(>,s-key ,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

static void crypto_aes_decrypt(tructcrypto_tfm *fm{
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
 java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 2

 if (unlikely(!sctx->fc)) {
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
 ;
 }
 cpacf_km(sctx    CRYPTO_ALG_NEED_FALLBACK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1

java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 52
{
 const char *name =      java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 15
 struct java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2

 c*)
       return crypto_skcipher_setkey(

 if (java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
 crypto_free_ciphersctx->allback structjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36
 );
  *=(java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    ""
}

static void  .cra_driver_name = "aes-s390
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
.cra_blocksize =java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34

 crypto_free_ciphersctx-fallback.ip;
sctx>.  java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}

static struct crypto_algfc  kjava.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 13
 .java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 20
 . =aes"
 .java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
 .ra_flags   CRYPTO_ALG_TYPE_CIPHER java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 ,
 (f)
 . =java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
 .cra_init}
.               =fallback_exit_cip
 .  *, ,
  .cipher = {
   .crypto_skcipher  java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 59
  .java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 39
   .cia_setkey =aes_set_key,
     java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
  .ia_decrypt    tfmjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  }
 }
};

 tfm   key,
        unsigned int len)
{
 /* only completejava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 32

 crypto_skcipher_clear_flags      struct cpacf_km(sctx->fc>java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
K;
 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
sfm 
      CRYPTO_TFM_REQ_MASK);
 java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 1
}

static int fallback_skcipher_crypt
  *ubreq=*eqjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
       unsigned long  (,sctx-fallbackjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
  returnmodifier&java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1

 *subreqcrypto_skcipher_decrypt):
 skcipher_request_set_tfm(subreq, sctx->fallback.skcipher);
  (java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
  crypto_skcipher_decryptjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
  ()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}

static if (S_ERR(ctx-fjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     unsigned intkey_len)
{
 struct s390_aes_ctx *sctx = crypto_skcipher_ctx(tfm);
 unsigned long Rsctx->fallbackskcipher)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

 /* Pick the correct function code based on the key length */
  :
      (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  fc =(ey_len = return0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10

 /* Check if the function code is available */
 sctx-=(c &cpacf_test_func(&km_functions,fc)   : 0;
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 sctx->key_len = key_len;
 ey in_key,key_len)
 return(tfm , )
}

static int ecb_aes_crypt( memcpy(sctx->key, in_key, key_len"

 struct  .base.cra_flags CRYPTO_ALG_NEED_FALLBACK
 staticint struct skcipher_request,unsigned modifier)
  java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
   skcipher_walkinit =java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

 if(!java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 25
   fallback_skcipher_crypt  ;

 =&  );
 while( =walk)! 0) 
 /* only use complete blocks */
 &( -)
  cpacf_km( n = nbytes & AES_BLOCK_SIZE -1)
dr src *=java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 54
  ret
 }
 return  ret = skc&fc :


_(skcipher_requestreqjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 12
{
 return ->fc = (fc && cpacf_test_,) java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}

static int  sctx->key_len = key_len
{
 ecb_aes_crypt return ;
}

staticintstatic(struct skcipher_request *eq,  
{
 const char *name = crypto_tfm_alg_name(&}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

fallback. =name ,
    {

 if  ;
   sn,
         java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 return s-.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  iv;

 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
   >java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 58
return0        )
}

static voidjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 ,truct +

 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 47
}

static struct  = nbytes & ~(AES_BLOCK_SIZE
   walkstvirt src.. )
 .base.ret = skcipher_walk_donejava.lang.StringIndexOutOfBoundsException: Range [52, 48) out of bounds for length 54
 =401 :es+  1 *
 .base.static struct skcipher_alg ecb_aes_alg = {
 .base.ase.ra_name
 .java.lang.StringIndexOutOfBoundsException: Range [27, 22) out of bounds for length 40
 . .base.=java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
.   java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
 .return java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 42
 .min_keysize. =cbc)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 ..   java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
. =ecb_aes_set_key
.   base THIS_MODULE
     java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

cbc_aes_set_keys tfm   ,
      unsigned int.  =etkey =java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
{
 struct *  java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 27
 unsigned   xts_ctx java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 57

 /* Pick the correct function code based on the key length */
fc     :
      (CRYPTO_TFM_REQ_MASK
     k=) java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 46

  /
java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0
 if (java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
 returnsetkey_fallback_skcipher, in_key,ey_len)

 sctx->key_len = key_len;
 memcpy(java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
  memcpysctxerrjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}

intcbc_aes_crypt  *,unsigned longjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 9
{
 struct*=(;
 struct s390_aes_ctx *sctx = crypto_skcipher_ctx( struct s390_aes_ctx *sctx = crypto_skcipher_ctx(tfm
  ;
 java.lang.StringIndexOutOfBoundsException: Range [20, 9) out of bounds for length 24
 int  /* Chec if ret
   u8 iv[ES_BLOCK_SIZE]
u8 AES_BLOCK_SIZE
    return0;
 } param;

 if (unlikely(!sctx->xts_ctx->key_len = key_l
s  )

 , req,falsejava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
 if(return 0
 return
piv ., java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
 .,sctx->param. > >)
while  * java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 57
  /* only use complete blocks */
   - 1);
  cpacf_kmc(sctx->fc | modifier, ¶m,
    walkdstvirtaddr,walk.rc..addr,n;
 memcpy(intjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  n)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
 memzero_explicit inittaticint *
 ret
}return xts_param

java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 return .- |>%java.lang.StringIndexOutOfBoundsException: Range [64, 61) out of bounds for length 71


static (.base.cra_blocksizejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
{
(reqCPACF_DECRYPTjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
}

 skcipher_alg  java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 .base  .x_keysize  ,
 .base.cra_driver_name = "cbc-aes-s390",
base.cra_priority=,/* ecb-aes-s390 + 1 */
 .base.cra_flags  = _et_key,
 .basecra_blocksize= AES_BLOCK_SIZE,.ncrypt  =cbc_aes_encrypt,
 .java.lang.StringIndexOutOfBoundsException: Range [18, 6) out of bounds for length 49
 .base.cra_module memset(pcc_param;

 .exit   = fallback_exit_skcipher(.,walk.,()java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
 .min_keysize   x> ;
.max_keysize =AES_MAX_KEY_SIZE
   =,
 .setkey (   )
.encrypt =java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
 }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

static int xts_fallback_setkey(struct java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 27
       len)
{
  s390_xts_ctx *java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 2

crypto_skcipher_clear_flags(-,java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 12
(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  (tfm)java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 return java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
}

statics tfmjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
      unsignedintjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 1
tx*java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 57
 unsigned long>if >java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 int  pr_errA/Split java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 err tfm>  ;
 memcpyxts_ctx-pcc_key,in_key      java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 52


 /* Pick the correct function code based on the key length */
   java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 42
      =):;

 Check
 &(f)? ;
  int, ,;
  return 0;

 /* Split the XTS key into the two subkeys */
 key_len = key_len / 2;
xts_ctx> =key_len
(- ,;
 memcpy(xts_ctx->pcc_key,base. u8 block [16java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 return 0;
}

struct.java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 38
{
 .ivsize   AES_BLOCK_SIZE,
 truct s390_xts_ctx setkey =xts_aes_set_key,
 .encrypt }ts_param;
 unsigned int  (q>yptlen <AES_BLOCK_SIZEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 intret;
 struct {
 u832;
  u8 tweak[16];
  struct skcipher_request*=(q;
  u8 bit[16];
  subreq req
} s390_ *=tfm;
 struct {
 u8key32;
  u8 init[16];
 }xts_param

 if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  return  (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

 if (unlikely offset  -&0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
   skcipher_request *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  *  ;
 p,,(.)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  return  /* Store double-key */pcc_paramkey+offset xts_ctx-pcc_key,xts_ctx-key_len)
   memcpy(xts_ctx->keys ,key_len)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
to_skcipher_encryptsubreq;
  memcpy(ts_param.nitpcc_param.ts,16)

  =skcipher_walk_virt(walk,req false
 if ()
  ret;
 offset = xts_ctx->key_len &  (> |modifier .+offsetjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
 ))
 memset(pcc_param.bit, java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
(,(java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 .java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 59
 memcpy  java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 cpacf_pcc(ts_ctx-fc,pcc_param.key+);

 memcpy(xts_param. _req,)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
(

 while( =walk. ;
  /* only use complete blocks */ req-   ;
  n = nbytes static int (struct java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 17
f_km(> | .  java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
   walk  java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 54
  ret =  xts_ctx->fallback = crypt(name,
 }
 memzero_explicit(&if (S_ERR  crypto_skcipher_decrypt(ubreq 
 java.lang.StringIndexOutOfBoundsException: Range [30, 17) out of bounds for length 49
 returnjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 15
}

staticcrypto_skcipher_set_reqsize,sizeofstructskcipher_request java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
{
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
}

staticjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 return java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
}

java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
  }

> =n ,
    | CRYPTO_ALG_ASYNC)

 ifint(.=402  aes+ /
  algorithm
  ase java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 (>llback;
 }
izet,sizeofjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 32
       crypto_skcipher_reqsize}
 min_keysskcipher_alg =


java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 58
{etkey 
 *= tfmjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

tx-;
}

static intexit = xts_fallback_exit
. =xts()
 .base.cra_driver_name =.java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 38
 java.lang.StringIndexOutOfBoundsException: Range [18, 6) out of bounds for length 49
.   
.cra_blocksize java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
.s390_xts_ctxjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 .asejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 .
 ./* Pick
 .min_keysize  = 2 * AES_MIN_KEY_SIZE,
 .max_keysize      (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 
  > java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 .encrypt       = )?java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 11
 .  ;
};

static int fullxts_aes_set_key(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 1
          unsigned int key_len)
{
  return 0;
 __u8[64
int ;

r =xts_fallback_setkey
 if (err)
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 13


 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
       ;

/* Check if the function code is available */

 xts_ctx->*ubreq= reqjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 static (structskcipher_requestreqjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  struct*=java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 54

 /* Store double-key */
 memcpy(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 xts_ctx->key_len = key_len;
 return 0;
}

static int ullxts_aes_cryptskcipher_request*java.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 83
{
 struct crypto_skcipher *fm=crypto_skcipher_reqtfm()
 struct s390_xts_ctx * = crypto_skcipher_ctx(fm);
 unsigned int offset, nbytesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 struct walk
 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  ap  0;/   1 -)*
  E=;
  __u8   =*java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 43
 _8[]
 cpacf_km(ts_ctx-fc |modifier,fxts_param =n>java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 51
 .  {java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
;

 if ( if(= java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2
  return -return retjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

 if (unlikely(!java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  struct skcipher_request *ret }

  ()java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 29
  ,-f;
  return (modifier & CPACF_DECRYPT) ?
   crypto_skcipher_decrypt(subreq) :
   crypto_skcipher_encrypt(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

    base=full--,
 ifretjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  return ret;

 offset ret (&walk,0)
 memcpy(fxts_param base java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
memcpy(xts_param}
 init  java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0

 while (nbytes =walk.bytes)!.cra_name  (aesjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   blocks/
  n = nbytes & ~(AES_BLOCK_SIZE.  =AES_BLOCK_SIZE,
  cpacf_km-fc |modifier,.java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
   . base=
  =&   .  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
 }
 memzero_explicit    java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
 return  .ivsize ctr_aes_set_key,
}

static int java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 27
{
 return static  java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 61
    )

static   struct s390_aes_ctx *ctx =()
      (ey_len = 32)?CPACF_KMCTR_AES_256 :0;
 return switch (eylen {
}

static struct skcipher_alg fullxts_aes_alg java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  =xts"
 ..cra_driver_name  "full-ts-java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 45
 .base.cra_priority = 403,
ecra_flags  =java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 34
 .java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 .base.cra_ctxsize =java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 THIS_MODULEjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 defaultjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 .exit   = xts_fallback_exit,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
KEY_SIZE
.  = -  ;
 .ivsize   = AES_BLOCK_SIZE,
 .setkey   = fullxts_aes_set_keyfor( =nstaticintstructcrypto_aead*, )
 .encrypt,
 (+,ES_BLOCK_SIZE;
}

static int ctr_aes_set_key(struct crypto_skcipher *tfm  :
      unsigned int java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 1
{
 tructs390_aes_ctx*  *)
 unsignedlong java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 8

*Pickthe  codebased   *
 fc =  0
 ( =)  :
  ( =32)? :0

 /* Check if the function code is available */
 ifu    unsigne lenjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  fallback_skcipher_crypt,req )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
ck_skcipher(,in_key,;

  ret skcipher_walk_virt&alk(> )
 memcpy(sctx->key, java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
return 0;
}

ic  _trblk_init( ctrptr,*,nsignedint nbytes)
{
unsigned  ;

 /* only use complete blocks, max. PAGE_SIZE */
memcpy(trptr,iv  gwwalk_bytesjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
 n = (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
(n ) ;i ;- java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  memcpy(ctrptr +  if (ctrptr == ctrblk unsigned, )
  crypto_inc(ctrptr  gw-  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
ctrptr +java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 }
 return n;


staticint (;
{
  <AES_BLOCK_SIZEcopy nbytes
 struct s390_aes_ctx *sctx = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 1
buf[]*java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 struct skcipher_walk =-buf_bytes;
 unsignedint ,nbytesjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
intret,locked;w =0 {

 ret ( - =ULLjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  }

 locked  (_return ret

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 while(  . =){
  n = base.cra_name

  if (nbytes >= 2*base.cra_driver_name = "ctr- 
    _java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
 .iv .ase =,
  cpacf_kmctr(ctx-
      walk... , ctrptr)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  if.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    =g   >java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
          AES_BLOCK_SIZE);
 crypto_inc(alk.v,);
  ret = skcipher_walk_done(&walk, nbytes - setkey =ctr_aes_set_key,

  (w>java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
 mutex_unlock&)
;
  *  goto out
    }
 if (nbytes if (_gcm_sg_clamp_and_map(gw)   unsigned int keylenjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
_LOCK_SIZE;
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
  cpacf_kmctr(sctx->fc, java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
       java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 4
 w...addr ;
  static int g(struct*case:
  
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 break
}

   =
 . ;
 . :
 .  returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
.cra_flags=CRYPTO_ALG_NEED_FALLBACK,
 .
 .base.cra_ctxsize -=.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 .base.  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
     .init = fallback_init_skcipherkey_len=java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
 .{
 . ujava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ize java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 case 12:
 .encrypt  = ctr_aes_crypt,
 .  gw> =java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
 .chunksizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};

static int java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
  unsigned java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 25
{
     gw->buf_bytes = 0;

 switch (keylen _java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 50
case 
 ctx-fc
  static i(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 34
 case AES_KEYSIZE_192:
  ctx-sjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0

 case AES_KEYSIZE_256:
 fc=CPACF_KMA_GCM_AES_256;
reak
 :
 return-;
 }

 memcpy(ctx->key, key, keylen);
 ctx-key_len  intnbytes  java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
>java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 33
}

static scatterwalk_done_dst java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
{
 switch (authsize java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [25, 8) out of bounds for length 8
 case 8:
 case 12:
 case 13:
 case java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
 15:
 case 16:
  break
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
}
 }

turn;
   0

 ( *,  java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 gjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 9
 gw u32; /
 scatterwalk_start}
}

 intgw-  -ddrjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
{
 if   java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  ;
 gw-} param
  gw /*
>uf_bytes+ ;

   *req>:aad|ciphertext|
          nbytes   -src:aad|ciphertext|
{
 gw->walk_bytes_remain -=   = ;
 if  out;
   =*java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
else
  
}

 gw- walk;
 -nbytes=gw-walk_bytes;
 int}

 if gw-buf_bytes& ->  =java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 35
  gw->ptr = gw->buf;
  {
  goto out;
 }

 if    int n =-  
 > =  =
   (ad_bytes  0)
 goto out;
 }

if !java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
  gw->ptr = NULL;
 gw->bytes &w_in   )
  goto out;
 }

(w>&wjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 58
- -.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  -nbytes  >;
 out;
 }

 while (){
  n = min(gw->static int gcm_aes_crypt(struct 
 (- +->,gw-addr )
  gw  =java.lang.StringIndexOutOfBoundsException: Range [26, 20) out of bounds for length 37
 (w, n,false)
>= minbytesneeded){
  gw- =gw-bufjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
   gw-> .java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   goto out;
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  if (!_gcm_sg_clamp_and_map(gw)) { u64taadl; /* Total AAD Length */
   gw->ptr    ->rc |

   goto out;
  }
 }

out:
 return gw->nbytes;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 if    +java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 22
 gw-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 -=;
 goto out;
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 if (!java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  gw->nbytes   =min_t(nsigned ,
  goto out;out_bytes  (gw_out,)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 }

if g- =minbytesneeded){
  ret =    bytes  )&
   aad_bytes=bytes  ~java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 2
  goto out;
 }

  = aes_s390_register_skci&;

 gw->ptr = gw->buf;
     cpacf_test_func(&m_functions,CPACF_KM_XTS_256_FULL){

out:
 return gw->nbytes;
}

done    & )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
{
-ptr=java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
  return 0;

 if (gw->ptr == gw->buf) {
   if !) {
if n 0 
   aes_s390_register_skcipher)
   gw->   ;
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 8
   gw-buf_bytes  ;
  else
  _gcm_sg_unmap_and_advance(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 10

 return bytesdone;
}

java.lang.StringIndexOutOfBoundsException: Range [12, 6) out of bounds for length 39
{
 ;

 decrypt =gcm_aes_decrypt,
  java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 0

 if(-ptr =gw-buf  =java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 for i =0;i  bytesdone;i+ n){
   if (!_gcm_sg_clamp_and_map(gw,
    i;
   n =  struct  *;
   int ret
  gcm_sg_unmap_and_advance,n,true;
 }
 }else
  gcm_sg_unmap_and_advance( bytesdone,true)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

 return bytesdone;
}

static int gcm_aes_crypt(struct  ctrblkjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{
 struct crypto_aead *tfm java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 struct s390_aes_ctx *ctx = crypto_aead_ctx(tfm);
 unsigned int ivsize = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
gned int taglen =crypto_aead_authsize()
 unsigned int aadlen = goto;
 unsigned int pclen = req->;
 int   0;

 , in_bytes out_bytes,
tes, , pc_bytes;
 structret  aes_s390_register_skcipher(cbc_aes_alg)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
u8 GHASH_DIGEST_SIZE];

  {
u32 _[3]; /* reserved */

  u32 cv;   /* Counter Value */
  u8 t[GHASH_DIGEST_SIZE];/* Tag */
  u8 h[aes_s390_register_skcipher(fullxts_aes_alg)
dl /
  u64 tpcl  gotoout_err;
  u8 j0[
 u8 k[ES_MAX_KEY_SIZE] /* Key */
 }param

 /*
  * encrypt
  *   req}
 |ciphertext|tag
  
  *   req->src: aad||ciphertext||tag
  *   goto out_err;
  * aad java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 */

 if  java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
  ;
  cpacf_test_func(kma_functions) ||

 memset(¶m    (kma_functions,CPACF_KMA_GCM_AES_256){
 param.cv = 1;
 .aadl =aadlen* 8;
 if (ret)
 memcpy(param.j0, req->iv goto out_err;
 *(u32 *)(param.j0 + ivsize java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 memcpy(param.k, ctx->key, :

 gcm_walk_start(&gw_in, req->  ret;
 gcm_walk_start(&gw_out, req->dst

 do {
  min_bytes =
     aadlen  0 ? :pclen,);
  in_bytes = gcm_in_walk_go(&gw_in, min_bytes);
  =gcm_out_walk_go(,min_bytes)
 bytes =min(in_bytes,)

  if (aadlen + pclen <= bytes) {
   aad_bytes = aadlen;
   pc_bytes = pclen;
   flags |= CPACF_KMA_LAAD | CPACF_KMA_LPC;
  } else {
   if (aadlen <= bytes) {
    aad_bytes = aadlen;
    pc_bytes = (bytes - aadlen) &
        ~(AES_BLOCK_SIZE - 1);
    flags |= CPACF_KMA_LAAD;
   } else {
    aad_bytes = bytes & ~(AES_BLOCK_SIZE - 1);
    pc_bytes = 0;
   }
  }

  if (aad_bytes > 0)
   memcpy(gw_out.ptr, gw_in.ptr, aad_bytes);

  cpacf_kma(ctx->fc | flags, ¶m,
     gw_out.ptr + aad_bytes,
     gw_in.ptr + aad_bytes, pc_bytes,
     gw_in.ptr, aad_bytes);

  n = aad_bytes + pc_bytes;
  if (gcm_in_walk_done(&gw_in, n) != n)
   return -ENOMEM;
  if (gcm_out_walk_done(&gw_out, n) != n)
   return -ENOMEM;
  aadlen -= aad_bytes;
  pclen -= pc_bytes;
 } while (aadlen + pclen > 0);

 if (flags & CPACF_DECRYPT) {
  scatterwalk_map_and_copy(tag, req->src, len, taglen, 0);
  if (crypto_memneq(tag, param.t, taglen))
   ret = -EBADMSG;
 } else
  scatterwalk_map_and_copy(param.t, req->dst, len, taglen, 1);

 memzero_explicit(¶m, sizeof(param));
 return ret;
}

static int gcm_aes_encrypt(struct aead_request *req)
{
 return gcm_aes_crypt(req, CPACF_ENCRYPT);
}

static int gcm_aes_decrypt(struct aead_request *req)
{
 return gcm_aes_crypt(req, CPACF_DECRYPT);
}

static struct aead_alg gcm_aes_aead = {
 .setkey   = gcm_aes_setkey,
 .setauthsize  = gcm_aes_setauthsize,
 .encrypt  = gcm_aes_encrypt,
 .decrypt  = gcm_aes_decrypt,

 .ivsize   = GHASH_BLOCK_SIZE - sizeof(u32),
 .maxauthsize  = GHASH_DIGEST_SIZE,
 .chunksize  = AES_BLOCK_SIZE,

 .base   = {
  .cra_blocksize  = 1,
  .cra_ctxsize  = sizeof(struct s390_aes_ctx),
  .cra_priority  = 900,
  .cra_name  = "gcm(aes)",
  .cra_driver_name = "gcm-aes-s390",
  .cra_module  = THIS_MODULE,
 },
};

static struct crypto_alg *aes_s390_alg;
static struct skcipher_alg *aes_s390_skcipher_algs[5];
static int aes_s390_skciphers_num;
static struct aead_alg *aes_s390_aead_alg;

static int aes_s390_register_skcipher(struct skcipher_alg *alg)
{
 int ret;

 ret = crypto_register_skcipher(alg);
 if (!ret)
  aes_s390_skcipher_algs[aes_s390_skciphers_num++] = alg;
 return ret;
}

static void aes_s390_fini(void)
{
 if (aes_s390_alg)
  crypto_unregister_alg(aes_s390_alg);
 while (aes_s390_skciphers_num--)
  crypto_unregister_skcipher(aes_s390_skcipher_algs[aes_s390_skciphers_num]);
 if (ctrblk)
  free_page((unsigned long) ctrblk);

 if (aes_s390_aead_alg)
  crypto_unregister_aead(aes_s390_aead_alg);
}

static int __init aes_s390_init(void)
{
 int ret;

 /* Query available functions for KM, KMC, KMCTR and KMA */
 cpacf_query(CPACF_KM, &km_functions);
 cpacf_query(CPACF_KMC, &kmc_functions);
 cpacf_query(CPACF_KMCTR, &kmctr_functions);
 cpacf_query(CPACF_KMA, &kma_functions);

 if (cpacf_test_func(&km_functions, CPACF_KM_AES_128) ||
     cpacf_test_func(&km_functions, CPACF_KM_AES_192) ||
     cpacf_test_func(&km_functions, CPACF_KM_AES_256)) {
  ret = crypto_register_alg(&aes_alg);
  if (ret)
   goto out_err;
  aes_s390_alg = &aes_alg;
  ret = aes_s390_register_skcipher(&ecb_aes_alg);
  if (ret)
   goto out_err;
 }

 if (cpacf_test_func(&kmc_functions, CPACF_KMC_AES_128) ||
     cpacf_test_func(&kmc_functions, CPACF_KMC_AES_192) ||
     cpacf_test_func(&kmc_functions, CPACF_KMC_AES_256)) {
  ret = aes_s390_register_skcipher(&cbc_aes_alg);
  if (ret)
   goto out_err;
 }

 if (cpacf_test_func(&km_functions, CPACF_KM_XTS_128_FULL) ||
     cpacf_test_func(&km_functions, CPACF_KM_XTS_256_FULL)) {
  ret = aes_s390_register_skcipher(&fullxts_aes_alg);
  if (ret)
   goto out_err;
 }

 if (cpacf_test_func(&km_functions, CPACF_KM_XTS_128) ||
     cpacf_test_func(&km_functions, CPACF_KM_XTS_256)) {
  ret = aes_s390_register_skcipher(&xts_aes_alg);
  if (ret)
   goto out_err;
 }

 if (cpacf_test_func(&kmctr_functions, CPACF_KMCTR_AES_128) ||
     cpacf_test_func(&kmctr_functions, CPACF_KMCTR_AES_192) ||
     cpacf_test_func(&kmctr_functions, CPACF_KMCTR_AES_256)) {
  ctrblk = (u8 *) __get_free_page(GFP_KERNEL);
  if (!ctrblk) {
   ret = -ENOMEM;
   goto out_err;
  }
  ret = aes_s390_register_skcipher(&ctr_aes_alg);
  if (ret)
   goto out_err;
 }

 if (cpacf_test_func(&kma_functions, CPACF_KMA_GCM_AES_128) ||
     cpacf_test_func(&kma_functions, CPACF_KMA_GCM_AES_192) ||
     cpacf_test_func(&kma_functions, CPACF_KMA_GCM_AES_256)) {
  ret = crypto_register_aead(&gcm_aes_aead);
  if (ret)
   goto out_err;
  aes_s390_aead_alg = &gcm_aes_aead;
 }

 return 0;
out_err:
 aes_s390_fini();
 return ret;
}

module_cpu_feature_match(S390_CPU_FEATURE_MSA, aes_s390_init);
module_exit(aes_s390_fini);

MODULE_ALIAS_CRYPTO("aes-all");

MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("CRYPTO_INTERNAL");

Messung V0.5 in Prozent
C=96 H=94 G=94

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.