diff options
| author | Alvaro Herrera | 2016-03-09 17:31:07 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2016-03-09 17:31:07 +0000 |
| commit | 188f359d39ed65b5f3ddc1f397140fb9d153e61a (patch) | |
| tree | 19a88335d343b90f501f0d17a67947e52e2c0413 /contrib/pgcrypto/expected | |
| parent | b6fb6471f6afaf649e52f38269fd8c5c60647669 (diff) | |
pgcrypto: support changing S2K iteration count
pgcrypto already supports key-stretching during symmetric encryption,
including the salted-and-iterated method; but the number of iterations
was not configurable. This commit implements a new s2k-count parameter
to pgp_sym_encrypt() which permits selecting a larger number of
iterations.
Author: Jeff Janes
Diffstat (limited to 'contrib/pgcrypto/expected')
| -rw-r--r-- | contrib/pgcrypto/expected/pgp-encrypt.out | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/pgcrypto/expected/pgp-encrypt.out b/contrib/pgcrypto/expected/pgp-encrypt.out index b35de79afa7..8fc558c402b 100644 --- a/contrib/pgcrypto/expected/pgp-encrypt.out +++ b/contrib/pgcrypto/expected/pgp-encrypt.out @@ -103,6 +103,25 @@ select pgp_sym_decrypt( Secret. (1 row) +-- s2k count change +select pgp_sym_decrypt( + pgp_sym_encrypt('Secret.', 'key', 's2k-count=1024'), + 'key', 'expect-s2k-count=1024'); + pgp_sym_decrypt +----------------- + Secret. +(1 row) + +-- s2k_count rounds up +select pgp_sym_decrypt( + pgp_sym_encrypt('Secret.', 'key', 's2k-count=65000000'), + 'key', 'expect-s2k-count=65000000'); +NOTICE: pgp_decrypt: unexpected s2k_count: expected 65000000 got 65011712 + pgp_sym_decrypt +----------------- + Secret. +(1 row) + -- s2k digest change select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=md5'), |
