projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added SILC Server library.
[silc.git]
/
lib
/
silccrypt
/
rsa.c
diff --git
a/lib/silccrypt/rsa.c
b/lib/silccrypt/rsa.c
index b905a794925d39706ab53893a6fa55d2c3bf17eb..18399a5a393a0c49707d0803dad3eb402b27dab8 100644
(file)
--- a/
lib/silccrypt/rsa.c
+++ b/
lib/silccrypt/rsa.c
@@
-75,7
+75,7
@@
*/
*/
-#include "silc
includes
.h"
+#include "silc.h"
#include "rsa_internal.h"
#include "rsa.h"
#include "rsa_internal.h"
#include "rsa.h"
@@
-89,7
+89,7
@@
SILC_PKCS_API_INIT(rsa)
{
SilcUInt32 prime_bits = keylen / 2;
SilcMPInt p, q;
{
SilcUInt32 prime_bits = keylen / 2;
SilcMPInt p, q;
-
b
ool found = FALSE;
+
SilcB
ool found = FALSE;
if (keylen < 768 || keylen > 16384)
return FALSE;
if (keylen < 768 || keylen > 16384)
return FALSE;
@@
-767,7
+767,7
@@
SILC_PKCS_API_VERIFY(pkcs1)
to compute the modulus n has to be generated before calling this. They
are then sent as argument for the function. */
to compute the modulus n has to be generated before calling this. They
are then sent as argument for the function. */
-
b
ool rsa_generate_keys(RsaKey *key, SilcUInt32 bits,
+
SilcB
ool rsa_generate_keys(RsaKey *key, SilcUInt32 bits,
SilcMPInt *p, SilcMPInt *q)
{
SilcMPInt phi, hlp;
SilcMPInt *p, SilcMPInt *q)
{
SilcMPInt phi, hlp;
@@
-843,7
+843,7
@@
bool rsa_generate_keys(RsaKey *key, SilcUInt32 bits,
/* Clears whole key structure. */
/* Clears whole key structure. */
-
b
ool rsa_clear_keys(RsaKey *key)
+
SilcB
ool rsa_clear_keys(RsaKey *key)
{
key->bits = 0;
if (key->pub_set) {
{
key->bits = 0;
if (key->pub_set) {
@@
-865,7
+865,7
@@
bool rsa_clear_keys(RsaKey *key)
/* RSA public key operation */
/* RSA public key operation */
-
b
ool rsa_public_operation(RsaKey *key, SilcMPInt *src, SilcMPInt *dst)
+
SilcB
ool rsa_public_operation(RsaKey *key, SilcMPInt *src, SilcMPInt *dst)
{
/* dst = src ^ e mod n */
silc_mp_pow_mod(dst, src, &key->e, &key->n);
{
/* dst = src ^ e mod n */
silc_mp_pow_mod(dst, src, &key->e, &key->n);
@@
-874,7
+874,7
@@
bool rsa_public_operation(RsaKey *key, SilcMPInt *src, SilcMPInt *dst)
/* RSA private key operation */
/* RSA private key operation */
-
b
ool rsa_private_operation(RsaKey *key, SilcMPInt *src, SilcMPInt *dst)
+
SilcB
ool rsa_private_operation(RsaKey *key, SilcMPInt *src, SilcMPInt *dst)
{
if (!key->crt) {
/* dst = src ^ d mod n */
{
if (!key->crt) {
/* dst = src ^ d mod n */