From 2ccb4360c12da604035f2d652c9bf6977c52af4b Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Wed, 3 Jul 2002 00:24:30 +0000 Subject: But when denormalizing we need the normalized length, too as well as the destination length. --- sys/dev/pci/ubsec.c | 5 +++-- sys/dev/pci/ubsecvar.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c index 983c9d01c9b..60c5d2d248e 100644 --- a/sys/dev/pci/ubsec.c +++ b/sys/dev/pci/ubsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ubsec.c,v 1.104 2002/07/03 00:19:33 jason Exp $ */ +/* $OpenBSD: ubsec.c,v 1.105 2002/07/03 00:24:29 jason Exp $ */ /* * Copyright (c) 2000 Jason L. Wright (jason@thought.net) @@ -1407,7 +1407,7 @@ ubsec_callback2(sc, q) krp->krp_status = E2BIG; else ubsec_kshift_l(me->me_shiftbits, - me->me_C.dma_vaddr, me->me_modbits, + me->me_C.dma_vaddr, me->me_normbits, krp->krp_param[UBS_MODEXP_PAR_C].crp_p, krp->krp_param[UBS_MODEXP_PAR_C].crp_nbits); @@ -1850,6 +1850,7 @@ ubsec_kprocess_modexp(sc, krp) me->me_modbits = nbits; me->me_shiftbits = shiftbits; + me->me_normbits = normbits; /* Sanity check: result bits must be >= true modulus bits. */ if (krp->krp_param[UBS_MODEXP_PAR_C].crp_nbits < nbits) { diff --git a/sys/dev/pci/ubsecvar.h b/sys/dev/pci/ubsecvar.h index fb861fa5e6d..bd2a46cd952 100644 --- a/sys/dev/pci/ubsecvar.h +++ b/sys/dev/pci/ubsecvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ubsecvar.h,v 1.33 2002/05/15 15:15:42 jason Exp $ */ +/* $OpenBSD: ubsecvar.h,v 1.34 2002/07/03 00:24:29 jason Exp $ */ /* * Copyright (c) 2000 Theo de Raadt @@ -88,6 +88,7 @@ struct ubsec_q2_modexp { struct ubsec_dma_alloc me_epb; int me_modbits; int me_shiftbits; + int me_normbits; }; #define UBS_RSAPRIV_PAR_P 0 -- cgit v1.2.3