C RUBY-ON-RAILS MYSQL ASP.NET DEVELOPMENT RUBY .NET LINUX SQL-SERVER REGEX WINDOWS ALGORITHM ECLIPSE VISUAL-STUDIO STRING SVN PERFORMANCE APACHE-FLEX UNIT-TESTING SECURITY LINQ UNIX MATH EMAIL OOP LANGUAGE-AGNOSTIC VB6 MSBUILD

# Generating a 4096-bit RSA key is way slower than 2048-bit using Jsch

By : user2955745
Date : November 22 2020, 10:48 AM
This might help you Generating an RSA key requires finding two large, random prime numbers that satisfy certain criteria. Finding such primes is essentially a matter of picking random numbers and then checking if they are prime or not by performing certain tests. The Prime Number Theorem tells us that as prime numbers get bigger, they also get rarer so you have to generate more random numbers in order to find one that's prime. The checking to determine whether the number is prime also takes longer for bigger numbers.
All of the above factors contribute to the increased time it takes to generate larger keys, however this aside, it sounds like this library just isn't particularly fast. Using OpenSSL on a reasonably modern PC I can generate a 2048 bit key in ~1 second and a 4096 bit key in <10 seconds, so your times of 10 secs and 3-5 mins seems excessive. If performance is an issue, I'd suggest trying a different library, with the understanding than any library is going to be slower to generate big keys than smaller ones!
code :

Share :

## how to create 4096 aligned table[x][4096]

By : Michael Siwan Hutaba
Date : March 29 2020, 07:55 AM
Does that help I want to get a table of [x][4096] (for example int table[4096][4096]) but I am not sure how to do it - especially in more generel way (it is on many compilers also the older ones (mingw, dmc, lcc, b55) , You can over allocate and fine tune the pointer:
code :
`````` int *a = malloc(4096*4096*4+4095);
int *b = (int*) (((int)a)+4095 & (~4095)));
``````
``````#include <string.h>
#include <stdio.h>
int main()
{
int *a = malloc(64);
int *b = malloc(64);
long long excess = ((long)b - (long)a)-64;
int *c = malloc(4096 - (((int)(b) & 4095) + excess*2 + 64));
int *d = malloc(4096*4);
printf("%x %x %x %x\n",
(int)a & 0xffffffff,(int)b & 0xffffffff,
(int)c & 0xffffffff,(int)d & 0xffffffff);
}
``````

## Trying to load 150+ grayscale 4096 x 4096 bitmaps. Need help getting around the 2GB limit, I think

By : Jason B.
Date : March 29 2020, 07:55 AM
it helps some times There should be no issues loading more than 2gb of bitmaps into memory in a 64bit app (check project settings - might have to create a new configuration for Any CPU based on x86) running on 64bit OS (I'm guessing you are). Also a simple list should work:
code :
``````    var imageFiles = Directory.EnumerateFiles(@"C:\Temp", "*.bmp", SearchOption.TopDirectoryOnly).ToList();
var lst = new List<Bitmap>();
foreach (var imageFile in imageFiles)
{
}
``````

## How can i load bigger textures than 4096*4096 in xna?

By : TaniOS
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further You can't get around loading the max size of a texture in XNA. Your best bet is loading it as a bitmap using System.Drawing.Bitmap and resizing it as a bitmap then load it as a texture.

## Difference between passing 1024 and 2048 while generating Digital certificate

By : James Smith
Date : March 29 2020, 07:55 AM
wish helps you The third parameter of RSAKeyGenerationParameters is