Recently, while studying relevant knowledge about cryptography, I made a record of the process of manually verifying the electronic seal in PDF files. The question gives a PDF file, and the following answers are made through this file. Please correct any incorrect points, and the download address of the attachment is at the end:
Question one, please parse all the certificates according to the case file and submit the certificates in the form of an inserted file. Hint: There are a total of 6 digital certificates.

Question two, please parse the following sha256RSA signature according to the case file and manually verify that the signature passes.D519E5FDAFE3F4CE97391D61DE31C15D3B31D144FF66F4045A54927E55B1119BD8D929A19C1243235C34914EB77A4CE83BC6500B54A9532B7B892D00313D5158A8D4CF27DD91B6328C1205607716914CC1217ED68A5660C7B6EDC48F53711C22A96421DAC84738D147DFE919066ACC84CBC942D7E4AF86D72BC00CC4B07F7FBFD7658B1DF5D84C9A80188D2EC3756FEC264DA9083500907CD7762CA0D1BFB1D66022586B10FFF138137ACCF18177DDC0133BA5C73F7E043D976343D592A8DAFD7F7E3974DFF3502A27DF80C0B72227280467D11BA01F7BA870950D8973FEABAFEAA3071E2ABD85E0A6FEE7FEBAF00929CDFE7EE2079D7F6B5FC6893B282B9AA6
Question three, please parse the following sha256RSA signature according to the case file and manually verify that the signature passes.
The translated text for the first paragraph should be placed here, ensuring it is a direct and accurate translation of the original Chinese text.5718764003626693CD00FE5A
Question 4: Please parse the following sha256RSA signature based on the case file, and manually verify the signature is valid.27F0D2713C5B5C0CE9692450C751D5389118A208E539D1E8B16DB58A9F9BD8A74C47F0CABB6D2868699D66BE17262B5B191F1A7401E242185ADEB20B7EB4A9CD4D195BCC35AE0FE7AB98BBD0D1B83E45A1AEE46142131D0BBBD6134D8960E05D746C5F68122A36BF6EA540858AAC1AA5A1A2FA4152B06CCB8A8C8616ABC4EB0332AF216ED432E19F98C6C718E0C7AFB6D53ACAE0C37F9DB89ECC4E37EF3F003F9C6C4EF1ABB214FEFD31B639986EB96CE37F8368F455FCA18F5AEC9194E0BAECF7D5D5A5F5F538B076B0196A08FA44F4EB0AD14478F43DD2E60C50F11F87553ABC5ED7FEBED97C75283CA1C7693C9135122F63E6DB81DC6D6628089F8F58296C
Question 5: Please parse the digital signature of the PDF file based on the case file, and manually verify the signature is valid.
Question 6: Please parse the digital signature of the PDF file timestamp based on the case file, and manually verify the signature is valid.
Question 7: Please parse the timestamp of the PDF file based on the case file, and verify the consistency of the original abstract value of the timestamp. Hint: The abstract value is: 68e6fc6a49e5dca5f0aa4b4a511101215d00e4bfca5a910c346cd71587e29fe3
Question 8: Please parse the original signature of the PDF file based on the case file, and verify the consistency of the original abstract value of the PDF file. Hint: The abstract value is: c046f7eb54839d9c6ce799e4199d763419935ea3dca4a8775b3137ed2efe3408
Prerequisites:
Tools used:
010 editor
Download address for Ans.1 Editor: https://www.sysadmins.lv/blog-en/asn1-editor-wpf-edition.aspx
Online signature verification tool: https://const.net.cn/tool
Here, I use the 010 editor to open the pdf document and find a long string of hex data starting with 3082, and copy the data out.
Note: Be sensitive to some special characters. Generally, the first four digits of a DER encoded digital certificate are 3082.
3082324906092a864886f70d010702a082323a30823236020101310f300d06096086480165030402010500300b06092a864886f70d010701a0821027308204eb308203d3a00302010202102015044b2bcdbc749cd57c7c5e4f8efe300d06092a864886f70d01010b0500305b310b300906035504061302434e3130302e060355040a0c274368696e612046696e616e6369616c2043657274696669636174696f6e20417574686f72697479311a301806035504030c1143464341204964656e74697479204f4341301e170d3232313230363036313133325a170d3235313231373036343732355a3078310b300906035504061302434e3112301006035504080c09e5b9bfe4b89ce79c813112301006035504070c09e6b7b1e59cb3e5b882312d302b060355040a0c24e99bb6e4bfa1e68a80e69cafefbc88e6b7b1e59cb3efbc89e69c89e99990e585ace58fb83112301006035504030c09e78e8be9ab98e58d8e30820122300d06092a864886f70d01010105000382010f00...
Due to the long data, I will omit the following content here. Please copy the data yourself until the end of >0000000. Save the above data value as a txt file and open it with the Ans.1 viewer.
Ans.1
Ans.1 is a data representation, encoding, transmission, and decoding format, commonly used in CA certificates, PEM, CER, PFX, and other formats. Ans.1 encoding is composed of three parts: Type + Length + Value, that is, data type + data length + data content three fields.
Data type + identifier
Data type | Hexadecimal identifier |
---|---|
INTEGER (integer) | 02 |
BITSTRING (a string composed of any 0 and 1) | 03 |
OCTETSTRING (a string composed of eight-bit values, similar to a bit array) | 04 |
NULL null value | 05 |
OBJECTIDENTIFIER (an object identifier composed of a series of integer sequences) | 06 |
SEQUENCE (an ordered type collection) and SEQUENCE OF (an ordered collection of a given type) | 10 |
SET (an unordered type collection) and SETOF (an unordered collection of a given type) | 11 |
PrintableString (a string composed of any printable characters) | 13 |
T61String (a string composed of eight-bit characters) | 14 |
IA5String | 16 |
UTCTime (GMT time value) | 17 |
Parse the digital certificate through Ans.1 encoding format
1. Certificate version number
2. Certificate serial number
3. Signature algorithm
4. CA organization
5. Certificate validity period
6. Certificate subject information
7. Certificate public key
8. Extension field
Answer to question one:
With the above knowledge, we can answer the content of question one, find 6 certificates, save the Contents data we obtained earlier as a txt file, and open it with the Ans.1 editor.
The first certificate Wang Gaohua.cer:
Search for the tree structure starting with 3082, which contains the fields mentioned above
Copy the highlighted hex data, perform base64 conversion, save the base64 value as 1.cer, and then open it to find the first certificate.
The second certificate CFCA Identity OCA.cer:
After hiding the first tree diagram, obtain the second certificate in the same way.
The third certificate CFCA Identity CA.cer
The fourth certificate CFCA Identity OCA OCSP20230710.cer:
The fifth certificate Sectigo RSA Time Stamping Signer #4.cer:
The sixth certificate Sectigo RSA Time Stamping CA.cer:
Answer to question two:
Given a signature value information,

评论已关闭