Re: [openssl-dev] How to define EVP_EncryptUpdate and EVP_EncryptFinal functions for an AES engine? (and a separate question re: padding)

2017-07-01 Thread Dr. Stephen Henson
how should I handle the EVP_[En/De]cryptFinal functions? Should I not be > implementing them in my engine? Or am I missing something here > The do_cipher function is normally the low level block cipher function: it gets handed a multiple of the block size to encrypt/decrypt. The higher level

[openssl-dev] How to define EVP_EncryptUpdate and EVP_EncryptFinal functions for an AES engine? (and a separate question re: padding)

2017-06-26 Thread Brett R. Nicholas
Hi there, I'm building a dynamic engine to support a custom AES hardware module that I've implemented in FPGA logic**, but after reading all available documentation, and pouring over the source code, I'm still very confused about the following two things. 1. How and where I should

[openssl.org #3599] [PATCH] Fixes a typo in the docs for EVP_EncryptUpdate

2014-11-12 Thread Alok Menghrajani via RT
The doc says that EVP_EncryptUpdate's outl should contain inl + cipher_block_size - 1 bytes, but the output buffer is called out, not outl. Patch is attached to this email and also viewable on github: https://github.com/openssl/openssl/pull/195 Alok

[openssl.org #3599] [PATCH] Fixes a typo in the docs for EVP_EncryptUpdate

2014-11-12 Thread Matt Caswell via RT
Many thanks. Patch applied: https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=5211e094dec9486a540ac480f345df1a8d2b2862 Matt __ OpenSSL Project http://www.openssl.org Development Mailing

R: Problem with EVP_EncryptUpdate/EVP_DecryptUpdate

2011-11-30 Thread Francesco Petruzzi
: Jussi Peltonen Oggetto: Re: Problem with EVP_EncryptUpdate/EVP_DecryptUpdate Someone else might have a better answer, but I suspect your problem is that your calling Final after every Update, and/or the block size is wrong. I haven't worked with BF, but at least with AES, the modes dictates

Re: Problem with EVP_EncryptUpdate/EVP_DecryptUpdate

2011-11-30 Thread Jussi Peltonen
. -Messaggio originale- Da: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org] Per conto di Ladar Levison Inviato: mercoledì 30 novembre 2011 08:33 A: openssl-dev@openssl.org Cc: Jussi Peltonen Oggetto: Re: Problem with EVP_EncryptUpdate/EVP_DecryptUpdate Someone else

Problem with EVP_EncryptUpdate/EVP_DecryptUpdate

2011-11-29 Thread Jussi Peltonen
); EVP_EncryptInit (ctx, EVP_bf_cbc (), key, iv); left = size; *outsz = 0; while (left 0) { n = (left IP_SIZE ? IP_SIZE : left); olen = 0; if (EVP_EncryptUpdate (ctx, outp, olen, inp, n) != 1

Re: Problem with EVP_EncryptUpdate/EVP_DecryptUpdate

2011-11-29 Thread Ladar Levison
); EVP_CIPHER_CTX_init (ctx); EVP_EncryptInit (ctx, EVP_bf_cbc (), key, iv); left = size; *outsz = 0; while (left 0) { n = (left IP_SIZE ? IP_SIZE : left); olen = 0; if (EVP_EncryptUpdate (ctx, outp,olen, inp, n) != 1

EVP_EncryptUpdate

2000-12-18 Thread Pawe Krawczyk
oc( strlen(data) + 2*EVP_CIPHER_CTX_block_size(ectx)); /* Encrypt from data to out */ /* Length of the data is 36 */ EVP_EncryptUpdate( ectx, out, outl, data, strlen(data)); toutl = outl; /* Now outl is 32 */ EVP_EncryptFinal( ectx, out, outl); to

Re: EVP_EncryptUpdate

2000-12-18 Thread Dr S N Henson
of the data is 36 */ EVP_EncryptUpdate( ectx, out, outl, data, strlen(data)); After this call 'outl' bytes of encrypted data have been written to 'out' thereform you *must* update the pointer passed to EVP_EncrytpFinal() so it doesn't overwrite the data: toutl = outl; /* Now outl