Building.Open.Source.Network.Security.Tools.Components.And.Techniques [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Building.Open.Source.Network.Security.Tools.Components.And.Techniques [Electronic resources] - نسخه متنی

Mike D. Schiffman

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Table 7.1 from which OpenSSL was compiled.



int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type,
unsigned char **ek, int *ekl, unsigned char *iv, EVP_PKEY
**pubk, int npubk);


EVP_SealInit () initializes a cipher context ctx for encryption. The function uses the cipher type with the initialization vector iv. You should previously initialize ctx by a call to EVP_CIPHER_CTX_init (), while type should have been acquired from a previous call to EVP_getcipherbyname (). The secret key, which is stored in ek, is encrypted by using npubk public keys stored in pubk (which enables the same encrypted data to be decrypted by using any of the corresponding private keys), ek is an array of buffers where the public key encrypted secret key is written; each buffer must contain enough room for the corresponding encrypted key. ek[i] must have room for EVP_PKEY_size (pubk [i]) bytes. The actual size of each encrypted secret key is written to ekl[i]. Upon success, the function returns 1; upon failure, the function returns 0.





Note

Because a random secret key is generated, the random number generator must be seeded by using rand_seed () before calling EVP_Sealir.it (). We do not cover this interface documentation in this book, but it is available wherever OpenSSL is sold.

At this writing, the public key must be RSA because it is the only OpenSSL public key algorithm that supports key transport.




int EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
int *outl, unsigned char *in, int inl);


EVP_SealUpdate () is functionally identical to the encryption mode of EVP_CipherUpdate_ex() with a software implementation. The function uses a randomly generated symmetric key ek[n] generated with a previous call to EVP_Seallnit (). Upon success, the function returns 1; upon failure, the function returns 0.



int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
int *outl);


EVP_SealFinal () is functionally identical to the encryption mode of EVP_CipherFinal () with a software implementation. Upon success, the function returns 1; upon failure, the function returns 0.



int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type,
unsigned char *ek, int ekl, unsigned char *iv, EVF_PKEY
*priv);


EVP_Openlnit () initializes a cipher context ctx for decryption. The function uses the cipher type with the initialization vector iv. You should have previously initialized ctx by a call to EVP_CIPHER_CTX_init (), while type should have been retrieved from a previous call to EVP_getelpher-byname (). The function decrypts the encrypted secret key ek of length ekl bytes by using the private key priv. Upon success, the function returns 1; upon failure, the function returns 0.



int EVP_OpenUJ date(EVP_CIPHER_CTX *ctx, unsigned char *out,
int *out1, unsigned char *in, int in1);


EVP_OpenUpdate () is functionally identical to the decryption mode of EVP_CipherUpdate_ex () with a software implementation. Upon success, the function returns 1; upon failure, the function returns 0.



int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
int *outl);


EVP_OpenFinal () is functionally identical to the encryption mode of EVP_CipherFinal () with a software implementation. Upon success, the function returns 1; upon failure, the function returns 0.

/ 135