diff options
| author | Daniel Gustafsson <dgustafsson@postgresql.org> | 2025-02-14 21:18:37 +0100 |
|---|---|---|
| committer | Daniel Gustafsson <dgustafsson@postgresql.org> | 2025-02-14 21:18:37 +0100 |
| commit | 9ad1b3d01f369f1b204324857e58d9283ff0a527 (patch) | |
| tree | 2434e8750c56d26178a3178f67e9b5469ed747ab /doc/src | |
| parent | 760bf588de91daa5426e3d7aaf77de5abde063b4 (diff) | |
pgcrypto: Add support for CFB mode in AES encryption
Cipher Feedback Mode, CFB, is a self-synchronizing stream cipher which
is very similar to CBC performed in reverse. Since OpenSSL supports it,
we can easily plug it into the existing cipher selection code without
any need for infrastructure changes.
This patch was simultaneously submitted by Umar Hayat and Vladyslav
Nebozhyn, the latter whom suggested the feauture. The committed patch
is Umar's version.
Author: Umar Hayat <postgresql.wizard@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/CAPBGcbxo9ASzq14VTpQp3mnUJ5omdgTWUJOvWV0L6nNigWE5jw@mail.gmail.com
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/pgcrypto.sgml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgml index a4d035eabdd..f87668dfaed 100644 --- a/doc/src/sgml/pgcrypto.sgml +++ b/doc/src/sgml/pgcrypto.sgml @@ -1084,6 +1084,11 @@ decrypt_iv(data bytea, key bytea, iv bytea, type text) returns bytea </listitem> <listitem> <para> + <literal>cfb</literal> — next block depends on previous encrypted block + </para> + </listitem> + <listitem> + <para> <literal>ecb</literal> — each block is encrypted separately (for testing only) </para> @@ -1112,7 +1117,8 @@ encrypt(data, 'fooz', 'bf-cbc/pad:pkcs') </para> <para> In <function>encrypt_iv</function> and <function>decrypt_iv</function>, the - <parameter>iv</parameter> parameter is the initial value for the CBC mode; + <parameter>iv</parameter> parameter is the initial value for the CBC and + CFB mode; it is ignored for ECB. It is clipped or padded with zeroes if not exactly block size. It defaults to all zeroes in the functions without this parameter. |
