RSA Encryption
hi guys..
i have this little task to do but have no idea how to go about it
Using java develop applications capable of encrypting and decrypting information passed between two machines.
Assume that there are two machines A and B where A will provide the public key for RSA (i.e. Rivest, Shamir) encryption to B for encrypting messages that B will send to A. The values of the two prime numbers p and q which will combine to make up part of the public key are p = 41 and q = 23. The second relative prime number also given to B is e = 7 the private exponent for A is d = 503.
does anyone know how to go about this !!!!!!!!!!!!!!!!!
all help is greatly appreciated
thanks in advance
[723 byte] By [
xtodamixa] at [2007-11-26 18:44:27]

# 1
> i have this little task to do but have no idea how to go about it
Are you talking a about a concrete implementation with JavaCard or just the cryptographic theory?
> Using java develop applications capable of encrypting and decrypting information passed between two machines.
> [Description of the RSA algorithm]
> does anyone know how to go about this !!!!!!!!!!!!!!!!!
I don't see where your problem lies.
Assuming that B has generated a RSA key pair and the public key has been transfered over a trusted channel to A. depending an the amount of data to be transmitted from A to B you can use either plain RSA or an RSA-hybrid scheme.
For a plain RSA scheme A paddes the data to be transmitted so that it is a multiple of the key length (e.g. 1024 bit = 128 byte), then encrypt the data block by block (e.g. using the CBC mode). Then send the encrypted to B which decrypts unpads it.
For RSA-hybrid sheme an additional symmetric encryption algorithm is used. Instead of encrypting all the data by RSA (which is a bit slow) only one randomly generated symmetric key is encrypted via RSA. The data to be transfered is encrypted by the randomly generated symmetric key. Both, the RSA-encrypted symmetric key and the asymmetric encrypted data are transfered to B which reverses the process.
Jan