5
5
SET bytea_output TO escape;
6
6
select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), 'key');
7
7
ERROR: generating random data is not supported by this build
8
- DETAIL: This functionality requires a source of strong random numbers
9
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
8
+ DETAIL: This functionality requires a source of strong random numbers.
9
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
10
10
-- check whether the defaults are ok
11
11
select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
12
12
'key', 'expect-cipher-algo=aes128,
@@ -17,8 +17,8 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
17
17
expect-compress-algo=0
18
18
');
19
19
ERROR: generating random data is not supported by this build
20
- DETAIL: This functionality requires a source of strong random numbers
21
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
20
+ DETAIL: This functionality requires a source of strong random numbers.
21
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
22
22
-- maybe the expect- stuff simply does not work
23
23
select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
24
24
'key', 'expect-cipher-algo=bf,
@@ -29,133 +29,133 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'),
29
29
expect-compress-algo=1
30
30
');
31
31
ERROR: generating random data is not supported by this build
32
- DETAIL: This functionality requires a source of strong random numbers
33
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
32
+ DETAIL: This functionality requires a source of strong random numbers.
33
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
34
34
-- bytea as text
35
35
select pgp_sym_decrypt(pgp_sym_encrypt_bytea('Binary', 'baz'), 'baz');
36
36
ERROR: generating random data is not supported by this build
37
- DETAIL: This functionality requires a source of strong random numbers
38
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
37
+ DETAIL: This functionality requires a source of strong random numbers.
38
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
39
39
-- text as bytea
40
40
select pgp_sym_decrypt_bytea(pgp_sym_encrypt('Text', 'baz'), 'baz');
41
41
ERROR: generating random data is not supported by this build
42
- DETAIL: This functionality requires a source of strong random numbers
43
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
42
+ DETAIL: This functionality requires a source of strong random numbers.
43
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
44
44
-- algorithm change
45
45
select pgp_sym_decrypt(
46
46
pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=bf'),
47
47
'key', 'expect-cipher-algo=bf');
48
48
ERROR: generating random data is not supported by this build
49
- DETAIL: This functionality requires a source of strong random numbers
50
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
49
+ DETAIL: This functionality requires a source of strong random numbers.
50
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
51
51
select pgp_sym_decrypt(
52
52
pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes'),
53
53
'key', 'expect-cipher-algo=aes128');
54
54
ERROR: generating random data is not supported by this build
55
- DETAIL: This functionality requires a source of strong random numbers
56
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
55
+ DETAIL: This functionality requires a source of strong random numbers.
56
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
57
57
select pgp_sym_decrypt(
58
58
pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes192'),
59
59
'key', 'expect-cipher-algo=aes192');
60
60
ERROR: generating random data is not supported by this build
61
- DETAIL: This functionality requires a source of strong random numbers
62
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
61
+ DETAIL: This functionality requires a source of strong random numbers.
62
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
63
63
-- s2k change
64
64
select pgp_sym_decrypt(
65
65
pgp_sym_encrypt('Secret.', 'key', 's2k-mode=0'),
66
66
'key', 'expect-s2k-mode=0');
67
67
ERROR: generating random data is not supported by this build
68
- DETAIL: This functionality requires a source of strong random numbers
69
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
68
+ DETAIL: This functionality requires a source of strong random numbers.
69
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
70
70
select pgp_sym_decrypt(
71
71
pgp_sym_encrypt('Secret.', 'key', 's2k-mode=1'),
72
72
'key', 'expect-s2k-mode=1');
73
73
ERROR: generating random data is not supported by this build
74
- DETAIL: This functionality requires a source of strong random numbers
75
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
74
+ DETAIL: This functionality requires a source of strong random numbers.
75
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
76
76
select pgp_sym_decrypt(
77
77
pgp_sym_encrypt('Secret.', 'key', 's2k-mode=3'),
78
78
'key', 'expect-s2k-mode=3');
79
79
ERROR: generating random data is not supported by this build
80
- DETAIL: This functionality requires a source of strong random numbers
81
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
80
+ DETAIL: This functionality requires a source of strong random numbers.
81
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
82
82
-- s2k count change
83
83
select pgp_sym_decrypt(
84
84
pgp_sym_encrypt('Secret.', 'key', 's2k-count=1024'),
85
85
'key', 'expect-s2k-count=1024');
86
86
ERROR: generating random data is not supported by this build
87
- DETAIL: This functionality requires a source of strong random numbers
88
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
87
+ DETAIL: This functionality requires a source of strong random numbers.
88
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
89
89
-- s2k_count rounds up
90
90
select pgp_sym_decrypt(
91
91
pgp_sym_encrypt('Secret.', 'key', 's2k-count=65000000'),
92
92
'key', 'expect-s2k-count=65000000');
93
93
ERROR: generating random data is not supported by this build
94
- DETAIL: This functionality requires a source of strong random numbers
95
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
94
+ DETAIL: This functionality requires a source of strong random numbers.
95
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
96
96
-- s2k digest change
97
97
select pgp_sym_decrypt(
98
98
pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=md5'),
99
99
'key', 'expect-s2k-digest-algo=md5');
100
100
ERROR: generating random data is not supported by this build
101
- DETAIL: This functionality requires a source of strong random numbers
102
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
101
+ DETAIL: This functionality requires a source of strong random numbers.
102
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
103
103
select pgp_sym_decrypt(
104
104
pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=sha1'),
105
105
'key', 'expect-s2k-digest-algo=sha1');
106
106
ERROR: generating random data is not supported by this build
107
- DETAIL: This functionality requires a source of strong random numbers
108
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
107
+ DETAIL: This functionality requires a source of strong random numbers.
108
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
109
109
-- sess key
110
110
select pgp_sym_decrypt(
111
111
pgp_sym_encrypt('Secret.', 'key', 'sess-key=0'),
112
112
'key', 'expect-sess-key=0');
113
113
ERROR: generating random data is not supported by this build
114
- DETAIL: This functionality requires a source of strong random numbers
115
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
114
+ DETAIL: This functionality requires a source of strong random numbers.
115
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
116
116
select pgp_sym_decrypt(
117
117
pgp_sym_encrypt('Secret.', 'key', 'sess-key=1'),
118
118
'key', 'expect-sess-key=1');
119
119
ERROR: generating random data is not supported by this build
120
- DETAIL: This functionality requires a source of strong random numbers
121
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
120
+ DETAIL: This functionality requires a source of strong random numbers.
121
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
122
122
select pgp_sym_decrypt(
123
123
pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=bf'),
124
124
'key', 'expect-sess-key=1, expect-cipher-algo=bf');
125
125
ERROR: generating random data is not supported by this build
126
- DETAIL: This functionality requires a source of strong random numbers
127
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
126
+ DETAIL: This functionality requires a source of strong random numbers.
127
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
128
128
select pgp_sym_decrypt(
129
129
pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes192'),
130
130
'key', 'expect-sess-key=1, expect-cipher-algo=aes192');
131
131
ERROR: generating random data is not supported by this build
132
- DETAIL: This functionality requires a source of strong random numbers
133
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
132
+ DETAIL: This functionality requires a source of strong random numbers.
133
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
134
134
select pgp_sym_decrypt(
135
135
pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes256'),
136
136
'key', 'expect-sess-key=1, expect-cipher-algo=aes256');
137
137
ERROR: generating random data is not supported by this build
138
- DETAIL: This functionality requires a source of strong random numbers
139
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
138
+ DETAIL: This functionality requires a source of strong random numbers.
139
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
140
140
-- no mdc
141
141
select pgp_sym_decrypt(
142
142
pgp_sym_encrypt('Secret.', 'key', 'disable-mdc=1'),
143
143
'key', 'expect-disable-mdc=1');
144
144
ERROR: generating random data is not supported by this build
145
- DETAIL: This functionality requires a source of strong random numbers
146
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
145
+ DETAIL: This functionality requires a source of strong random numbers.
146
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
147
147
-- crlf
148
148
select encode(pgp_sym_decrypt_bytea(
149
149
pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'),
150
150
'key'), 'hex');
151
151
ERROR: generating random data is not supported by this build
152
- DETAIL: This functionality requires a source of strong random numbers
153
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
152
+ DETAIL: This functionality requires a source of strong random numbers.
153
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
154
154
-- conversion should be lossless
155
155
select encode(digest(pgp_sym_decrypt(
156
156
pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'),
157
157
'key', 'convert-crlf=1'), 'sha1'), 'hex') as result,
158
158
encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect;
159
159
ERROR: generating random data is not supported by this build
160
- DETAIL: This functionality requires a source of strong random numbers
161
- HINT: You need to rebuild PostgreSQL using --enable-strong-random
160
+ DETAIL: This functionality requires a source of strong random numbers.
161
+ HINT: You need to rebuild PostgreSQL using --enable-strong-random.
0 commit comments