~vcs-imports/putty/master

Viewing all changes in revision 5827.

  • Committer: Simon Tatham
  • Date: 2020-09-13 08:11:31 UTC
  • Revision ID: git-v1:3daa36293ee2709e90578ae2277bf4f5532c63e8
Remove dependency of sshrand.c on SHA-512.

Rather like some of the tricks I did in mpint.h, this replaces the
unparametrised function random_setup_special() with one called
random_setup_custom() taking a hash-algorithm parameter.

The old syntax random_setup_special() still exists, and is a macro
wrapper on random_setup_custom() that passes ssh_sha512 as an
argument. This means I can keep the choice of hash function consistent
between the key generation front ends.

This adds potential flexibility: now, anyone wanting a different kind
of special RNG can make it out of whatever primitive they like. But a
more immediate point is to remove an inter-module dependency:
sshrand.c now doesn't need to be linked against the SHA-512 code.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: