Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSA - update to SHA-2 #474

Closed
wants to merge 5 commits into from
Closed

TSA - update to SHA-2 #474

wants to merge 5 commits into from

Conversation

mxlbzn
Copy link
Contributor

@mxlbzn mxlbzn commented Nov 18, 2015

OpenSSL is still using rather obsolete SHA-1 in TSA (ts) code.

This pull request contains following changes:

  • change the default message digest algorithm used in time-stamp query from sha1 to sha256 in ts app (apps/ts.c) (d4c5edc)
  • change the time-stamp response (token) signature hash algorithm from sha1 to sha256 (crypto/ts/ts_rsp_sign.c) (71af5e7)
  • update digests tsa section config value (default acceptable time-stamp query message digest algorithms) in sections from md5, sha1(!) to sha1, sha256, ... (apps/openssl.cnf, apps/openssl-vms.cnf) (ef86470)
  • in tsa test suite, update these as well; add test to verify that unacepptable (by config) message algorithm in the time-stamp query causes failure time-stamp reply (686f6b8)
  • fix misleading variable name (from $datafile to $confsection in create_time_stamp_response; probably relict from verify_time_stamp_response copy); fix typo in test msg string (from req3.req to req3.tsq) (the changeset as above)

@mxlbzn
Copy link
Contributor Author

mxlbzn commented Nov 19, 2015

Note: sha1 usage is not completely eliminated by this PR. For now I have left it in openssl config tsa digests, together with sha-2 algorithms.

There's yet another usage of sha1, and that's ESSCertIDv1 (https://github.com/openssl/openssl/blob/OpenSSL_1_0_2d/crypto/ts/ts_rsp_sign.c#L845-L857). ESSCertIDv2 (rfc5816) allows using different hashes than sha1, but is not yet implemented. I did not examine thoroughly how widespread it currently is in trusted time-stamps.., our country's major QCA is providing trusted timestamps with sha256 signature algorithm, but still using v1 ESSCertID, i.e. sha1 hash as signer cert identifier.

@jariq
Copy link

jariq commented Nov 20, 2015

Similar patch is waiting for inclusion since 2010. Good luck :)

@mxlbzn
Copy link
Contributor Author

mxlbzn commented Nov 20, 2015

I was not aware of the patch. I like the idea of configurable option, it came to me as well. But I finally took more simple/conservative/lazy approach :)

@kroeckx
Copy link
Member

kroeckx commented Nov 21, 2015

I think this can now be closed?

@mxlbzn
Copy link
Contributor Author

mxlbzn commented Nov 23, 2015

Yes, I think this can be closed. Please let me know if you want me to make another pull request with the test/recipes/80-test_tsa.t test.

@richsalz
Copy link
Contributor

richsalz commented Mar 3, 2016

Can you please look at #771 and see if it meets your needs?

@richsalz richsalz closed this Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants