Deleted Added
full compact
cryptosoft.c (184205) cryptosoft.c (184477)
1/* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */
2
3/*-
4 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
5 * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
6 *
7 * This code was written by Angelos D. Keromytis in Athens, Greece, in
8 * February 2000. Network Security Technologies Inc. (NSTI) kindly

--- 9 unchanged lines hidden (view full) ---

18 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
19 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
20 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
21 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
22 * PURPOSE.
23 */
24
25#include <sys/cdefs.h>
1/* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */
2
3/*-
4 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
5 * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
6 *
7 * This code was written by Angelos D. Keromytis in Athens, Greece, in
8 * February 2000. Network Security Technologies Inc. (NSTI) kindly

--- 9 unchanged lines hidden (view full) ---

18 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
19 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
20 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
21 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
22 * PURPOSE.
23 */
24
25#include <sys/cdefs.h>
26__FBSDID("$FreeBSD: head/sys/opencrypto/cryptosoft.c 184205 2008-10-23 15:53:51Z des $");
26__FBSDID("$FreeBSD: head/sys/opencrypto/cryptosoft.c 184477 2008-10-30 16:11:07Z dfr $");
27
28#include <sys/param.h>
29#include <sys/systm.h>
30#include <sys/malloc.h>
31#include <sys/mbuf.h>
32#include <sys/module.h>
33#include <sys/sysctl.h>
34#include <sys/errno.h>

--- 312 unchanged lines hidden (view full) ---

347 else
348 ivp = iv;
349 }
350
351 idat += blks;
352 k += blks;
353 i -= blks;
354 }
27
28#include <sys/param.h>
29#include <sys/systm.h>
30#include <sys/malloc.h>
31#include <sys/mbuf.h>
32#include <sys/module.h>
33#include <sys/sysctl.h>
34#include <sys/errno.h>

--- 312 unchanged lines hidden (view full) ---

347 else
348 ivp = iv;
349 }
350
351 idat += blks;
352 k += blks;
353 i -= blks;
354 }
355 if (k == iov->iov_len) {
356 iov++;
357 k = 0;
358 }
355 }
356
357 return 0; /* Done with iovec encryption/decryption */
358 } else { /* contiguous buffer */
359 if (crd->crd_flags & CRD_F_ENCRYPT) {
360 for (i = crd->crd_skip;
361 i < crd->crd_skip + crd->crd_len; i += blks) {
362 /* XOR with the IV/previous block, as appropriate. */

--- 711 unchanged lines hidden ---
359 }
360
361 return 0; /* Done with iovec encryption/decryption */
362 } else { /* contiguous buffer */
363 if (crd->crd_flags & CRD_F_ENCRYPT) {
364 for (i = crd->crd_skip;
365 i < crd->crd_skip + crd->crd_len; i += blks) {
366 /* XOR with the IV/previous block, as appropriate. */

--- 711 unchanged lines hidden ---