1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 12:02:47 -05:00

Add an implementation of BLAKE2b.

I have no plans to use this directly, but it's a component of Argon2,
which I'm about to add in the next commit.
This commit is contained in:
Simon Tatham
2021-02-13 14:47:26 +00:00
parent 6f025c0b84
commit 5c8f3bf924
7 changed files with 300 additions and 1 deletions

5
ssh.h
View File

@ -986,6 +986,7 @@ extern const ssh_hashalg ssh_sha3_256;
extern const ssh_hashalg ssh_sha3_384;
extern const ssh_hashalg ssh_sha3_512;
extern const ssh_hashalg ssh_shake256_114bytes;
extern const ssh_hashalg ssh_blake2b;
extern const ssh_kexes ssh_diffiehellman_group1;
extern const ssh_kexes ssh_diffiehellman_group14;
extern const ssh_kexes ssh_diffiehellman_gex;
@ -1015,6 +1016,10 @@ extern const ssh2_macalg ssh_hmac_sha256;
extern const ssh2_macalg ssh2_poly1305;
extern const ssh_compression_alg ssh_zlib;
/* Special constructor: BLAKE2b can be instantiated with any hash
* length up to 128 bytes */
ssh_hash *blake2b_new_general(unsigned hashlen);
/*
* On some systems, you have to detect hardware crypto acceleration by
* asking the local OS API rather than OS-agnostically asking the CPU