rijndael+Encryption

Login to reply to this topic.
Sat, 2005-08-06 12:39
Anonymous
Forum posts: 2043
Have someone used this symbian port of rijndael to encrypt large amount of data? if yes plz help me.
I need to encrypt more than 500 chars. same help i need for decryption. 

http://www.newlc.com/article.php3?id_article=842&var_recherche=rijndael



Mon, 2005-09-05 11:09
Joined: 2005-09-04
Forum posts: 1
Re: rijndael+Encryption
Hi,

I think this produces Unicode strings...
Is there a way of using this algorithm to produce encrypted strings as ASCII characters?
Or dou you know another algorithm which does that?

thanks

Serkan
Mon, 2005-09-12 10:43
Joined: 2004-12-23
Forum posts: 239
Re: rijndael+Encryption
hey have u resolved ur problem
I have solved for small text but for large text its panicking or sometime truncating.
me too wants to solve it for more than 500 characters.
Can u help me
If u got sol pls do share up ur experience here.
Hoping for reply
Thanks

---------------
Bhatt Kavita

Mon, 2005-09-12 10:59
chishti_hameed (not verified)
Forum posts: 2043
Re: rijndael+Encryption
Quote from: mesweetie
hey have u resolved ur problem
me too wants to solve it for more than 500 characters.
Can u help me
If u got sol pls do share up ur experience here.
Hoping for reply
Thanks

i did this way: didnt encrypt 500 char but .......

   const TInt aBlockSize = 128;
   const TInt aBufSize = KBufferSize;

   //input data
   // Secret message (which fits exactly in one block)   
   TBuf8<aBufSize> secret; //will contain encrypted data
   secret.Copy(aText);
   secret.TrimAll();

   TInt number = secret.Length();
   
   // Init stuff
   TUint8 block[aBlockSize];
   TPtr8 blockPtr(block, aBlockSize);
   aes::keyInstance keyInst;
   aes::cipherInstance cipherInst;

   //
   // Generate key instance for encryption.
   // The secret key material is an hex string
   // with a length of keyLen/4 bytes.
   TInt keyLen = aBlockSize;
   TText8* secretKeyMaterial =
          (TText8*) "E5E6E7E9EA292A2B2D256789012345E5";   
   
   keyInst.blockLen = BITSPERBLOCK;
   aes::makeKey(&keyInst, DIR_ENCRYPT,
             keyLen, secretKeyMaterial);

   //
   // Init cipher instance
   cipherInst.blockLen = BITSPERBLOCK;
   aes::cipherInit(&cipherInst, MODE_ECB, NULL);
   
   //
   // Encrypt block
   // Fill block with our secret message
   blockPtr.Append(secret.Ptr(), number);
   aes::blockEncrypt(&cipherInst, &keyInst,
                 block, BITSPERBLOCK, block);
      
   secret.Zero();
   secret.Copy(blockPtr); //copy blockPtr to secret (buffer)
   secret.TrimAll();   
   blockPtr.Zero();
Thu, 2005-09-29 10:07
Joined: 2004-12-23
Forum posts: 239
Re: rijndael+Encryption
Thanks chisti
I am not able to encrypt large data it is encrypting till 32 character rest it gives the same as that of plaintext contain.
How u got it
I tried but vain.
Can u hep me
TIA

---------------
Bhatt Kavita

  • Login to reply to this topic.