diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
commit | 293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch) | |
tree | fc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /contrib/pgcrypto/expected/blowfish_1.out | |
parent | Initial commit. (diff) | |
download | postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip |
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/pgcrypto/expected/blowfish_1.out')
-rw-r--r-- | contrib/pgcrypto/expected/blowfish_1.out | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/contrib/pgcrypto/expected/blowfish_1.out b/contrib/pgcrypto/expected/blowfish_1.out new file mode 100644 index 0000000..e52abf1 --- /dev/null +++ b/contrib/pgcrypto/expected/blowfish_1.out @@ -0,0 +1,62 @@ +-- +-- Blowfish cipher +-- +-- some standard Blowfish testvalues +SELECT encrypt('\x0000000000000000', '\x0000000000000000', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +SELECT encrypt('\xffffffffffffffff', '\xffffffffffffffff', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +SELECT encrypt('\x1000000000000001', '\x3000000000000000', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +SELECT encrypt('\x1111111111111111', '\x1111111111111111', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +SELECT encrypt('\x0123456789abcdef', '\xfedcba9876543210', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +SELECT encrypt('\x01a1d6d039776742', '\xfedcba9876543210', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +SELECT encrypt('\xffffffffffffffff', '\x0000000000000000', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +-- setkey +SELECT encrypt('\xfedcba9876543210', '\xf0e1d2c3b4a5968778695a4b3c2d1e0f', 'bf-ecb/pad:none'); +ERROR: encrypt error: Cipher cannot be initialized +-- with padding +SELECT encrypt('\x01234567890123456789', '\x33443344334433443344334433443344', 'bf-ecb'); +ERROR: encrypt error: Cipher cannot be initialized +-- cbc +-- 28 bytes key +SELECT encrypt('\x6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5', + '\x37363534333231204e6f77206973207468652074696d6520666f7220', + 'bf-cbc'); +ERROR: encrypt error: Key was too big +-- 29 bytes key +SELECT encrypt('\x6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5ff92cc', + '\x37363534333231204e6f77206973207468652074696d6520666f722000', + 'bf-cbc'); +ERROR: encrypt error: Key was too big +-- blowfish-448 +SELECT encrypt('\xfedcba9876543210', + '\xf0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f584023641aba61761f1f1f1f0e0e0e0effffffffffffffff', + 'bf-ecb/pad:none'); +ERROR: encrypt error: Key was too big +-- empty data +select encrypt('', 'foo', 'bf'); +ERROR: encrypt error: Cipher cannot be initialized +-- 10 bytes key +select encrypt('foo', '0123456789', 'bf'); +ERROR: encrypt error: Cipher cannot be initialized +-- 22 bytes key +select encrypt('foo', '0123456789012345678901', 'bf'); +ERROR: encrypt error: Key was too big +-- decrypt +select encode(decrypt(encrypt('foo', '0123456', 'bf'), '0123456', 'bf'), 'escape'); +ERROR: encrypt error: Cipher cannot be initialized +-- iv +select encrypt_iv('foo', '0123456', 'abcd', 'bf'); +ERROR: encrypt_iv error: Cipher cannot be initialized +select encode(decrypt_iv('\x95c7e89322525d59', '0123456', 'abcd', 'bf'), 'escape'); +ERROR: decrypt_iv error: Cipher cannot be initialized +-- long message +select encrypt('Lets try a longer message.', '0123456789', 'bf'); +ERROR: encrypt error: Cipher cannot be initialized +select encode(decrypt(encrypt('Lets try a longer message.', '0123456789', 'bf'), '0123456789', 'bf'), 'escape'); +ERROR: encrypt error: Cipher cannot be initialized |