hey msw,
thanks for that constructive feedback!
indeed, some of these issues, especially the obviously weak XOR cipher, i already discussed with alex.
i am confident that this encryption is too weak to save lifes but good enough - as you say - to hide things.
especially as this module is experimental and described that the algorithm has weak points, i hoped to clarify its non-mature state.
main concern is still making the encryption more performant.
PBKDF2:
thanks a lot for pointing me to this algorithm. the (true) reason why i didnt implement it yet is,
that i didnt even look for the "state of the art"-algorithm for this task

128 bit:
right, this is a wrong comment. not sure why i left it there.
XOR encryption:
i am totally unstatisfied with the XOR based encryption.
problem is that at the moment i have to encrypt the file content in some random-access file IO routines.
my first approach was building a 64 bit XOR key depending on the key and file offset.
but that CPU is so slow and has to process ~30MiB images with up to 120MiB/s, so i had to play with larger block sizes.
this way i could get from 1MiB/s processing speed to ~20 MiB/s IIRC.
as this is a compromise, i am totally unhappy with it, because compromises are the worst thing when it comes to data security

the best thing (as proposed by alex) would be to decouple the random access code from the encryption code.
so that any file IO is buffered plaintext into RAM and on file close, it will get encrypted and written to the card.
same for opening - the file is read in a whole and decrypted into RAM.
so we could use e.g. CBC to get rid of all the possible attacks possible with ECB.
do you want to jump in? which camera model do you have?
the current problem is lack of time (main job consumes more and more time...) and that i tend to focus things that seem to be of interest.
this encryption experiment didnt bring up many voices that shared their experience in terms of stability and workflow from the userbase.
BR,
g3gg0