I think I know what is the problem. Thanks

On Dec 26, 4:40 pm, eva2002 <[EMAIL PROTECTED]> wrote:
> It will have to go through the encryption before it is used. I did try
> to see if my array is properly used by reading from file and then
> place it into array, followed by retrieving from array and display.
>
> I am actually working on parallel encryption with different thread
> working on different section (reading, encryption, writing).
> There cannot be any encryption without any reading, no writing without
> any encryption.
>
> I am sure that the flow of the data in the program is correct.
>
> On Dec 26, 3:40 pm, "Jeffrey Walton" <[EMAIL PROTECTED]> wrote:
>
> > Hi Eva,
>
> > > In other words,
> > > -> encrypt first block, store into array[0]
> > > -> retrieve first block from array[0], print to screen
> > > -> encrypt second block, store into array[1]
> > > -> retrieve first block from array[0], print to screen
> > > ...
> > > enqueue(data)
>
> > The problem probably lies in your logic. What happens when you stuff
> > unencrypted plaintext in the array (forgoing the encrpytion)?
>
> > Jeff
>
> > On 12/26/07, eva2002 <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > I encounter a weird problem when I try to encrypt a file
>
> > > What I did was to actually split the plaintext up into equal-sized
> > > blocks, and then encrypt each block. Each encrypted block is then
> > > placed into an array for later use.
>
> > > However, I encountered this weird problem.
>
> > > Two print-outs of the first encrypted block are done:
>
> > > The first print-out is when the processor finishes encrypting the
> > > first block; The second print-out is when the processor finishes
> > > encrypting the second block (note: I am still printing the first
> > > encrypted block).
>
> > > In other words,
> > > -> encrypt first block, store into array[0]
> > > -> retrieve first block from array[0], print to screen
> > > -> encrypt second block, store into array[1]
> > > -> retrieve first block from array[0], print to screen
>
> > > However, the two displayed blocks are different.
>
> > > Can anyone tell me what's wrong?
>
> > > Cipher used is AES and the mode used is CTR
>
> > > StreamTransformationFilter ab( encryptor,  new
> > > CryptoPP::StringSink( CipherText ) );
> > > ab.Put( (const byte*)data, data_size );
> > > ab.MessageEnd();
> > > enqueue(data);
>
> > > encryptor is initialized at the start of program once.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to