PeculiarVentures / PKI.js

PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
http://pkijs.org
Other
1.25k stars 204 forks source link

Signing a word document using client side JavaScript #341

Closed shivamjjha closed 2 years ago

shivamjjha commented 2 years ago

Probably not an issue

I don't know if it's just me; but I can't find a tutorial on pkijs site Requirements:

  1. user upload a .docx file
  2. signing that file digitally (electronically) using client side JS
  3. sending it to server

3rd point is done; I just want to know how to do 1st & 2nd steps

The final document should look like :

e signed doc.docx

I am a new user of PKI.js library Any help will be appreciated. Thanks!

rmhrisk commented 2 years ago

While PKI.js would likely be used in building a tool that can do that, PKI.js does not do any file signing. The docx format is essentially a compressed folder containing xmldsig signatures. All of this is doable in browser but not something that belongs in PKI.js

shivamjjhasot commented 2 years ago

Thanks for making that clear @rmhrisk Do you know of any tool / any way to do that? I'll appreciate that

rmhrisk commented 2 years ago

No, I am not aware of anyone who has done this work. We have created nearly all of the necessary building blocks and had aspired to create a library to do this at some point but the opportunity never presented itself.