1#
2# Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License").  You may not use
5# this file except in compliance with the License.  You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9# Tests start with one of these keywords
10#       Cipher Decrypt Derive Digest Encoding KDF MAC PBE
11#       PrivPubKeyPair Sign Verify VerifyRecover
12# and continue until a blank line. Lines starting with a pound sign are ignored.
13
14Title = RFC 6979 deterministic DSA_1024 tests
15
16PrivateKey=DSA_1024_PRIV
17-----BEGIN PRIVATE KEY-----
18MIIBSgIBADCCASsGByqGSM44BAEwggEeAoGBAIb1ygPc/rIlBj/4MKDHabndnWFT
19rZHXzif3h8QyeLRH5lM7hrGL7W6KSLeEoUwlLFvg2/YLhtY4W9LxL7dj7Yhzq/0/
20W6LgqMClkILqwFaTXlKdr3xhBGeJnHet7fyEbIgYcLexmytY+b4FIaFwAuO91rhm
21he6Qs9mhsCt4Kxd5AhUAmW+Wf2yOOI2eKNAeIF+6lXpWmLECgYAHsPklRhULYlFL
22t3HioMDOOH8DvabFa1BSCf8l/TwTPYm7zZfpBOCRFNmn3v3q38kHjqVE0uQBruzE
23C7n7v3j9h5laEKHCfLd4m1lLp++1xDJqn+WaBw4TbbdxdUZK3KQXvl3OL0DRCkaj
24o5Q/Jqt/2cA5j/jHbuClaCaoqI8dvQQWAhRBFgLLGabMw0SU152Y7x5+1a8l9w==
25-----END PRIVATE KEY-----
26
27PublicKey=DSA_1024_PUB
28-----BEGIN PUBLIC KEY-----
29MIIBtjCCASsGByqGSM44BAEwggEeAoGBAIb1ygPc/rIlBj/4MKDHabndnWFTrZHX
30zif3h8QyeLRH5lM7hrGL7W6KSLeEoUwlLFvg2/YLhtY4W9LxL7dj7Yhzq/0/W6Lg
31qMClkILqwFaTXlKdr3xhBGeJnHet7fyEbIgYcLexmytY+b4FIaFwAuO91rhmhe6Q
32s9mhsCt4Kxd5AhUAmW+Wf2yOOI2eKNAeIF+6lXpWmLECgYAHsPklRhULYlFLt3Hi
33oMDOOH8DvabFa1BSCf8l/TwTPYm7zZfpBOCRFNmn3v3q38kHjqVE0uQBruzEC7n7
34v3j9h5laEKHCfLd4m1lLp++1xDJqn+WaBw4TbbdxdUZK3KQXvl3OL0DRCkajo5Q/
35Jqt/2cA5j/jHbuClaCaoqI8dvQOBhAACgYBd9eAd7THQKX4nThaRwZL+WGj++eGa
36hHdkVLEAzxb2U5IZWji5BSPiVC7mGHHARAy4fDIvxLTS7F4efsdm4b6NTOk1Q33B
37HDyP1CYziTPr/nOcs0ZfTTZoxeRzUIJTseaC9ly9xPrpPC6iEjkOVJBahuIiMXC0
38Tqp9pd2f/Pt/Ow==
39-----END PUBLIC KEY-----
40
41PrivPubKeyPair=DSA_1024_PRIV:DSA_1024_PUB
42
43DigestSign = SHA1
44Key = DSA_1024_PRIV
45NonceType = deterministic
46Input = "sample"
47Output = 302C02142E1A0C2562B2912CAAF89186FB0F42001585DA55021429EFB6B0AFF2D7A68EB70CA313022253B9A88DF5
48
49DigestVerify = SHA1
50Key = DSA_1024_PUB
51Input = "sample"
52Output = 302C02142E1A0C2562B2912CAAF89186FB0F42001585DA55021429EFB6B0AFF2D7A68EB70CA313022253B9A88DF5
53
54DigestSign = SHA224
55Key = DSA_1024_PRIV
56NonceType = deterministic
57Input = "sample"
58Output = 302C02144BC3B686AEA70145856814A6F1BB53346F02101E0214410697B92295D994D21EDD2F4ADA85566F6F94C1
59
60DigestVerify = SHA224
61Key = DSA_1024_PUB
62Input = "sample"
63Output = 302C02144BC3B686AEA70145856814A6F1BB53346F02101E0214410697B92295D994D21EDD2F4ADA85566F6F94C1
64
65DigestSign = SHA256
66Key = DSA_1024_PRIV
67NonceType = deterministic
68Input = "sample"
69Output = 302D02150081F2F5850BE5BC123C43F71A3033E9384611C54502144CDD914B65EB6C66A8AAAD27299BEE6B035F5E89
70
71DigestVerify = SHA256
72Key = DSA_1024_PUB
73Input = "sample"
74Output = 302D02150081F2F5850BE5BC123C43F71A3033E9384611C54502144CDD914B65EB6C66A8AAAD27299BEE6B035F5E89
75
76DigestSign = SHA384
77Key = DSA_1024_PRIV
78NonceType = deterministic
79Input = "sample"
80Output = 302C021407F2108557EE0E3921BC1774F1CA9B410B4CE65A021454DF70456C86FAC10FAB47C1949AB83F2C6F7595
81
82DigestVerify = SHA384
83Key = DSA_1024_PUB
84Input = "sample"
85Output = 302C021407F2108557EE0E3921BC1774F1CA9B410B4CE65A021454DF70456C86FAC10FAB47C1949AB83F2C6F7595
86
87DigestSign = SHA512
88Key = DSA_1024_PRIV
89NonceType = deterministic
90Input = "sample"
91Output = 302C021416C3491F9B8C3FBBDD5E7A7B667057F0D8EE8E1B021402C36A127A7B89EDBB72E4FFBC71DABC7D4FC69C
92
93DigestVerify = SHA512
94Key = DSA_1024_PUB
95Input = "sample"
96Output = 302C021416C3491F9B8C3FBBDD5E7A7B667057F0D8EE8E1B021402C36A127A7B89EDBB72E4FFBC71DABC7D4FC69C
97
98DigestSign = SHA1
99Key = DSA_1024_PRIV
100NonceType = deterministic
101Input = "test"
102Output = 302C021442AB2052FD43E123F0607F115052A67DCD9C5C770214183916B0230D45B9931491D4C6B0BD2FB4AAF088
103
104DigestVerify = SHA1
105Key = DSA_1024_PUB
106Input = "test"
107Output = 302C021442AB2052FD43E123F0607F115052A67DCD9C5C770214183916B0230D45B9931491D4C6B0BD2FB4AAF088
108
109DigestSign = SHA224
110Key = DSA_1024_PRIV
111NonceType = deterministic
112Input = "test"
113Output = 302C02146868E9964E36C1689F6037F91F28D5F2C30610F2021449CEC3ACDC83018C5BD2674ECAAD35B8CD22940F
114
115DigestVerify = SHA224
116Key = DSA_1024_PUB
117Input = "test"
118Output = 302C02146868E9964E36C1689F6037F91F28D5F2C30610F2021449CEC3ACDC83018C5BD2674ECAAD35B8CD22940F
119
120DigestSign = SHA256
121Key = DSA_1024_PRIV
122NonceType = deterministic
123Input = "test"
124Output = 302C021422518C127299B0F6FDC9872B282B9E70D079081202146837EC18F150D55DE95B5E29BE7AF5D01E4FE160
125
126DigestVerify = SHA256
127Key = DSA_1024_PUB
128Input = "test"
129Output = 302C021422518C127299B0F6FDC9872B282B9E70D079081202146837EC18F150D55DE95B5E29BE7AF5D01E4FE160
130
131DigestSign = SHA384
132Key = DSA_1024_PRIV
133NonceType = deterministic
134Input = "test"
135Output = 302E021500854CF929B58D73C3CBFDC421E8D5430CD6DB5E6602150091D0E0F53E22F898D158380676A871A157CDA622
136
137DigestVerify = SHA384
138Key = DSA_1024_PUB
139Input = "test"
140Output = 302E021500854CF929B58D73C3CBFDC421E8D5430CD6DB5E6602150091D0E0F53E22F898D158380676A871A157CDA622
141
142DigestSign = SHA512
143Key = DSA_1024_PRIV
144NonceType = deterministic
145Input = "test"
146Output = 302D0215008EA47E475BA8AC6F2D821DA3BD212D11A3DEB9A002147C670C7AD72B6C050C109E1790008097125433E8
147
148DigestVerify = SHA512
149Key = DSA_1024_PUB
150Input = "test"
151Output = 302D0215008EA47E475BA8AC6F2D821DA3BD212D11A3DEB9A002147C670C7AD72B6C050C109E1790008097125433E8
152
153Title = RFC 6979 deterministic DSA_2048 tests
154
155PrivateKey=DSA_2048_PRIV
156-----BEGIN PRIVATE KEY-----
157MIICZAIBADCCAjkGByqGSM44BAEwggIsAoIBAQCdtvtZUbZrtv4eFA8dLOVQI3QW
158H9ZTjfFkghhkLwtcSMj3pBqt+hhzJLh2dPoYIrAPHs+BNpQ9fFV1cmTloaRP/gEu
159mTbgDB0+kxCwHH0XmAXTBYsqn0u2+XFr/mEXxrWzzE2b40EQStSoCtbJTgBfS5k+
160FPCR61F0O/MwUMON4jVWfhs0w9alwM6qGg82ghPD0ZhD0LSwncufxy05yN5B8b8U
1611LtFY8ooNxYhytMyS2otOSFFvr+sdIgFI29cov6SuHHNj5w20ykrVQnKjKp3oq38
162e/133ab3ESWnRW/qFT5DMlaiJhxqBu02k3l+eZX61aq7z74+2idB43VASuJbAiEA
1638sMRk3TOdsk1aZC0ZTdKF/I/ntNQib2Wn2HG3emZjB8CggEAXH/2sG+PFD/oKIQz
164ST5HacTZiKzlviWg4kgJZwcWxhPXsM7mky+PqnxE0sskUj2lP75PbsNZWJLRqljE
165MooGxGoVZi5+qnA6Hez4u7LQXb4uuVbBQqM4Zh0QRhwNE1RyCFBX80lDCf+nPGEf
166eLMq27V0DDYcnzW+kJl9sgFOLvWqYXgvUqvri9ZDLE3Ql7xUI7KF2vtg3DZOgWH0
167oqNayjoQscTSA8x2pHCjOv3L3ZKVmFmr2LVuFyUlLXjqxm5xuprj8d0khxmYdDk8
1681NgyGGgAZUdg4eNMCeTRVRefnsDcRHP5lr3Obu0cq+2LbxFvetnPUF3w+ZjjSrJ1
169FLD/5wQiAiBpx1SMIdDf6muaUcnq1OJ8M9Oz8YAxblvKuSyTPw5NvA==
170-----END PRIVATE KEY-----
171
172PublicKey=DSA_2048_PUB
173-----BEGIN PUBLIC KEY-----
174MIIDRjCCAjkGByqGSM44BAEwggIsAoIBAQCdtvtZUbZrtv4eFA8dLOVQI3QWH9ZT
175jfFkghhkLwtcSMj3pBqt+hhzJLh2dPoYIrAPHs+BNpQ9fFV1cmTloaRP/gEumTbg
176DB0+kxCwHH0XmAXTBYsqn0u2+XFr/mEXxrWzzE2b40EQStSoCtbJTgBfS5k+FPCR
17761F0O/MwUMON4jVWfhs0w9alwM6qGg82ghPD0ZhD0LSwncufxy05yN5B8b8U1LtF
178Y8ooNxYhytMyS2otOSFFvr+sdIgFI29cov6SuHHNj5w20ykrVQnKjKp3oq38e/13
1793ab3ESWnRW/qFT5DMlaiJhxqBu02k3l+eZX61aq7z74+2idB43VASuJbAiEA8sMR
180k3TOdsk1aZC0ZTdKF/I/ntNQib2Wn2HG3emZjB8CggEAXH/2sG+PFD/oKIQzST5H
181acTZiKzlviWg4kgJZwcWxhPXsM7mky+PqnxE0sskUj2lP75PbsNZWJLRqljEMooG
182xGoVZi5+qnA6Hez4u7LQXb4uuVbBQqM4Zh0QRhwNE1RyCFBX80lDCf+nPGEfeLMq
18327V0DDYcnzW+kJl9sgFOLvWqYXgvUqvri9ZDLE3Ql7xUI7KF2vtg3DZOgWH0oqNa
184yjoQscTSA8x2pHCjOv3L3ZKVmFmr2LVuFyUlLXjqxm5xuprj8d0khxmYdDk81Ngy
185GGgAZUdg4eNMCeTRVRefnsDcRHP5lr3Obu0cq+2LbxFvetnPUF3w+ZjjSrJ1FLD/
1865wOCAQUAAoIBAGZwmMZUQmx41/ggHqxsID7wMNQ2BQMsLx+pN+Ujfb2UnzSgolZP
1874Sbci3FcUUGALOCXnIJGRjxA5ra9qiUT+mEXKHFsLk/VO8lbieaZSdllEuhzucj4
18839SZzDEoglYa3ssx9ljpNMDBl/LE2WsFy61nOB57doiR5No4Q9JNlM37USbpuL8h
1896DWO4OCjDvE/1qZkwNzjcx9/tJpIRaT9glRoeXKi04JZnJusTg7XmYGTB4kTAyVY
190E0l2QQuJ0sFx0SOsNf2XchlZeqfRXBqaQo5ZGU91xyHry8+uRGlqSZr6dOBCmfEy
191AmYBY4y4ereRkNSgmGMV2o7sZWHJOJlr6t8=
192-----END PUBLIC KEY-----
193
194PrivPubKeyPair=DSA_2048_PRIV:DSA_2048_PUB
195
196DigestSign = SHA1
197Key = DSA_2048_PRIV
198NonceType = deterministic
199Input = "sample"
200Output = 304502203A1B2DBD7489D6ED7E608FD036C83AF396E290DBD602408E8677DAABD6E7445A022100D26FCBA19FA3E3058FFC02CA1596CDBB6E0D20CB37B06054F7E36DED0CDBBCCF
201
202DigestVerify = SHA1
203Key = DSA_2048_PUB
204Input = "sample"
205Output = 304502203A1B2DBD7489D6ED7E608FD036C83AF396E290DBD602408E8677DAABD6E7445A022100D26FCBA19FA3E3058FFC02CA1596CDBB6E0D20CB37B06054F7E36DED0CDBBCCF
206
207DigestSign = SHA224
208Key = DSA_2048_PRIV
209NonceType = deterministic
210Input = "sample"
211Output = 3046022100DC9F4DEADA8D8FF588E98FED0AB690FFCE858DC8C79376450EB6B76C24537E2C022100A65A9C3BC7BABE286B195D5DA68616DA8D47FA0097F36DD19F517327DC848CEC
212
213DigestVerify = SHA224
214Key = DSA_2048_PUB
215Input = "sample"
216Output = 3046022100DC9F4DEADA8D8FF588E98FED0AB690FFCE858DC8C79376450EB6B76C24537E2C022100A65A9C3BC7BABE286B195D5DA68616DA8D47FA0097F36DD19F517327DC848CEC
217
218DigestSign = SHA256
219Key = DSA_2048_PRIV
220NonceType = deterministic
221Input = "sample"
222Output = 3045022100EACE8BDBBE353C432A795D9EC556C6D021F7A03F42C36E9BC87E4AC7932CC80902207081E175455F9247B812B74583E9E94F9EA79BD640DC962533B0680793A38D53
223
224DigestVerify = SHA256
225Key = DSA_2048_PUB
226Input = "sample"
227Output = 3045022100EACE8BDBBE353C432A795D9EC556C6D021F7A03F42C36E9BC87E4AC7932CC80902207081E175455F9247B812B74583E9E94F9EA79BD640DC962533B0680793A38D53
228
229DigestSign = SHA384
230Key = DSA_2048_PRIV
231NonceType = deterministic
232Input = "sample"
233Output = 3045022100B2DA945E91858834FD9BF616EBAC151EDBC4B45D27D0DD4A7F6A22739F45C00B022019048B63D9FD6BCA1D9BAE3664E1BCB97F7276C306130969F63F38FA8319021B
234
235DigestVerify = SHA384
236Key = DSA_2048_PUB
237Input = "sample"
238Output = 3045022100B2DA945E91858834FD9BF616EBAC151EDBC4B45D27D0DD4A7F6A22739F45C00B022019048B63D9FD6BCA1D9BAE3664E1BCB97F7276C306130969F63F38FA8319021B
239
240DigestSign = SHA512
241Key = DSA_2048_PRIV
242NonceType = deterministic
243Input = "sample"
244Output = 304502202016ED092DC5FB669B8EFB3D1F31A91EECB199879BE0CF78F02BA062CB4C942E022100D0C76F84B5F091E141572A639A4FB8C230807EEA7D55C8A154A224400AFF2351
245
246DigestVerify = SHA512
247Key = DSA_2048_PUB
248Input = "sample"
249Output = 304502202016ED092DC5FB669B8EFB3D1F31A91EECB199879BE0CF78F02BA062CB4C942E022100D0C76F84B5F091E141572A639A4FB8C230807EEA7D55C8A154A224400AFF2351
250
251DigestSign = SHA1
252Key = DSA_2048_PRIV
253NonceType = deterministic
254Input = "test"
255Output = 3045022100C18270A93CFC6063F57A4DFA86024F700D980E4CF4E2CB65A504397273D98EA00220414F22E5F31A8B6D33295C7539C1C1BA3A6160D7D68D50AC0D3A5BEAC2884FAA
256
257DigestVerify = SHA1
258Key = DSA_2048_PUB
259Input = "test"
260Output = 3045022100C18270A93CFC6063F57A4DFA86024F700D980E4CF4E2CB65A504397273D98EA00220414F22E5F31A8B6D33295C7539C1C1BA3A6160D7D68D50AC0D3A5BEAC2884FAA
261
262DigestSign = SHA224
263Key = DSA_2048_PRIV
264NonceType = deterministic
265Input = "test"
266Output = 30450220272ABA31572F6CC55E30BF616B7A265312018DD325BE031BE0CC82AA17870EA3022100E9CC286A52CCE201586722D36D1E917EB96A4EBDB47932F9576AC645B3A60806
267
268DigestVerify = SHA224
269Key = DSA_2048_PUB
270Input = "test"
271Output = 30450220272ABA31572F6CC55E30BF616B7A265312018DD325BE031BE0CC82AA17870EA3022100E9CC286A52CCE201586722D36D1E917EB96A4EBDB47932F9576AC645B3A60806
272
273DigestSign = SHA256
274Key = DSA_2048_PRIV
275NonceType = deterministic
276Input = "test"
277Output = 30450221008190012A1969F9957D56FCCAAD223186F423398D58EF5B3CEFD5A4146A4476F002207452A53F7075D417B4B013B278D1BB8BBD21863F5E7B1CEE679CF2188E1AB19E
278
279DigestVerify = SHA256
280Key = DSA_2048_PUB
281Input = "test"
282Output = 30450221008190012A1969F9957D56FCCAAD223186F423398D58EF5B3CEFD5A4146A4476F002207452A53F7075D417B4B013B278D1BB8BBD21863F5E7B1CEE679CF2188E1AB19E
283
284DigestSign = SHA384
285Key = DSA_2048_PRIV
286NonceType = deterministic
287Input = "test"
288Output = 30440220239E66DDBE8F8C230A3D071D601B6FFBDFB5901F94D444C6AF56F732BEB954BE02206BD737513D5E72FE85D1C750E0F73921FE299B945AAD1C802F15C26A43D34961
289
290DigestVerify = SHA384
291Key = DSA_2048_PUB
292Input = "test"
293Output = 30440220239E66DDBE8F8C230A3D071D601B6FFBDFB5901F94D444C6AF56F732BEB954BE02206BD737513D5E72FE85D1C750E0F73921FE299B945AAD1C802F15C26A43D34961
294
295DigestSign = SHA512
296Key = DSA_2048_PRIV
297NonceType = deterministic
298Input = "test"
299Output = 304602210089EC4BB1400ECCFF8E7D9AA515CD1DE7803F2DAFF09693EE7FD1353E90A68307022100C9F0BDABCC0D880BB137A994CC7F3980CE91CC10FAF529FC46565B15CEA854E1
300
301DigestVerify = SHA512
302Key = DSA_2048_PUB
303Input = "test"
304Output = 304602210089EC4BB1400ECCFF8E7D9AA515CD1DE7803F2DAFF09693EE7FD1353E90A68307022100C9F0BDABCC0D880BB137A994CC7F3980CE91CC10FAF529FC46565B15CEA854E1
305