All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.io.InputStream
|
+----cryptix.math.RandomStream
|
+----cryptix.math.PseudoRandomStream
|
+----cryptix.security.CSRandomStream
|
+----cryptix.pgp.FileRandomStream
As well as the seed file, entropy is taken from the following possibly-unpredictable sources:
The GUI is a better source of entropy than some of these methods (especially for applets), but is not included here since Cryptix is non-GUI.
If neither SecureRandom nor /dev/random are available (i.e. Java 1.0.2 on most platforms other than Linux), the security of this may be a little suspect. We should really implement SecureRandom (and SeedGenerator) for Java 1.0.2.
SECURITY: in the previous version, this class could in theory be exploited by untrusted code to clobber the seed file (which can be any filename). This could be bad for certain OS or other configuration files, possibly leading to a more serious exploit.
This version includes a security check that the caller is allowed to write to the seed file.
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.1.1.1 $
public FileRandomStream() throws IOException
public FileRandomStream(File seed_file) throws IOException
public synchronized void init(File seed_file) throws IOException
seed_file may be null if no seed file is to be used.
protected void finalize()
public void add(byte entropy[])
public synchronized void readSeedFile()
public synchronized void updateSeedFile() throws IOException
All Packages Class Hierarchy This Package Previous Next Index