Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodiIFPrivateKey.IFRSAKeys

procedure IFRSAKeys(aBitSize : UInt32; aReprType : Byte; aKind : tIFKeyGenerationKind; var aPubl : iIFPublicKey; aTerminate : tGetTerminate = nil);
Generates a fresh RSA key pair of aBitSize bits into this instance and fills aPubl with the matching public key. aReprType selects the stored representation (must be below 3; an external key cannot be generated). aKind (a set of tIFKeyGenerationKindEnum) chooses the prime-generation policy -- NIST FIPS 186 provable/probable primes, exportable sizing, signature vs key-transport, etc. Optional aTerminate lets a long generation be cancelled. The modulus has exactly aBitSize bits. With ifkgNIST aBitSize is 2048, 3072 or 4096, or 1024 for a key transport key that is not ifkgProvable. Without it any aBitSize of 30 or more is generated; for an odd aBitSize P is one bit longer than Q, so an odd aBitSize cannot be combined with ifkgExportable. A request that cannot be generated raises eKeyGeneration before this instance and aPubl are changed.