Re: [openssl-dev] Variable length of digest

2015-12-24 Thread Dmitry Belyavsky
Hello Victor, On Thu, Dec 24, 2015 at 5:57 PM, Victor Wagner wrote: > On Thu, 24 Dec 2015 11:24:37 +0300 > Dmitry Belyavsky wrote: > > > > > > If you try to change the output length via the -macopt option of the > > dgst command, you'll see that the text output will be 4 bytes. > > It is misfea

Re: [openssl-dev] Variable length of digest

2015-12-24 Thread Victor Wagner
On Thu, 24 Dec 2015 11:24:37 +0300 Dmitry Belyavsky wrote: > > If you try to change the output length via the -macopt option of the > dgst command, you'll see that the text output will be 4 bytes. It is misfeature of dgst command. You have to use -signopt, not -macopt, because dgst command doe

Re: [openssl-dev] Variable length of digest

2015-12-24 Thread Dr. Stephen Henson
On Thu, Dec 24, 2015, Dmitry Belyavsky wrote: > > If you try to change the output length via the -macopt option of the dgst > command, you'll see that the text output will be 4 bytes. > It seems to happen because of the internal call to the EVP_MD_size() > function. > > If we change the EVP_MD_C

Re: [openssl-dev] Variable length of digest

2015-12-24 Thread Ann
Am 23.12.2015 um 23:18 schrieb Dr. Stephen Henson: > That's an interesting question. What digest requires this? Is the output > length arbitrary or do the standards specify a maximum size? > > Is e.g. SHA-512/t (see 5.3.6 of FIPS 180-4) an appropriate example? Here t is any positive integer witho

Re: [openssl-dev] Variable length of digest

2015-12-24 Thread Dmitry Belyavsky
Dear Victor, On Thu, Dec 24, 2015 at 11:02 AM, Victor Wagner wrote: > On Thu, 24 Dec 2015 10:45:37 +0300 > Dmitry Belyavsky wrote: > > > > > > > > If there's a new construct whose output size depends on the input > > > data, that probably requires a new family of functions. > > > > > > > Well,

Re: [openssl-dev] Variable length of digest

2015-12-24 Thread Victor Wagner
On Thu, 24 Dec 2015 10:45:37 +0300 Dmitry Belyavsky wrote: > > > > If there's a new construct whose output size depends on the input > > data, that probably requires a new family of functions. > > > > Well, the gost-mac is treated specially itself and may be it can be > simplified introducing

Re: [openssl-dev] Variable length of digest

2015-12-24 Thread Viktor Dukhovni
On Thu, Dec 24, 2015 at 10:45:37AM +0300, Dmitry Belyavsky wrote: > > > That's an interesting question. What digest requires this? Is the output > > > length arbitrary or do the standards specify a maximum size? > > I mean the gost-mac digest (implemented in the ccgost engine, > engines/ccgost/go

Re: [openssl-dev] Variable length of digest

2015-12-23 Thread Dmitry Belyavsky
Dear Stephen and Victor, On Thu, Dec 24, 2015 at 1:37 AM, Viktor Dukhovni wrote: > On Wed, Dec 23, 2015 at 10:18:55PM +, Dr. Stephen Henson wrote: > > > That's an interesting question. What digest requires this? Is the output > > length arbitrary or do the standards specify a maximum size? >

Re: [openssl-dev] Variable length of digest

2015-12-23 Thread Viktor Dukhovni
On Wed, Dec 23, 2015 at 10:18:55PM +, Dr. Stephen Henson wrote: > That's an interesting question. What digest requires this? Is the output > length arbitrary or do the standards specify a maximum size? With SHA3, NIST differentiates between fixed-length hash functions and variable-length XOFs

Re: [openssl-dev] Variable length of digest

2015-12-23 Thread Dr. Stephen Henson
On Wed, Dec 23, 2015, Dmitry Belyavsky wrote: > Hello OpenSSL Team, > > I have a question. > > I need to implement a digest with variable length of output. The length of > output can be easily specified by the control function, but EVP functions > expect the constant length of the digest result.

[openssl-dev] Variable length of digest

2015-12-23 Thread Dmitry Belyavsky
Hello OpenSSL Team, I have a question. I need to implement a digest with variable length of output. The length of output can be easily specified by the control function, but EVP functions expect the constant length of the digest result. Is there a good solution how to fix it and will the patch p