views:

41

answers:

2

what are the all possible characters that could appear in an encrypted blob?

in another word, for example, could '&' be a character in an encrypted blob? what about '+'? why?

+1  A: 

Which DBMS? Which encryption?

In general, though, encrypted data looks like random data (if it doesn't, it isn't good encryption). That means that every byte in the range 0x00 .. 0xFF will appear approximately equally in the data. So yes, every byte could appear.

Jonathan Leffler
it's not DBMS. it's an encrypted URL blob after calling CryptEncrypt
tom
Oh - well, that's an interesting use of the term. As you might guess, I work mainly in the DBMS world, where BLOB is a data type for storing blobs of binary data in 'Binary Large OBjects'. You need to define quite a lot more carefully what you are discussing, and how it might be encoded. URL-encoding would presumably ensure that any HTML (XML) entity encoding characters do not appear in the data.
Jonathan Leffler
A: 

Most cipher generates binary ciphertext, which is not text but can contain any character if you display it as text.

You need to encode it to transfer it over any text based protocols. However, URL-encoding is a horrible candidate for this. It can triple the size.

You should use Base64 (preferably the URL-safe version) to encode the ciphertext first.

ZZ Coder