Hi there,

I'm utilizing Crypto++ in an Android application through the JNI interface. 
As a side-effect, the C++ portion of my application is never "live", and is 
somewhat treated like a library of sorts.

This seems to pose a problem for Crypto++.

I'm currently reading in a file, in 16kb chunks, to decrypt. Due to the 
limited memory on Android devices, it would not be feasible to load the 
entire file into memory then pass it to Crypto++. So I am attempting to 
decrypt each block by a standalone decryption function.

My java code would call a native decrypt(buffer, key, counter) function, 
where in that function Crypto++ would initialize a decryption object and 
supply it with the key and counter passed in, decrypt the passed in buffer 
and pass it back.

I'm using AES-CTR and am having trouble keeping the counter valid across 
all blocks. I noticed the counter is unchanged after PumpAll(), so I'm 
wondering if there is a way to perform decryption (and encryption for that 
matter) in a multi-part format that utilizes a standalone function that 
will not receive all of the data at once.

I tried to utilize the IncrementCounterByOne function on the counter after 
returning from the native decrypt function for each block processed, but I 
don't seem to be doing it correctly...

Let me know if I need to explain anything else...

-- 
-- 
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.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to