| OLD | NEW |
| 1 This test exercises using a different hash function parameter to the mask gen | 1 This test exercises using a different hash function parameter to the mask gen |
| 2 function (SHA-256 for the hash, but SHA-512 for the MGF1 hash). | 2 function (SHA-256 for the hash, but SHA-512 for the MGF1 hash). |
| 3 | 3 |
| 4 This test data was constructed manually by calling signing functions from | 4 This test data was constructed manually by calling signing functions from |
| 5 OpenSSL code. | 5 OpenSSL code. |
| 6 | 6 |
| 7 It constructs an RSASSA-PSS signature using: | 7 It constructs an RSASSA-PSS signature using: |
| 8 * Key with modulus 1024 bit | 8 * Key with modulus 1024 bit |
| 9 * Salt length 33 bytes | 9 * Salt length 33 bytes |
| 10 * Digest function of SHA-256 | 10 * Digest function of SHA-256 |
| 11 * Mask gen function of MGF1 with SHA-512 | 11 * Mask gen function of MGF1 with SHA-512 |
| 12 | 12 |
| 13 | 13 |
| 14 | |
| 15 -----BEGIN PUBLIC KEY----- | |
| 16 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH | |
| 17 mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL | |
| 18 I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB | |
| 19 -----END PUBLIC KEY----- | |
| 20 | |
| 21 $ openssl asn1parse -i < [PUBLIC KEY] | 14 $ openssl asn1parse -i < [PUBLIC KEY] |
| 22 0:d=0 hl=3 l= 159 cons: SEQUENCE | 15 0:d=0 hl=3 l= 159 cons: SEQUENCE |
| 23 3:d=1 hl=2 l= 13 cons: SEQUENCE | 16 3:d=1 hl=2 l= 13 cons: SEQUENCE |
| 24 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption | 17 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption |
| 25 16:d=2 hl=2 l= 0 prim: NULL | 18 16:d=2 hl=2 l= 0 prim: NULL |
| 26 18:d=1 hl=3 l= 141 prim: BIT STRING | 19 18:d=1 hl=3 l= 141 prim: BIT STRING |
| 27 | 20 -----BEGIN PUBLIC KEY----- |
| 28 | 21 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH |
| 29 | 22 mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL |
| 30 -----BEGIN ALGORITHM----- | 23 I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB |
| 31 MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU | 24 -----END PUBLIC KEY----- |
| 32 DBAIDBQCiAwIBIQ== | |
| 33 -----END ALGORITHM----- | |
| 34 | 25 |
| 35 $ openssl asn1parse -i < [ALGORITHM] | 26 $ openssl asn1parse -i < [ALGORITHM] |
| 36 0:d=0 hl=2 l= 65 cons: SEQUENCE | 27 0:d=0 hl=2 l= 65 cons: SEQUENCE |
| 37 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss | 28 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss |
| 38 13:d=1 hl=2 l= 52 cons: SEQUENCE | 29 13:d=1 hl=2 l= 52 cons: SEQUENCE |
| 39 15:d=2 hl=2 l= 15 cons: cont [ 0 ] | 30 15:d=2 hl=2 l= 15 cons: cont [ 0 ] |
| 40 17:d=3 hl=2 l= 13 cons: SEQUENCE | 31 17:d=3 hl=2 l= 13 cons: SEQUENCE |
| 41 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 | 32 19:d=4 hl=2 l= 9 prim: OBJECT :sha256 |
| 42 30:d=4 hl=2 l= 0 prim: NULL | 33 30:d=4 hl=2 l= 0 prim: NULL |
| 43 32:d=2 hl=2 l= 28 cons: cont [ 1 ] | 34 32:d=2 hl=2 l= 28 cons: cont [ 1 ] |
| 44 34:d=3 hl=2 l= 26 cons: SEQUENCE | 35 34:d=3 hl=2 l= 26 cons: SEQUENCE |
| 45 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 | 36 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1 |
| 46 47:d=4 hl=2 l= 13 cons: SEQUENCE | 37 47:d=4 hl=2 l= 13 cons: SEQUENCE |
| 47 49:d=5 hl=2 l= 9 prim: OBJECT :sha512 | 38 49:d=5 hl=2 l= 9 prim: OBJECT :sha512 |
| 48 60:d=5 hl=2 l= 0 prim: NULL | 39 60:d=5 hl=2 l= 0 prim: NULL |
| 49 62:d=2 hl=2 l= 3 cons: cont [ 2 ] | 40 62:d=2 hl=2 l= 3 cons: cont [ 2 ] |
| 50 64:d=3 hl=2 l= 1 prim: INTEGER :21 | 41 64:d=3 hl=2 l= 1 prim: INTEGER :21 |
| 51 | 42 -----BEGIN ALGORITHM----- |
| 52 | 43 MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU |
| 44 DBAIDBQCiAwIBIQ== |
| 45 -----END ALGORITHM----- |
| 53 | 46 |
| 54 -----BEGIN DATA----- | 47 -----BEGIN DATA----- |
| 55 VGVzdCBtZXNzYWdlIHRvIGJlIHNpZ25lZC4uLg== | 48 VGVzdCBtZXNzYWdlIHRvIGJlIHNpZ25lZC4uLg== |
| 56 -----END DATA----- | 49 -----END DATA----- |
| 57 | 50 |
| 58 | 51 $ openssl asn1parse -i < [SIGNATURE] |
| 59 | 52 0:d=0 hl=3 l= 129 prim: BIT STRING |
| 60 -----BEGIN SIGNATURE----- | 53 -----BEGIN SIGNATURE----- |
| 61 A4GBAFob0HSC5uuTqKu4J/lj+5bDa+Hhij4H3klWnvt6Yc+wwPza7/UC4lgGGyvZqD32RUEdt7v | 54 A4GBAFob0HSC5uuTqKu4J/lj+5bDa+Hhij4H3klWnvt6Yc+wwPza7/UC4lgGGyvZqD32RUEdt7v |
| 62 Z14qqYNk53b5aj4C2gBMvLzV7Pay4mmQM4DSWa5JHMxTILqE3DDqihrbMcBw2q3XAsLcjeqLWQ9 | 55 Z14qqYNk53b5aj4C2gBMvLzV7Pay4mmQM4DSWa5JHMxTILqE3DDqihrbMcBw2q3XAsLcjeqLWQ9 |
| 63 yp8tfnV21h98qsCLtErrxZWHRr | 56 yp8tfnV21h98qsCLtErrxZWHRr |
| 64 -----END SIGNATURE----- | 57 -----END SIGNATURE----- |
| 65 | |
| 66 $ openssl asn1parse -i < [SIGNATURE] | |
| 67 0:d=0 hl=3 l= 129 prim: BIT STRING | |
| OLD | NEW |