Re: [gentoo-portage-dev] [PATCHES] portage.checksum hacking, pt. 4

2017-03-13 Thread Michał Górny
W dniu 12.03.2017, nie o godzinie 21∶31 -0700, użytkownik Zac Medico
napisał:
> On Sun, Mar 12, 2017 at 11:59 AM, Michał Górny  wrote:
> > Hi,
> > 
> > Here's a huge batch of patches for portage.checksum and relevant stuff.
> > It's not a complete rewrite as I have originally planned, and it's still
> > not the code I'd like to see but functionally it has been improved a lot.
> 
> The series looks good to me, except we should change the
> get_valid_checksum_keys function to return a frozenset.

Thanks a lot, all merged now.

-- 
Best regards,
Michał Górny


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-portage-dev] [PATCHES] portage.checksum hacking, pt. 4

2017-03-12 Thread Zac Medico
On Sun, Mar 12, 2017 at 11:59 AM, Michał Górny  wrote:
> Hi,
>
> Here's a huge batch of patches for portage.checksum and relevant stuff.
> It's not a complete rewrite as I have originally planned, and it's still
> not the code I'd like to see but functionally it has been improved a lot.

The series looks good to me, except we should change the
get_valid_checksum_keys function to return a frozenset.
-- 
Thanks,
Zac



[gentoo-portage-dev] [PATCHES] portage.checksum hacking, pt. 4

2017-03-12 Thread Michał Górny
Hi,

Here's a huge batch of patches for portage.checksum and relevant stuff.
It's not a complete rewrite as I have originally planned, and it's still
not the code I'd like to see but functionally it has been improved a lot.

Notable changes:

1. Other modules no longer use hashfunc_map, now they use the public
functions instead.

2. A method to checksum byte strings (i.e. stuff in-memory) has been
added. For better compatibility, practically unused python-fchksum
support has been removed. [TODO: possibly port other uses of hashlib
in Portage?]

3. Tests for all hash functions have been added. This makes it possible
to verify that different implementations are working correctly. It is
especially important because some of the Keccak (SHA-3) implementations
are using pre-FIPS Keccak version. [TODO: make it possible to test
all available fallbacks, not only the used function]

4. Fallbacks have been reworked so that the relevant modules are loaded
only if a better implementation is not available already. Fallbacks for
functions that are guaranteed to be available in hashlib have been
removed.

5. Support using pygcrypt as provider of optimized hash function
fallbacks (for ripemd160, Whirlpool and SHA3).

6. Support for Streebog (GOST R 34.11-2012) hash algorithm, provided
either by pygcrypt or pure Python pygost module. [TODO: find a better
pure Python provider]

--
Best regards,
Michał Górny