Overview

SecureRandoms are supported via the GordianRandomFactory interface.

GordianKnot supports the SP800-90A and X931 DRBG constructs.

GordianKnot also supports a combined secureRandom wher the output of a CTR SP800 instance is combined with a HASH SP800 instance with the generated byte streams being xor-ed with each other. In this case HASH is restricted to those digests with an output length of 512 bits, and CTR is restricted to those symKeys with length and Block size of 128 bits.

Internally GordianKnot uses a random combined secureRandom.

Randoms

A secureRandom is created by specifying a GordianRandomSpec.

Sample

                    /* Access factory */
                    final GordianFactory myBaseFactory = GordianGenerator.createFactory();
                    final GordianRandomFactory myRandomFactory = myBaseFactory.getRandomFactory();

                    /* Create secureRandom */
                    final GordianRandomSpec myHashSpec = GordianRandomSpec.hash(GordianDigestSpec.sha2(GordianLength.LEN_512));
                    final SecureRandom myRandom = myRandomFactory.createRandom(myHashSpec);

                    /* Create combinedRandom */
                    final GordianRandomSpec myCtrSpec = GordianRandomSpec.ctr(GordianSymKeySpec.aes2(GordianLength.LEN_128));
                    final SecureRandom myComboRandom = myRandomFactory.createRandom(myCtrSpec, myHashSpec);
                

Algorithms

The following algorithms are supported.

Algorithm
SP800-HASH
SP800-HMAC
SP800-CTR
X9.31