diff options
author | Werner Koch <[email protected]> | 2018-12-11 17:12:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-12-11 17:14:38 +0000 |
commit | de29a50e7c8a779ac0832a149bcf3eb2c4191dc9 (patch) | |
tree | be070ca7882119e6266df00d28bd4f229937102b /doc/gpg-agent.texi | |
parent | agent: compile-time configuration of s2k calibration. (diff) | |
download | gnupg-de29a50e7c8a779ac0832a149bcf3eb2c4191dc9.tar.gz gnupg-de29a50e7c8a779ac0832a149bcf3eb2c4191dc9.zip |
agent: Make the S2K calibration time runtime configurable.
* agent/protect.c (s2k_calibration_time): New file global var.
(calibrate_s2k_count): Use it here.
(get_calibrated_s2k_count): Replace function static var by ...
(s2k_calibrated_count): new file global var.
(set_s2k_calibration_time): New function.
* agent/gpg-agent.c (oS2KCalibration): New const.
(opts): New option --s2k-calibration.
(parse_rereadable_options): Parse that option.
--
Note that using an unrelistic high value (like 60000) takes quite some
time for calibration.
GnuPG-bug-id: 3399
Signed-off-by: Werner Koch <[email protected]>
(cherry picked from commit cbcc8c19541fe8407f3b6588fce1535c64cf6b25)
Diffstat (limited to 'doc/gpg-agent.texi')
-rw-r--r-- | doc/gpg-agent.texi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi index bcce03329..3997d2046 100644 --- a/doc/gpg-agent.texi +++ b/doc/gpg-agent.texi @@ -669,12 +669,19 @@ For an heavy loaded gpg-agent with many concurrent connection this option avoids sign or decrypt errors due to out of secure memory error returns. +@item --s2k-calibration @var{milliseconds} +@opindex s2k-calibration +Change the default calibration time to @var{milliseconds}. The given +value is capped at 60 seconds; a value of 0 resets to the compiled-in +default. This option is re-read on a SIGHUP (or @code{gpgconf +--reload gpg-agent}) and the S2K count is then re-calibrated. + @item --s2k-count @var{n} @opindex s2k-count Specify the iteration count used to protect the passphrase. This option can be used to override the auto-calibration done by default. -The auto-calibration computes a count which requires 100ms to mangle -a given passphrase. +The auto-calibration computes a count which requires by default 100ms +to mangle a given passphrase. See also @option{--s2k-calibration}. To view the actually used iteration count and the milliseconds required for an S2K operation use: |