z/TPF

z/TPF

z/TPF

The z/TPF group is dedicated to sharing news, knowledge, and insights about the z/TPF product family. Consisting of IBMers and users, this community collaborates to advance the potential of high-volume, high-throughput transaction technology.

 View Only

Support for /dev/random and /dev/urandom files (PJ46156)

By Mitchell Rogerson posted 11/03/20 05:07 PM

  

APAR PJ46156 provides support for the /dev/random and /dev/urandom character special files in the z/TPF file system, which allows applications to retrieve hardware-generated random data by using standard POSIX filesystem APIs.

The /dev/random and /dev/urandom character special files read streams of random data which are generated by the hardware random number generator provided by the IBM Z mainframe. This hardware random number generator is available starting with the IBM zEnterprise EC12 (zEC12). Therefore, in order to use the /dev/random and /dev/urandom character special files, a z/TPF system must be running on an IBM zEC12 or later.

In addition, z/TPF support for Java can leverage the IBM Z hardware random number generator by using the /dev/random and /dev/urandom special files. When the /dev/urandom character special file is defined on z/TPF, the java.security.SecureRandom class will automatically use /dev/urandom to efficiently generate random data through the hardware random number generator. If the /dev/urandom file is not created, the J9 Virtual Machine (JVM) generates random data in software, which is less efficient than using the hardware random number generator. For example, the javax.net.ssl package uses the java.security.SecureRandom class to generate random data. As a result of using the hardware random number generator, JVMs running applications that use javax.net.ssl will start up and run more efficiently. 

To create the character special files, issue the following commands on your z/TPF system:

ZFILE mknod /dev/random c 32779 8

ZFILE mknod /dev/urandom c 32779 9

ZFILE chown root:root /dev/random /dev/urandom

For more information on PJ46156, see the APEDIT.

0 comments
15 views

Permalink