glxsb.c (c03414326909ed7a740be3ba63fbbef01fe513a8) glxsb.c (29fe41ddd714bae92a09fd4098fad614945bedf5)
1/* $OpenBSD: glxsb.c,v 1.7 2007/02/12 14:31:45 tom Exp $ */
2
3/*
4 * Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
5 * Copyright (c) 2003, 2004 Theo de Raadt
6 * Copyright (c) 2003 Jason Wright
7 *
8 * Permission to use, copy, modify, and distribute this software for any

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

654 op_psrc = sc->sc_dma.dma_paddr;
655 op_pdst = sc->sc_dma.dma_paddr + xlen;
656
657 if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op))
658 control = SB_CTL_ENC;
659 else
660 control = SB_CTL_DEC;
661
1/* $OpenBSD: glxsb.c,v 1.7 2007/02/12 14:31:45 tom Exp $ */
2
3/*
4 * Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
5 * Copyright (c) 2003, 2004 Theo de Raadt
6 * Copyright (c) 2003 Jason Wright
7 *
8 * Permission to use, copy, modify, and distribute this software for any

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

654 op_psrc = sc->sc_dma.dma_paddr;
655 op_pdst = sc->sc_dma.dma_paddr + xlen;
656
657 if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op))
658 control = SB_CTL_ENC;
659 else
660 control = SB_CTL_DEC;
661
662 if (crp->crp_flags & CRYPTO_F_IV_GENERATE) {
663 arc4rand(op_iv, sizeof(op_iv), 0);
664 crypto_copyback(crp, crp->crp_iv_start, sizeof(op_iv), op_iv);
665 } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE)
666 memcpy(op_iv, crp->crp_iv, sizeof(op_iv));
667 else
668 crypto_copydata(crp, crp->crp_iv_start, sizeof(op_iv), op_iv);
662 crypto_read_iv(crp, op_iv);
669
670 offset = 0;
671 tlen = crp->crp_payload_length;
672
673 if (crp->crp_cipher_key != NULL)
674 key = crp->crp_cipher_key;
675 else
676 key = ses->ses_key;

--- 103 unchanged lines hidden ---
663
664 offset = 0;
665 tlen = crp->crp_payload_length;
666
667 if (crp->crp_cipher_key != NULL)
668 key = crp->crp_cipher_key;
669 else
670 key = ses->ses_key;

--- 103 unchanged lines hidden ---