Home    XP_CRYPT Online Help Prev Next
How To use XP_CRYPT GUI
Introduction
What is XP_CRYPT
System requirements
Free version limitations
End user license agreement
Installing XP_CRYPT
Installation procedure
Activation
XP_CRYPT API
What's new
Encryption methods overview
Session
xp_crypt_set_var
xp_crypt_get_var
xp_crypt_close_session
xp_crypt_init_session
xp_crypt_set_option
Asymmetric keys
DSA
xp_dsa_free_key
xp_dsa_load_key
xp_dsa_save_key
xp_dsa_generate_couple
RSA
xp_rsa_generate_couple
xp_rsa_generate_pub_key
xp_rsa_load_key
xp_rsa_priv_dec
xp_rsa_pub_enc
xp_rsa_save_key
xp_rsa_free_key
Digital signatures
DSA
xp_dsa_verify
xp_dsa_sign
RSA
xp_rsa_sign
xp_rsa_verify
Hashing
xp_crypt
xp_md5
xp_sha1
Symmetric encryption
AES128
xp_aes128_decrypt
xp_aes128_encrypt
AES
xp_aes_decrypt
xp_aes_encrypt
DESX
xp_desx_decrypt
xp_desx_encrypt
RC4
xp_rc4_decrypt
xp_rc4_encrypt
Triple DES
xp_des3_encrypt
xp_des3_decrypt
Error codes
Tutorial
How to use GUI
Advanced technique (Old)
Table encryption (Old)
Troubleshooting
Troubleshooting overview

xp_dsa_generate_couple

Generates private and public DSA keys with the length of size. A free version of XP_CRYPT uses a fixed key size - 512 bits. Unlike RSA keys DSA keys cannot be used for encryption, they are used for digital signatures only. Comparing to RSA keys, they provide a faster and more effective sign algorithm. The password should be 4 or more chars. After successful execution @PrivateKey variable has the private key used for data signing as well as for generating the public key later. @PublicKey variable has the public key used for sign verification data. It is a good idea to save both keys now - @PrivateKey with a password and @PublicKey - without. In the environment of the quickly growing technical progress the key length less than 1024 bits should be considered as unsecure.  

Syntax

xp_dsa_generate_couple { key size, private_key OUTPUT, pubilc_key OUTPUT }

Arguments

key size

VARCHAR. Size (in bits) of the DSA key to be generated. The free version supports only '512'.

private_key

VARCHAR. On success, this variable holds the newly generated private key 

pubilc_key

VARCHAR. On success, this variable holds the newly generated private key 

Permissions

Execute permissions for xp_dsa_generate_couple default to members of the db_owner fixed database role in the master database, but can be granted to other users.

Return Code Values

0 - success, or Error code if failed. private_key IS NOT NULL (success) or IS NULL (failure) 

Example

declare @PrivateKey varchar (10)
declare @PublicKey varchar (10)
-- Creates private and public key of 512 bit length and return key handles
exec xp_dsa_generate_couple '512' , @PrivateKey output, @PublicKey output

 
2004-2011 (c) Active Crypt Software. All rights reserved.

Browser Based Help. Published by chm2web software.