Skip to content

Commit

Permalink
kdf: Add experimental Balloon KDF.
Browse files Browse the repository at this point in the history
* cipher/kdf.c (prng_aes_ctr_init, prng_aes_ctr_get_rand64): New.
(prng_aes_ctr_fini, ballon_context_size): New.
(balloon_open): Implement with SHA-256.
(balloon_xor_block, balloon_compress, balloon_expand): New.
(balloon_compute_fill, balloon_compute_mix, balloon_compute): New.
(balloon_compute_all, balloon_final, balloon_close): New.
(_gcry_kdf_open): Check argument for GCRY_KDF_BALLOON.
(_gcry_kdf_compute): Dispatch for GCRY_KDF_BALLOON.
(_gcry_kdf_final, _gcry_kdf_close): Likewise.
* tests/t-kdf.c (check_balloon): New.
(main): Add check_balloon.

--

GnuPG-bug-id: 5817
Signed-off-by: NIIBE Yutaka <[email protected]>
  • Loading branch information
NIIBE Yutaka committed Feb 7, 2022
1 parent e257fe3 commit 08ab322
Show file tree
Hide file tree
Showing 2 changed files with 557 additions and 16 deletions.
Loading

0 comments on commit 08ab322

Please sign in to comment.