Digital Signature In Yii


(Saqib Rezwan) #1

Hello friends,

  As a newbie, I am going to ask a stupid question again. In my current project, I have to make website mixed with google docs, dropbox and mediafire. In addition, when a user will submit a file, that file will be checked whatever the file is digitally signed or not (http://en.wikipedia.org/wiki/Digital_signature).

Now, I need to show that, one file format (either doc or pdf) will be examined to determine that, is it digitally signed or not ? I read the doc file but there is no difference between a signed file and a unsigned file in reading. I thought I would try it in OPENSSL(php), but I did not find any document which indicates doc file can be read for digital signature.

Now, my alternative is java, C#, asp.net. But, I do not know whatever it is possible in any of this one?

In a word, my question is, How to get information of digital signature from a doc/pdf file and how can i verify its signed or not?

ANY OPINION will be a plus point for me (as a newbie, i am in big trouble).

THANK YOU VERY MUCH FOR READING THIS and sorry for my bad English.

Sincerely

Saqib


(Da:Sourcerer) #2

Hm, that’s tough. .doc is largely a proprietary format with little to no open specifications (most informations covering that format are reverse-engineered). Regarding PDF: There are a lot of commercial solutions available to process PDFs. Including the parsing of signature informations. You could also try to set your own parser in place for that, since PDF is really an open format. But beware: It gets quite messy <_<


(Saqib Rezwan) #3

THANKS A LOT Da:Sourcerer. Can you give me some link on getting digital certificate information from pdf. I wanted to do it in doc, but if i can do it in pdf, i will get some idea. Thanks a lot again, i am completely new and hopless :(


(Da:Sourcerer) #4

Well, feel free to consult the PDF v1.7 spec. My guess is that the digital signature will be part of some XML in the document’s metadata. Good luck :)


(Saqib Rezwan) #5

Thanks a lot, :) … I am trying…

Any more opinion will be most welcome ///


(Saqib Rezwan) #6

I read the metadata of pdf. but there is no difference between signed and unsigned … do not know, what is doing wrong :(


(Da:Sourcerer) #7

Well, where and how have you been looking? Could be that the signature is compressed or has been wrapped in some ascii-armour (base85 or similar), so it won’t show up in a scan for the raw values.


(Saqib Rezwan) #8

Yes, metadata is out of question. I need to separate the digital certificate (P7B) from the file. do you know how and where the MS Word stores the digital signature? Anybody?

AND THANKS Da:Sourcerer :)


(Da:Sourcerer) #9

Maybe you can get some useful information here?

Edit: If you have the time, you can check KB840817 on how to get the Microsoft Word spec.


(Saqib Rezwan) #10

It is done. Thanks all for the feedback.

All i did, I make jar file where I used iText to read the signature, validate the signature, validate the certificate of the signature using bouncy castle and finally call the jar file to validate all


(672010184) #11

saqib how to create digital signture in yii?

give me tutorial please…

sory my english so bad


(Sandeep Malu) #12

Please provide any tutorial or document for the same.

sandeep.malu@gmail.com

regards

sandeep