Lines Matching defs:krp

1680 	struct cryptkop *krp;
1704 krp = me->me_krp;
1706 clen = (krp->krp_param[krp->krp_iparams].crp_nbits + 7) / 8;
1714 krp->krp_status = E2BIG;
1717 bzero(krp->krp_param[krp->krp_iparams].crp_p,
1718 (krp->krp_param[krp->krp_iparams].crp_nbits
1721 krp->krp_param[krp->krp_iparams].crp_p,
1726 krp->krp_param[krp->krp_iparams].crp_p,
1727 krp->krp_param[krp->krp_iparams].crp_nbits);
1730 crypto_kdone(krp);
1746 krp = rp->rpr_krp;
1750 len = (krp->krp_param[UBS_RSAPRIV_PAR_MSGOUT].crp_nbits + 7) / 8;
1752 krp->krp_param[UBS_RSAPRIV_PAR_MSGOUT].crp_p, len);
1754 crypto_kdone(krp);
2105 ubsec_kprocess(device_t dev, struct cryptkop *krp, int hint)
2110 if (krp == NULL || krp->krp_callback == NULL)
2121 switch (krp->krp_op) {
2124 r = ubsec_kprocess_modexp_hw(sc, krp, hint);
2126 r = ubsec_kprocess_modexp_sw(sc, krp, hint);
2129 return (ubsec_kprocess_rsapriv(sc, krp, hint));
2132 krp->krp_op);
2133 krp->krp_status = EOPNOTSUPP;
2134 crypto_kdone(krp);
2144 ubsec_kprocess_modexp_sw(struct ubsec_softc *sc, struct cryptkop *krp, int hint)
2159 me->me_krp = krp;
2162 nbits = ubsec_ksigbits(&krp->krp_param[UBS_MODEXP_PAR_N]);
2185 if (krp->krp_param[krp->krp_iparams].crp_nbits < nbits) {
2203 mbits = ubsec_ksigbits(&krp->krp_param[UBS_MODEXP_PAR_M]);
2213 krp->krp_param[UBS_MODEXP_PAR_M].crp_p, mbits,
2222 ebits = ubsec_ksigbits(&krp->krp_param[UBS_MODEXP_PAR_E]);
2232 krp->krp_param[UBS_MODEXP_PAR_E].crp_p, ebits,
2281 krp->krp_param[UBS_MODEXP_PAR_N].crp_p, nbits,
2337 krp->krp_status = err;
2338 crypto_kdone(krp);
2346 ubsec_kprocess_modexp_hw(struct ubsec_softc *sc, struct cryptkop *krp, int hint)
2361 me->me_krp = krp;
2364 nbits = ubsec_ksigbits(&krp->krp_param[UBS_MODEXP_PAR_N]);
2388 if (krp->krp_param[krp->krp_iparams].crp_nbits < nbits) {
2406 mbits = ubsec_ksigbits(&krp->krp_param[UBS_MODEXP_PAR_M]);
2416 bcopy(krp->krp_param[UBS_MODEXP_PAR_M].crp_p,
2425 ebits = ubsec_ksigbits(&krp->krp_param[UBS_MODEXP_PAR_E]);
2435 bcopy(krp->krp_param[UBS_MODEXP_PAR_E].crp_p,
2483 bcopy(krp->krp_param[UBS_MODEXP_PAR_N].crp_p, ctx->me_N,
2538 krp->krp_status = err;
2539 crypto_kdone(krp);
2544 ubsec_kprocess_rsapriv(struct ubsec_softc *sc, struct cryptkop *krp, int hint)
2552 msglen = ubsec_ksigbits(&krp->krp_param[UBS_RSAPRIV_PAR_P]);
2553 padlen = ubsec_ksigbits(&krp->krp_param[UBS_RSAPRIV_PAR_Q]);
2572 if (ubsec_ksigbits(&krp->krp_param[UBS_RSAPRIV_PAR_DP]) > padlen) {
2577 if (ubsec_ksigbits(&krp->krp_param[UBS_RSAPRIV_PAR_DQ]) > padlen) {
2582 if (ubsec_ksigbits(&krp->krp_param[UBS_RSAPRIV_PAR_PINV]) > padlen) {
2591 rp->rpr_krp = krp;
2610 bcopy(krp->krp_param[UBS_RSAPRIV_PAR_P].crp_p,
2612 (krp->krp_param[UBS_RSAPRIV_PAR_P].crp_nbits + 7) / 8);
2615 bcopy(krp->krp_param[UBS_RSAPRIV_PAR_Q].crp_p,
2617 (krp->krp_param[UBS_RSAPRIV_PAR_Q].crp_nbits + 7) / 8);
2620 bcopy(krp->krp_param[UBS_RSAPRIV_PAR_DP].crp_p,
2622 (krp->krp_param[UBS_RSAPRIV_PAR_DP].crp_nbits + 7) / 8);
2625 bcopy(krp->krp_param[UBS_RSAPRIV_PAR_DQ].crp_p,
2627 (krp->krp_param[UBS_RSAPRIV_PAR_DQ].crp_nbits + 7) / 8);
2630 bcopy(krp->krp_param[UBS_RSAPRIV_PAR_PINV].crp_p,
2632 (krp->krp_param[UBS_RSAPRIV_PAR_PINV].crp_nbits + 7) / 8);
2637 if (ubsec_ksigbits(&krp->krp_param[UBS_RSAPRIV_PAR_MSGIN]) > msglen) {
2647 bcopy(krp->krp_param[UBS_RSAPRIV_PAR_MSGIN].crp_p,
2649 (krp->krp_param[UBS_RSAPRIV_PAR_MSGIN].crp_nbits + 7) / 8);
2652 if (ubsec_ksigbits(&krp->krp_param[UBS_RSAPRIV_PAR_MSGOUT]) < msglen) {
2722 krp->krp_status = err;
2723 crypto_kdone(krp);