Re: Deleting old AES api (was: Re: What should nettle-3.5 be like?)

2018-02-22 Thread Nikos Mavrogiannopoulos
On Thu, 2018-02-22 at 13:51 +0300, Dmitry Eremin-Solenikov wrote:
> Hello,
> 
> 2018-02-22 13:41 GMT+03:00 Nikos Mavrogiannopoulos :
> > On Thu, 2018-02-22 at 07:54 +0100, Niels Möller wrote:
> > > ni...@lysator.liu.se (Niels Möller) writes:
> > Thanks for bringing that up. I have a quick fix for that, although
> > I no
> > longer have such systems for checking.
> 
> Do you need one? Maybe we can buy you smth. from eBay if it's not too
> costly?

The hw cost is not really a blocker. Maintenance costs are, such as,
installing everything and making sure that system is online and part of
the gnutls CI, and when something breaks (disks etc) replace it. I've
tried it before, but I gave up on that approach. If there is a cloud
provider which provides Via cpus we can most likely include it in
gnutls' CI. Otherwise I think it would be too time consuming.

regards,
Nikos

___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs


Re: Deleting old AES api (was: Re: What should nettle-3.5 be like?)

2018-02-22 Thread Dmitry Eremin-Solenikov
Hello,

2018-02-22 13:41 GMT+03:00 Nikos Mavrogiannopoulos :
> On Thu, 2018-02-22 at 07:54 +0100, Niels Möller wrote:
>> ni...@lysator.liu.se (Niels Möller) writes:

> Thanks for bringing that up. I have a quick fix for that, although I no
> longer have such systems for checking.

Do you need one? Maybe we can buy you smth. from eBay if it's not too costly?


> seems to show gnutls (in fips140 drbg code), stoken, qemu, rdup,
> filezilla, pike, cmake, uanytun, haskell-bindings-nettle, libarchive,
> anytun, and mosh.
>
> That seems to be quite a popular API and removing it would break those
> projects. Why not keep it as backwards compatible and mark it as
> deprecated with a macro (copied from gnutls):

Dropping API is always painfull. Maybe it can be verbally deprecated now
and removed before 4.0 in future?

It is not possible to deprecate a macro. Deprecation attributes are handled
by compiler, while macros are resolved by preprocessor.

>
> #ifdef __GNUC__
> # define _GNUTLS_GCC_VERSION (__GNUC__ * 1 + __GNUC_MINOR__ * 100 +
> __GNUC_PATCHLEVEL__)
>
> # if _GNUTLS_GCC_VERSION >= 30100
> #  define _GNUTLS_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
> # endif
> #endif



-- 
With best wishes
Dmitry
___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs


Re: Deleting old AES api (was: Re: What should nettle-3.5 be like?)

2018-02-22 Thread Nikos Mavrogiannopoulos
On Thu, 2018-02-22 at 07:54 +0100, Niels Möller wrote:
> ni...@lysator.liu.se (Niels Möller) writes:
> 
> > > 2. Delete the old aes_* interface, in favor of aes128_, aes192_*
> > > and
> > >aes256_*.
> > 
> > I've now made a branch for this, delete-old-aes.
> 
> And it seems building gnutls with this branch fails, see
> https://gitlab.com/gnutls/nettle/-/jobs/53760965
> 
>   aes-padlock.c: In function 'padlock_aes_cipher_setkey':
>   aes-padlock.c:65:17: error: storage size of 'nc' isn't known
> struct aes_ctx nc;
>^~
> 
> It's great to have that ci job set up.

Thanks for bringing that up. I have a quick fix for that, although I no
longer have such systems for checking. I dropped AES-192 accelerated
support as part of that patch as well.
https://gitlab.com/gnutls/gnutls/merge_requests/602

How widely used are these macros? Searching debian code:
https://codesearch.debian.net/search?q=aes_set_encrypt_key=1=1

seems to show gnutls (in fips140 drbg code), stoken, qemu, rdup,
filezilla, pike, cmake, uanytun, haskell-bindings-nettle, libarchive,
anytun, and mosh.

That seems to be quite a popular API and removing it would break those
projects. Why not keep it as backwards compatible and mark it as
deprecated with a macro (copied from gnutls):

#ifdef __GNUC__
# define _GNUTLS_GCC_VERSION (__GNUC__ * 1 + __GNUC_MINOR__ * 100 +
__GNUC_PATCHLEVEL__)

# if _GNUTLS_GCC_VERSION >= 30100
#  define _GNUTLS_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
# endif
#endif


#ifndef _GNUTLS_GCC_ATTR_DEPRECATED
#define _GNUTLS_GCC_ATTR_DEPRECATED
#endif
?

regards,
Nikos

___
nettle-bugs mailing list
nettle-bugs@lists.lysator.liu.se
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs