How I can implement the digital signature from frontend

Product:PdfTron

Product Version:11.2.0

Please give a brief summary of your issue:
(Think of this as an email subject)
Implementing Digital Signatures Using USB Token in React.js

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
I want to implement a feature in my React.js frontend that allows users to digitally sign documents using a USB token (a pen drive-like device). Here’s the detailed breakdown of what I need to know:

  1. Feasibility:
  • Is it possible to implement USB token-based digital signatures purely in the frontend using React.js?
  • Or does it require backend support? If yes, what backend technologies or frameworks would be necessary?
  1. Implementation Plan:
  • Assuming it’s possible in the frontend, how can this be achieved step-by-step in React.js?
  • If it requires backend integration, how do I handle the interaction between the frontend (React.js) and backend for USB token-based signing?
  1. Technical Considerations:
  • How can the USB token’s private key or certificate be accessed securely from the browser to sign a document?
  • Are there any browser APIs or libraries (such as WebUSB, WebCrypto) that can assist with this?
  • What are the potential challenges or limitations when implementing USB token integration in the browser?
  1. Security and Standards:
  • What are the best practices to ensure secure handling of private keys and certificates during signing?
  • Are there any specific signing standards (e.g., PKCS#11, PAdES, etc.) that need to be followed to support USB token-based signatures?
  1. Dependencies:
  • What libraries, SDKs, or tools can streamline this implementation in React.js (e.g., third-party packages for interacting with USB devices, signing documents)?
  • Are there any dependencies specific to USB token integration (e.g., drivers, browser compatibility issues)?
  1. User Flow:
  • How should the user interaction flow be designed for this feature?
    (E.g., connecting a USB token, selecting the file to be signed, applying the signature, and confirming the process.)

Please provide a link to a minimal sample where the issue is reproducible:
github repo for code :- GitHub - Abhimanyucostacloud/digitalsignature

1 Like

Hello Abhimanyu Solanki,

Thank you for contacting WebViewer Forums.

We have a custom signing API which supports the use of Hardware Security Module (HSM) tokens. More information can be found here: Custom Signing using JavaScript | Apryse documentation

For all other inquiries and details, please review this documentation here on digital signatures: JavaScript PDF Digital Signature Library | Apryse documentation

Regards,
Luke

1 Like