pycryptodome icon indicating copy to clipboard operation
pycryptodome copied to clipboard

BLAKE2 oid error

Open gk717 opened this issue 6 months ago • 1 comments

It seems that in the file BLAKE2b.py instead of the lines

# See https://tools.ietf.org/html/rfc7693
if digest_bytes in (20, 32, 48, 64) and not key:
    self.oid = "1.3.6.1.4.1.1722.12.2.1." + str(digest_bytes)

there should be the lines

# See https://tools.ietf.org/html/rfc7693
if digest_bytes in (20, 32, 48, 64) and not key:
    self.oid = "1.3.6.1.4.1.1722.12.2.1." + str(digest_bytes // 4)

There is a similar problem with the file BLAKE2s.py

gk717 avatar Jun 18 '25 15:06 gk717

Thanks, fixed with 2816c3e3d6718c236851e3abed74a94dabf4f07e

Legrandin avatar Jun 21 '25 14:06 Legrandin