Mercurial > dropbear
diff rsa.c @ 594:a98a2138364a
Improve capitalisation for all logged strings
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 23 Feb 2011 15:50:30 +0000 |
parents | b50f0107e505 |
children | 2b1bb792cd4d 9a5438271556 f336d232fc63 |
line wrap: on
line diff
--- a/rsa.c Wed Feb 23 15:10:31 2011 +0000 +++ b/rsa.c Wed Feb 23 15:50:30 2011 +0000 @@ -67,7 +67,7 @@ } if (mp_count_bits(key->n) < MIN_RSA_KEYLEN) { - dropbear_log(LOG_WARNING, "rsa key too short"); + dropbear_log(LOG_WARNING, "RSA key too short"); goto out; } @@ -302,26 +302,26 @@ /* rsa_s used as a temp var*/ if (mp_exptmod(&rsa_tmp2, key->e, key->n, &rsa_s) != MP_OKAY) { - dropbear_exit("rsa error"); + dropbear_exit("RSA error"); } if (mp_invmod(&rsa_tmp2, key->n, &rsa_tmp3) != MP_OKAY) { - dropbear_exit("rsa error"); + dropbear_exit("RSA error"); } if (mp_mulmod(&rsa_tmp1, &rsa_s, key->n, &rsa_tmp2) != MP_OKAY) { - dropbear_exit("rsa error"); + dropbear_exit("RSA error"); } /* rsa_tmp2 is em' */ /* s' = (em')^d mod n */ if (mp_exptmod(&rsa_tmp2, key->d, key->n, &rsa_tmp1) != MP_OKAY) { - dropbear_exit("rsa error"); + dropbear_exit("RSA error"); } /* rsa_tmp1 is s' */ /* rsa_tmp3 is r^(-1) mod n */ /* s = (s')r^(-1) mod n */ if (mp_mulmod(&rsa_tmp1, &rsa_tmp3, key->n, &rsa_s) != MP_OKAY) { - dropbear_exit("rsa error"); + dropbear_exit("RSA error"); } #else @@ -329,7 +329,7 @@ /* s = em^d mod n */ /* rsa_tmp1 is em */ if (mp_exptmod(&rsa_tmp1, key->d, key->n, &rsa_s) != MP_OKAY) { - dropbear_exit("rsa error"); + dropbear_exit("RSA error"); } #endif /* RSA_BLINDING */ @@ -351,7 +351,7 @@ } if (mp_to_unsigned_bin(&rsa_s, buf_getwriteptr(buf, ssize)) != MP_OKAY) { - dropbear_exit("rsa error"); + dropbear_exit("RSA error"); } buf_incrwritepos(buf, ssize); mp_clear(&rsa_s);