EldoS | Feel safer!

Software components for data protection, secure storage and transfer

It is possible to preserve older timestamp in CAdES-A?

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#33801
Posted: 06/26/2015 16:37:56
by Iarmolenco (Basic support level)
Joined: 06/26/2015
Posts: 4

Hi,
I have a some questions about CAdES Archive
1.It is possible when i add new timestamp from TSP to maintain older timestamp?
2.This new timestamp is overwrite the older one or it is added(append) to sequence?

Thank You.
#33802
Posted: 06/26/2015 18:14:04
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

Generally, you can add as many timestamps as you like, unless they are of the 'content timestamp' type (which is quite rarely used). Adding new timestamp does not affect any older timestamps in any way.

Cheers,

Ken
#33803
Posted: 06/26/2015 19:22:30
by Iarmolenco (Basic support level)
Joined: 06/26/2015
Posts: 4

Thank you Ken for quick response.

Can you tell me which is the function that adds another timestamp? i can't figure out.

I initially create cadesProcessor.CreateBES(Cert, ChainCert) and later i upgrade it to CAdES-A with cadesProcessor.UpgradeToA(TSPClient, TSPClient,TSPClient);

Thanks.
#33804
Posted: 06/26/2015 20:07:25
by Ken Ivanov (EldoS Corp.)

If you are looking to create another signature timestamp (i.e. a timestamp that is put into an unsigned attribute of an existing signature), the easiest way would be to load the whole CMS structure into a TElSignedCMSMessage object and call the AddTimestamp() method of the needed signature object.

However, as you are speaking about CAdES, the route might be different if you need to add a timestamp of a different type (e.g. validation and/or archival timestamp). Just let me know if that's the case (and all the details, if possible), and we will guide you on the exact way to do it.

Cheers,

Ken
#33808
Posted: 06/27/2015 06:34:45
by Iarmolenco (Basic support level)
Joined: 06/26/2015
Posts: 4

I need to add a new archival timestamp.

Detail of my signarute:
- i use C#
- i have a function that sign a document and add timestamp with UpgradeToA(TSP,TSP,TSP)
- signature is detached.

What i need now is to add new archival timestamp but preserve older ( and if it's posible to change hash algorithm).
#33824
Posted: 06/29/2015 04:37:04
by Ken Ivanov (EldoS Corp.)

Thank you for the details.

As per your description, TElCAdESSignatureProcessor.Archive() (or ArchiveBaseline() if you wish your signature to be compliant to CAdES baseline profile) is the method you need to use. The method adds another archival timestamp to the CMS, preserving all the existing timestamps.

You can also use a different hash algorithm for the new timestamp. Please use the HashAlgorithm property of the TSPClient object to adjust it.

Ken
#33845
Posted: 07/01/2015 11:58:15
by Iarmolenco (Basic support level)
Joined: 06/26/2015
Posts: 4

Thank you Ken, it is very useful!

I have one more question. What property returns all this timestamps?
I saw only LastArchivalTime() method.


UPDATE:
Code
     for (int j = 0; j < Semnatura.ValidationTimestampCount; j++)
        {  
                archive_time.WriteLine(Semnatura.get_ValidationTimestamps(j).Info.Time.ToString());
            }


Correct me if I'm wrong.
#33859
Posted: 07/02/2015 06:53:38
by Ken Ivanov (EldoS Corp.)

You are correct, all LTV / archival timestamps can be accessed via the ValidationTimestamps[] property (get_ValidationTimestamps() method in C#). Please check the TimestampType property of the returned timestamp objects to get the type of the timestamp.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 1645 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!