Re: Calculating entropy for UTF-8



On 31 jul, 16:40, Ilmari Karonen <usen...@xxxxxxxxxxxxxx> wrote:
On 31.07.2008, Kless <jonas....@xxxxxxxxxxxxxx> wrote:>



In either case, the way you encode the characters (UTF-8 or anything
else) doesn't matter.  All that matters is the number of possible
characters.

I'm not as sure about this since that if i.e. you need 16 bytes for a
IV, and is created with ASCII and latin-1 characters, then its length
will be more than 16 bytes althought it shows 16 characters.

Obviously.  However, if you need 16 random bytes for an IV, then 16
random bytes (as in, each byte randomly chosen from the range 0-255)
is what you should generate.  If you limit your bytes to, say, valid
printable UTF-8 characters, then some of the bits in them will not be
random, and therefore the IV will contain less than 16 bytes of
entropy.
Yes, it's true, you have many reason. I was confused.


Thanks!
.



Relevant Pages

  • Re: Effects of Magic
    ... the worse the writing gets. ... There are cases where I adjusted what happend to include a ... Mind that B is the characters not behaving sensibly ... device to create matter to order from generic base matter, ...
    (rec.arts.sf.composition)
  • Re: Cultural difference? (Kaleido Star)
    ... This is all well and good except that Leon is ... gotten his previous partner injured by purposefully dropping her ... characters in Azumanga are happy to have Yukari as their teacher. ... No matter what situation you are in, ...
    (rec.arts.anime.misc)
  • on the part of Torkelsons official corpse
    ... Whoever still question no matter how Patrice when the accused ... It should slip missing characters across the loose confident ... whilst Mustafa undoubtably deserves them too. ...
    (sci.crypt)
  • Encoding/characterset/font family confusion
    ... I could use a bit of guidance on the following matter. ... attention to special characters. ... Postgresql db encoding scheme: LATIN1 ...
    (comp.lang.php)
  • Re: Reading whole text files
    ... Jack Klein wrote: ... >> and have many newline characters to read. ... > fread(), which is not restricted to just binary files, you know. ... you'll have to deal with that yourself no matter ...
    (comp.lang.c)