Copyright © 2001 - 2005 SILC Project SILC Project Website | SILC Toolkit Reference Manual Index

SILC Toolkit Reference Manual
SILC Core Library
SILC Authentication Interface
SILC Message Interface
SILC Channel Interface
SILC Command Interface
SILC Notify Interface
SILC Status Types
SILC Modes
SILC ID Interface
SILC ID Cache Interface
SILC Argument Interface
SILC Attributes Interface
Packet Protocol Interface
SILC Utility Library
Basic SILC Types
SILC Buffer Interface
SILC Buffer Format Interface
SILC Hash Table Interface
SILC Logging Interface
SILC Memory Interface
SILC Mutex Interface
SILC Thread Interface
SILC Network Interface
SILC Schedule Interface
SILC Socket Interface
SILC Protocol Interface
SILC Config Interface
SILC File Util Interface
SILC String Util Interface
SILC UTF-8 Interface
SILC Stringprep Interface
SILC Util Interface
SILC List Interface
SILC Dynamic List Interface
SILC VCard Interface
SILC Application Utilities
SILC MIME Interface
SILC Crypto Library
Introduction to SILC RNG
SILC RNG Interface
SILC Cipher API
SILC PKCS API
SILC PKCS#1 API
SILC Hash Interface
SILC HMAC Interface
SILC SFTP Library
SILC SFTP Interface
SFTP Filesystems Interface
SILC Client Library
Using SILC Client Library Tutorial
Arguments for command_reply Client Operation
SilcStatus Error Arguments in command_reply Client Operation
Arguments for notify Client Operation
Unicode and UTF-8 Strings in Client Library
Client Library Interface Reference
SILC Key Exchange Library
SILC SKE Interface
SKE Status Types
SKE Diffie Hellman Groups
SKE Payloads
SILC Math Library
SILC MP Interface
SILC Math Interface
Resource Links
SILC Project Website
SILC Protocol Documentation
SILC White Paper
SILC FAQs

Function silc_create_key_pair
SYNOPSIS

        bool silc_create_key_pair(const char *pkcs_name,
                                  SilcUInt32 key_len_bits,
                                  const char *pub_filename,
                                  const char *prv_filename,
                                  const char *pub_identifier,
                                  const char *passphrase,
                                  SilcPKCS *return_pkcs,
                                  SilcPublicKey *return_public_key,
                                  SilcPrivateKey *return_private_key,
                                  bool interactive);

DESCRIPTION

        This routine can be used to generate new public key and private key
        pair.  The `pkcs_name' is the name of public key algorithm, or if
        NULL it defaults to "rsa".  The `key_len_bits' is the key length
        in bits and if zero (0) it defaults to 2048 bits.  The `pub_filename'
        and `prv_filename' is the public key and private key filenames.
        The `pub_identifier' is the public key identifier (for example:
        "UN=foobar, HN=hostname"), or if NULL the routine generates it
        automatically.

        The `passphrase' is the passphrase that is used to encrypt the
        private key file.  It is recommended that you would protect your
        private key file with a passphrase.

        The routine returns FALSE if error occurs during key generation.
        Function returns TRUE when success and returns the created SilcPKCS
        object, which can be used to perform public key cryptography into
        `return_pkcs' pointer, created public key into `return_public_key',
        and created private key into `return_private_key' pointer.

        If the `interactive' is TRUE then this asks the user (by blocking
        the process for input) some questions about key generation (like
        public key algorithm, key length, filenames, etc).  If all
        arguments are provided to this function already then `interactive'
        has no effect.

NOTES

        Before calling this function the application must have initialized
        the crypto library by registering the public key algorithms with
        silc_pkcs_register_default function.

SILC Application Utilities silc_create_key_pair silc_load_key_pair silc_show_public_key silc_change_private_key_passphrase

Copyright © 2001 - 2005 SILC Project SILC Project Website | SILC Toolkit Reference Manual Index