I am not going to lie, this is for a class project but I am lost and can't figure out where things are going wrong. We were tasked with coding an RSA algorithim based off a lab we previously did in class. The lab and project description can be found in the attached files. Now we need to use very large prime numbers 100+ digits long large. To get around c++ data size limit of long long I am using a third party library called BigInteger. The program already has 2 primes put into for use to calculte the modulus …

Member Avatar
+0 forum 0

Microsoft first started warning people that the there was going to be an important change to Windows' certificate requirements back in June. A change that is designed to improve security across the Windows platform by way of increasing the RSA key length to a minimum of 1024 bits for certificates used in Public Key Infrastructure (PKI). That requirement change happens today, October 9th, but are you one of those people who, as Angela Gunn from Microsoft Security Response Center puts it, has "systems and applications that have been tucked away to collect dust and cobwebs because they 'still work' and …

Member Avatar
Member Avatar
+0 forum 2

#include<stdio.h> #include<time.h> #include<conio.h> #include<string.h> #include<math.h> #include<stdlib.h> int p,q,r; int i,t[100],t1[100],t2[100]; char M[100],C[100]; int phi,n,e=53,d=11; int cipher(int t) { int i,temp; temp = 1; for(i=0;i< e;i++) temp = temp * t % n; temp = temp % n; return temp; } int plain(int t) { int temp,i; temp = 1; for(i=0; i< d; i++) temp=temp * t % n; temp = temp % n; return temp; } void prime() { int i; int flag=0; long int r; randomize(); r=random(100); // printf("%ld\t",r); for(i=2;i<=(r/2);i++) { if(r%i==0) { flag=1; break; } } if(flag==0) { if(q==0) q=r; else if(p==0) p=r; } } int gcd( int …

Member Avatar
Member Avatar
+0 forum 1

hello,I Need RSA system code with javascript ,i heared there're some rsa libraries in the internet , i looked for it , and i found some thing but it's not what i look for , i look for library applied (PKCS #1 v2.1) or (PKCS 12 v1.0),i have project and i like to applied rsa system in client side of the web (by javascript).THANKS FOR YOUR HELP.

Member Avatar
Member Avatar
+0 forum 4

So I'm trying to write this program in C that will take a message the user types in and encrypt it using an RSA public key that the user supplies. I know there are encryption functions and libraries in C but I want to actually recreate the algorithm in code to make this work. When I try to run the program, you can type in the message and the key but it just returns a value of 1 or 0 for the encrypted message. Here is my code, hope somebody can give me some advice! By the way I am …

Member Avatar
Member Avatar
+0 forum 1

I am implementing RSA in C++ and here's my design(code structure). *keygen.h* namespace rsa{ class keygen{ public: //Constructor keygen(size); //Generate keys void generate(); //Getters string gete(){ return xyz; } .. .. .. private: //initializes bignums void initall(); keygen(){} //Private Member variables goes here } } *prime.h* namespace rsa{ //First 100 primes unsigned int primes[]={2,3,5,7,11.....541}; //MillarRabin Primality bool isPrime(mpz_t, unsigned short); //Get Random Prime void getPrime(mpz_t, mpz_t) } *endec.h* namespace rsa{ //Encryption string encryption(string text, const string& n, const string& e); //Decryption string decryption(string cipher, const string& n, const string& d); } **Is this a good design? How can I make …

Member Avatar
+0 forum 0

I have been programming in C++ for a while now. I heard about RSA Encryption algorithm, and i have read many online sites on how it works. But i still cant grasp how the algorithm works. i have tried to make programs with RSA, but they doesnt encrypt. If you could please explain the algorithm and how to use it in a program that encrypt files in c++ or c. Thankyou... :icon_neutral:

Member Avatar
Member Avatar
+0 forum 1

Hi trying to recover an RSA encrypted 5 character word using a forward search dictionary attack in Python but having difficulty. The word was encrypted in 2 24 bit blocks (3648141 5604637) padding last block with a space e = 5 n = 21508387 table = {} for ptext in range(65,90): ctext = pow(ptext,e,n) table[ctext] = ptext print table I know I need to do the above so that it decrypts all combinations 3 characters long AAA AAB... ZZA ZZB, etc by making the for loop gor around 3 times before applying the pow but what I have only decrypts …

Member Avatar
+0 forum 0

I am working for encryption and decryption using rsa algorithm ,and adding my own concept in rsa, after rsa and padding i m getting a string like- 100011234A12300A12A231A234A981A for different input output string is increase... Is there any technique by use of that i can compact this string [ then easy store in database and retrieve and convert into real form when required]

Member Avatar
Member Avatar
+0 forum 3

Hi I have a problem with RSA encryption/decription of txt files, I have one method to create a pair of RSA keys and save them into a file, then i made two methods, one for encryt and one for decrypt, encrypt method works fine, but when I want to decrypt it shows this exception javax.crypto.BadPaddingException: Data must start with zero, any help would be very apreciated. Heres the code for create the RSA keypair into a file: [CODE]public void generateKeys() throws NoSuchAlgorithmException, NoSuchProviderException, FileNotFoundException, IOException{ int keysize = 1024; KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN"); keyGen.initialize(keysize, random); …

Member Avatar
+0 forum 0

Hi, I need to find p,q and e values for RSA. Here is a simple & short description of RSA. [QUOTE]Your enter a word (actually it is a sentence but for now a word) then program will convert letters to numbers (like a=1 m=13 etc.) and group them. Use with all given values n=pq (n is the modulus). C=(m^e) (mod n ) where C is encrypted message m is numbers (converted from letters). [/QUOTE] I can decrypt for known values of p,q,e. But i can't find these values. Here are the steps: 1. Enter encrypted message. 2. Program will try …

Member Avatar
Member Avatar
+0 forum 3

Some might argue that it has been a bad year for encryption. After all, just as the last decade was ending came reports that the algorithm that is used to encrypt GSM mobile phone calls (as used by some 4 billion people around the world) had been cracked wide open. Now this has been followed by the announcement that 768-bit RSA encryption has been cracked. I'm inclined to think that this is a good thing, and am happy to explain why starting with GSM encryption. The GSM Association responsible for developing the algorithm in the first place responded by stating …

Member Avatar
Member Avatar
+3 forum 3

How would one calculate the number of bytes of plaintext that could be encrypted as a single block given the key size? And how could you then calculate the number of bytes of cipher text that can be decrypted in a single block given the same key size because I am told that the two sizes are different. I tried using [code=java]Cipher.getBlockSize()[/code] but that only returns 0. Thanks for your help.

Member Avatar
Member Avatar
+0 forum 12

The End.