35

Deja Dup cannot back up a hidden file .rnd located in my home folder. It is a binary file about 1kB in size. When I try to open in a text editor (gedit), I get an error message that there are invalid characters (UTF-8).

I know what .gnupg/rnd is, but this isn't .gnupg/rnd it's just .rnd. Also I haven't done anything that I can think of to create a gnupg key, at least not on purpose.

Anyone know what this baby is? I backup nightly and this file appeared a couple days ago. I have run update since then. I realize I could delete the file and see what happens, but I'd rather not go around kicking the tires on my machine if I don't have to.

Running Ubuntu 13.04, if that matters.

cshubhamrao
  • 4,285
  • 2
  • 21
  • 30
nbm
  • 613

1 Answers1

43

This file is used to see the entropy when using cryptographic tools, e.g. OpenSSL. You can safely delete it and there's no need to backup it.

So, why do we have it then? On most systems we don't have a lot of activity we can use as a random source and to speed up the process for generating random enough cryptographic keys, this file contains previously collected random entropy, helping in seeding. So this file is not the sole source for entropy.

And because it contains raw random data, you can't open it with a text editor. It's simply not encoded within the standard character sets, so a text editor doesn't know how to display it.

It should be readable only by the user itself, in mode 0600. If it's owned by root, you probably have run some sudo commands which keeps the $HOME variable to your regular user account. Just remove the file in that case, I'd say, as the user itself should be able to update this file. See also:

  • manpage of rand(1):

    The rand command outputs num pseudo-random bytes after seeding the
    random number generator once.  As in other openssl command line tools,
    PRNG seeding uses the file $HOME/.rnd or .rnd in addition to the files
    given in the -rand option.  A new $HOME/.rnd or .rnd file will be
    written back if enough seeding was obtained from these sources.
    
  • OpenSSL FAQ: Why do I get a "PRNG not seeded" error message?

gertvdijk
  • 69,427