Re: Non const input for EVP_EncryptUpdate and EVP_DecryptUpdate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a bug in the docs. In the header files they are declared as const:

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

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

Please file a bug report!

https://github.com/openssl/openssl/issues

Matt


On 22/11/17 14:42, Edward Diener wrote:
> When calling EVP_EncryptUpdate with some plaintext to be encrypted the
> parameter for the plaintext is a pointer to a non-const array of
> unsigned char, as in the function prototype:
> 
> int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
>          int *outl, unsigned char *in, int inl);
> 
> Similarly when calling EVP_DecryptUpdate with some ciphertext to be
> decrypted the parameter for the ciphertext is a pointer to a non-const
> array of unsigned char, as in the function prototype:
> 
> int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
>          int *outl, unsigned char *in, int inl);
> 
> I have taken both these function prototypes from the OpenSSL
> documentation at
> https://wiki.openssl.org/index.php/Manual:EVP_EncryptInit(3).
> 
> Does this mean that the input array in both cases actually is modified
> in any way by the functions ? Or is this just an error in that if the
> input remains unmodified the functions do not specify the parameter as
> 'const unsigned char * in' instead ?
> 
> 
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux