<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !STR.- String Command > String Operations |
MiniRobotLanguage (MRL)
STR.Chars D
Generate a string with random Bytes
Intention
The used PRNG (Pseudo Random Number Generator) provides a source of cryptographically strong random 'bytes for use in creating session keys, One-TIme Pads and other similar purposes.
This CPRNG is based on the recursion-with-carry generator, invented by George Marsaglia.
Estimated Cycle length is 3 x 10^47.
This PRNG Passes All Test in ENT and in DIEHARD
ENT Can be found at: http://www.fourmilab.ch/random/
DIEHARD Can be found at: http://stat.fsu.edu/~geo/diehard.html
This version will create a Pad with the algo from STR.CHARS A .
And will then created between 4 and 8 Pads using the above algo.
Then all of these Pads will be combined using the XOR to get a final result.
Therefore an attack based on quality of Random numbers looks impossible from my standpoint.
The command itself looks like this:
STR.CHARS C|$$CNT|$$RES
And here is a small example:
: $$NUM=5
STR.CHARS C|$$NUM|$$RES
MBX.$$RES
This is a larger example which produces a Pad of size 50.
: $$CNT=50
STR.CHARS C|$$CNT|$$RES
LEN.$$RES|$$LEN
MBX.$$LEN->$$RES
ENR.
It brings up this output:
Use the CTF. - Copy-To-File to write it to a USB-Stick or Harddisk.
Syntax
STR.CHARS D|P1[|P2]
Parameter Explanation
P1 - length of desired random string in bytes. If omitted, a default length of 32 byte length is used.
P2 - destination variable, if omitted TOS will be used for the result.
Example
'*************************************
' STR.CHARS D
'*************************************
: $$CNT=50
STR.CHARS D|$$CNT|$$RES
LEN.$$RES|$$LEN
MBX.$$LEN->$$RES
ENR.
Remarks
While we have made any effort to produce PRNG's of highest quality, there is no absolute warranty whatever, that these randomly generated strings are safe for use with cryptographic or safety software, or even for password-generation on a specific computer-hardware. Therefore you have to use them on your own risk.
Below you can see the results of the so called "ENT-Test Suite" for OTP's generated with this PRNG.
Limitations:
-
See also:
• 1.5.2 Working with Text-Strings
• VAR. - Variable Set Value/Clear
• IVS. / NVS. - If-Variable-String
• SBD. - String between Delimiter
• SBM. - String between Delimiter-Multiple