I am working on a project that is related with Health Care.
There is a function which is designed as below:
- Backend(me) need to generate a hash value from a EMR object(electronic medical record) then pass it to frontend.
- Frontend need to encrypt this hash to get a signature-value and use it to get a timestamp.
- Frontend then return the signature-value and the timestamp to me.
- Finally, I have to use this signature-value, timestamp, and Certificate(which already stored in DB) to generate a XAdES-T signature.
The purpose is like make sure the EMR object is not modified after signing it.
I am currently using XAdES4j. When I use my own keypair to generate whole signature myself, it works fine. But when it comes to separate steps by frontend and backend, I have no idea how to do it. I can’t figure out how to create signature using specific signature-value and digest-value via XAdES4j.
Is it possible to do it with XAdES4j? Or the process of the function shouldn’t design like this?
P.S. I was told that signing process(signature-value calculated) must be done at the frontend, not backend.
Is there any way to create XAdES-T signature with custom signature-value?
林靖Albert Lin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.