Explicit conversions to int from size_t for MSVC (64-bit) in apps
diff --git a/programs/pkey/dh_client.c b/programs/pkey/dh_client.c
index 18027fa..2d729df 100644
--- a/programs/pkey/dh_client.c
+++ b/programs/pkey/dh_client.c
@@ -215,7 +215,7 @@
     fflush( stdout );
 
     n = dhm.len;
-    if( ( ret = dhm_make_public( &dhm, dhm.len, buf, n,
+    if( ( ret = dhm_make_public( &dhm, (int) dhm.len, buf, n,
                                  ctr_drbg_random, &ctr_drbg ) ) != 0 )
     {
         printf( " failed\n  ! dhm_make_public returned %d\n\n", ret );
diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c
index d2b6cc4..245f6f0 100644
--- a/programs/pkey/dh_server.c
+++ b/programs/pkey/dh_server.c
@@ -178,7 +178,7 @@
 
     memset( buf, 0, sizeof( buf ) );
 
-    if( ( ret = dhm_make_params( &dhm, mpi_size( &dhm.P ), buf, &n,
+    if( ( ret = dhm_make_params( &dhm, (int) mpi_size( &dhm.P ), buf, &n,
                                  ctr_drbg_random, &ctr_drbg ) ) != 0 )
     {
         printf( " failed\n  ! dhm_make_params returned %d\n\n", ret );
diff --git a/programs/pkey/key_app.c b/programs/pkey/key_app.c
index 796f237..e6e9765 100644
--- a/programs/pkey/key_app.c
+++ b/programs/pkey/key_app.c
@@ -149,7 +149,7 @@
             fgets( buf, sizeof(buf), f );
             fclose( f );
 
-            i = strlen( buf );
+            i = (int) strlen( buf );
             if( buf[i - 1] == '\n' ) buf[i - 1] = '\0';
             if( buf[i - 2] == '\r' ) buf[i - 2] = '\0';
             opt.password = buf;
diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c
index 4d5a06b..34219c5 100644
--- a/programs/test/benchmark.c
+++ b/programs/test/benchmark.c
@@ -419,13 +419,13 @@
             mpi_read_string( &dhm.P, 16, dhm_P[i] );
             mpi_read_string( &dhm.G, 16, dhm_G[i] );
             dhm.len = mpi_size( &dhm.P );
-            dhm_make_public( &dhm, dhm.len, buf, dhm.len, myrand, NULL );
+            dhm_make_public( &dhm, (int) dhm.len, buf, dhm.len, myrand, NULL );
             mpi_copy( &dhm.GY, &dhm.GX );
 
             snprintf( title, sizeof( title ), "DHE-%d", dhm_sizes[i] );
             TIME_PUBLIC( title, "handshake",
                     olen = sizeof( buf );
-                    ret |= dhm_make_public( &dhm, dhm.len, buf, dhm.len,
+                    ret |= dhm_make_public( &dhm, (int) dhm.len, buf, dhm.len,
                                             myrand, NULL );
                     ret |= dhm_calc_secret( &dhm, buf, &olen, myrand, NULL ) );