algif_skcipher.c (73cf7e111ed69d8e1b59a3ae41b14bc77215e9ee) | algif_skcipher.c (11edb555966ed2c66c533d17c604f9d7e580a829) |
---|---|
1/* 2 * algif_skcipher: User-space interface for skcipher algorithms 3 * 4 * This file provides the user-space API for symmetric key ciphers. 5 * 6 * Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au> 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 58 unchanged lines hidden (view full) --- 67 struct af_alg_ctx *ctx = ask->private; 68 struct skcipher_tfm *skc = pask->private; 69 struct crypto_skcipher *tfm = skc->skcipher; 70 unsigned int bs = crypto_skcipher_blocksize(tfm); 71 struct af_alg_async_req *areq; 72 int err = 0; 73 size_t len = 0; 74 | 1/* 2 * algif_skcipher: User-space interface for skcipher algorithms 3 * 4 * This file provides the user-space API for symmetric key ciphers. 5 * 6 * Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au> 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 58 unchanged lines hidden (view full) --- 67 struct af_alg_ctx *ctx = ask->private; 68 struct skcipher_tfm *skc = pask->private; 69 struct crypto_skcipher *tfm = skc->skcipher; 70 unsigned int bs = crypto_skcipher_blocksize(tfm); 71 struct af_alg_async_req *areq; 72 int err = 0; 73 size_t len = 0; 74 |
75 if (!ctx->used) { 76 err = af_alg_wait_for_data(sk, flags); 77 if (err) 78 return err; 79 } 80 |
|
75 /* Allocate cipher request for current operation. */ 76 areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) + 77 crypto_skcipher_reqsize(tfm)); 78 if (IS_ERR(areq)) 79 return PTR_ERR(areq); 80 81 /* convert iovecs of output buffers into RX SGL */ 82 err = af_alg_get_rsgl(sk, msg, flags, areq, -1, &len); --- 353 unchanged lines hidden --- | 81 /* Allocate cipher request for current operation. */ 82 areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) + 83 crypto_skcipher_reqsize(tfm)); 84 if (IS_ERR(areq)) 85 return PTR_ERR(areq); 86 87 /* convert iovecs of output buffers into RX SGL */ 88 err = af_alg_get_rsgl(sk, msg, flags, areq, -1, &len); --- 353 unchanged lines hidden --- |