> David Huang wrote:
> 
> Hi there,
> 
> I need to use the AES symmetric algorithm, RSA algorithm to encrypt
> large data string or file, like 300k, or 1M.
> right now, I have finished the AES(
> CBCPaddedEncryptor/CBCPaddedDecryptor) and RSA(RSAES_PKCS1v15)
> algorithms development, but can only encrypt limlited length of data.

AES is a block cipher, RSA is a public key cryptosystem. Although they
can both be used to encrypt/decrypt data, they're typically used in very
different environments for different purposes.

>From what you're writing, it seems you're going to interchange one
another. That would be a mistake.

Please make a step backward and tell us which problem you need to solve,
starting from what you want to obtain, not how.

> So, I need to devide those large "string" into blocks. but I do not
> know how to determine the sizes of blocks.
> for example, we use RSA to encrypt data, if the key size is 512, what
> block size I should to choose?, if key size is 2048, what another
> block size I should choose? is there any equations in this library
> that I can calculate it?

You're trying to make improper use of the RSA-PKCSv1.5 scheme.

> 
> for the AES CBC block cipher, should we keep the "iv" and "key" the
> same?

Definitly not, the IV is typically transmitted in clear, while the key
is not, and sometimes not even trasmitted at all.


-- 
Giuliano Bertoletti
e-Security Manager


Intrinsic - Security Monitoring
http://www.intrinsic.it

COOL-FIRE: la soluzione Firewall per Windows NT/2000
http://www.symbolic.it/Prodotti/cool-fire.html

SYMBOLIC S.p.A. Tel: +39 0521 776180 / Fax: +39 0521 776190

Reply via email to