- Removed deprecated casts to int for now unsigned values

diff --git a/library/rsa.c b/library/rsa.c
index 90ea54b..1a6a162 100644
--- a/library/rsa.c
+++ b/library/rsa.c
@@ -482,7 +482,7 @@
 
     ilen = ctx->len;
 
-    if( ilen < 16 || ilen > (int) sizeof( buf ) )
+    if( ilen < 16 || ilen > sizeof( buf ) )
         return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
 
     ret = ( mode == RSA_PUBLIC )
@@ -565,10 +565,10 @@
             return( POLARSSL_ERR_RSA_INVALID_PADDING );
     }
 
-    if (ilen - (int)(p - buf) > output_max_len)
+    if (ilen - (p - buf) > output_max_len)
         return( POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE );
 
-    *olen = ilen - (int)(p - buf);
+    *olen = ilen - (p - buf);
     memcpy( output, p, *olen );
 
     return( 0 );
@@ -826,7 +826,7 @@
 #endif
     siglen = ctx->len;
 
-    if( siglen < 16 || siglen > (int) sizeof( buf ) )
+    if( siglen < 16 || siglen > sizeof( buf ) )
         return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
 
     ret = ( mode == RSA_PUBLIC )
@@ -853,7 +853,7 @@
             }
             p++;
 
-            len = siglen - (int)( p - buf );
+            len = siglen - ( p - buf );
 
             if( len == 34 )
             {