ginaspider (ginaspider) wrote in algorithms,


Dear lazy web,

Do you know if there exists any keystream algorithms where in which, given an input key, you can request from the algorithm something like "give me slot 433"?

Let me clarify,
so a typical keystream you seed with some key and then are able to request sequential bytes. In my particular application I want to encrypt 8Kbytes xored against a keystream but have it so it can be randomly read and written to. So I guess it would be like a key-block cipher or something like that. I don't fancy re-implementing crypto so I'm wondering if such a technique exists out there.
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

hmm... ok thanks mate. I suppose of all else fails I can encrypt against a xor of the ciphertext from a block cipher.
Think of your data as a set of blocks of some fixed size (4, 8, or 16 bytes is typical). If you want to decrypt a single byte, fetch the right block, decrypt the block, and return just the byte you want to decrypt.

While the typical mode of operation for ciphers is via sequential stream (especially with feedback modes of operation), the counter mode offers random access for free.
Hmm... ok, thanks
I know very little about this as far as detailed solutions, but can you insert a node or something and call it what you want?