Hi everyone,
I'm currently working on
Pompeu Fabra University in the Electronic Administration Department.
I'm doing a Signature Project that
signs,
completes and
validates in
XAdES,
PAdES and
CAdES signature types.
Now I want to explain what consists my project, the troubles I had to resolve and the conclusions.
First of all, I want to explain the signature types:
XAdES: XML Advanced Electronic Signature
This signature can sign BINARI or XML files and the way for complete and validate is different. The XAdES Signature Type generates a
XML Signature file. For a correct validation, the generated signature must have a correctly hash document code. So the libraries used are important, because differents libraries generates differents XML files.
There are three Signature Types:
Detached (the signature don't includes the file signed),
Atached Enveloped (when the signature comprises a part of the document containing the signed data) and
Atached Enveloping (when the signature contains the signed data withing itself).
PAdES: PDF Advanced Electronic Signature
This signature only can sign BINARI files. The PAdES Signature Type generate a
PDF Signature file that is the result of sign or complete the PDF file we want to sign. So the PAdES Signature only exists in
Atached way.
CAdES: CMS Advanced Electronic Signature
This signature only can sign BINARI files. The CAdES Signature Type generate a
p7b Signature file that is a binary file. There are
Atached or
Detached Signature Types, but don't exists the Enveloped or Enveloping concept.
Now I'm going to explain how to implements a Sign Service:
For implements a WebService I use
Spring Boot and
Java 8.
First of all, you have to find the Service you want to use, in my case I choose
DSS (Digital Signature Service): here is the
git repository.
Take a look to the repository and, when you are ready, make the next steps:
- Add the necessaries maven dependencies.
- Find the Cookbook example and try to understand how it goes and reply the example to your code.
Is very easy to integrate the DSS Sign Service.
In a week I've integrated a PAdES Enveloped, XAdES Detached and CAdES Detached Sign Service with an indicated Certificate.
And finally, I'm going to explain how I've done a Complete and Validation Signature Service:
For implements a WebService I use
Spring Boot and
Java 8.
First of all, you have to find the Service you want to use. In my case, I choose
Psis Client from AOC: here you have the explanations in his
web.
Here AOC offers some
example codes and calls for integrate his Service in your Application.
Now you are in the moment to play and improve your code.
After over 3 months you will have your Complete and Validation Signature Service, but, what it's more important, You are going to learn a lot.
I've done a Complete and Validation PAdES Enveloped, XAdES Detached and CAdES Detached Signature Service three months ago.
If you are interested in more details, contact me and we could collaborate together in your project.