If it is like the crypto things I am familiar with, you could simulate it by generating a RANDOM value and multiplying by 255 or 256 (depending on the exact specs for RANDOM, which I do not have open at the moment) to get a value between 0 and 255. Do that repeatedly until you have a string of the length you need. It will not be crypto quality. It will be adequate for testing (but watch out for the tendency of things that work in test to move into production unchanged).
If you need crypto quality, there is no substitute for a crypto quality true random number generator. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Farley, Peter x23353 Sent: Friday, March 19, 2021 11:20 AM To: [email protected] Subject: Re: Contents of TOD Programmable Field under z/OS? Charles, The actual application requirement is for alphanumeric random values of a certain length. I can’t say more than that without revealing company IP. Peter -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Charles Mills Sent: Friday, March 19, 2021 1:31 PM To: [email protected] Subject: Re: Contents of TOD Programmable Field under z/OS? > that only returns a fraction between 0 and 1, which could be useful > but quite a bit more work What do you need? An integer between 0 or 1 and 'n'? Multiplying the result of RANDOM times 'n' should give you that integer pretty readily, no? This may not give you crypto quality, but the idea is right. What am I missing? Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Farley, Peter x23353 Sent: Friday, March 19, 2021 8:32 AM To: [email protected] Subject: Re: Contents of TOD Programmable Field under z/OS? Update: It seems we are on z13 boxes at the moment, and they do not have the Message-Security-Assist Extension 7 feature necessary to use the TRNG functions of PRNO. I could try the DRNG functions of PRNO but they seem to be a lot of work to use the right way (seeding, parameter blocks, etc.). It would be far easier to use the COBOL RANDOM intrinsic, but that only returns a fraction between 0 and 1, which could be useful but quite a bit more work to incorporate into the application function at issue. Lacking the COBOL UUID4 function here, the KISS principle says STCKE it will be for now. -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
