Uploaded image for project: 'SignServer'
  1. SignServer
  2. DSS-1823

SignClient client-side hashing support for OpenPGP detached signatures

    Details

    • Epic Link:
    • Sprint:
      SignServer-Sprint 101

      Description

      • Update SignClient to support client-side hashing for PGP signatures:
        • SignClient hashes the content
        • SignClient produces and hashes the PGP packets including "Creation Time", "Key ID", "Key Algorithm"
        • From the hash the pre-hashed signature input value is constructed (i.e. according to RFC#3447)
        • SignClient sends the pre-hashed signature input to the PGPPlainSigner (DSS-1822)
        • PGPPlainSigner (configured with signature algorithm NONEwithRSA or ECDSA) creates and returns the plain signature
        • SignClient contructs the final PGP message/file
      •  Specifically for detached signatures, it works like this:
        • Input to SignClient: any data + PGP-detached-sig flag + Key ID + Key Algorithm
        • From SignClient to PGPPlainSigner: the final signature input (i.e. hash) + Key ID + Key Algorithm
        • From PGPPlainSigner (DSS-1822) back to SignClient: Plain Signature
        • SignClient then finishes the PGP signature based on the plain signature
        • Output from SignClient: ASCII armored PGP Signature
      • A separate ticket is for clear-text signatures: ...

       

      TODO in this ticket:

      • [✔] MK: New FileSpecificHandler (3h)
      • [✔] MK: Implement PGP signing preparations + finalization
        • PGP Signing like in OpenPGPSigner (1h) but:
        • Override BC code in order to not do the final signature + include the PGPSigner calculated signature (5d)
      • [✔] ML: New SignClient flags (2h)
        • Key ID (hex string)
        • Key algorithm (RSA (=sign), DSA, ECDSA or numeric PublicKeyAlgorithmTags)
        • Output format: BINARY or ARMORED
      • [✔] Support for other hash algorithms than SHA-256
      • [✔] Support for other key algorithms than RSA (i.e. ECDSA and possibly DSA)
      • [✔] Include public key algorithm (numeric value) as request metadata (i.e. to be checked by OpenPGPPlainSigner)
      • [✔] VS: Error handling for not matching key ID and key algorithm (after the OpenPGPPlainSigner is available and can return errors for this)
      • Tests
        • [] System tests (4h)
          • * [ ✔ ] MK: Signing test using default algorithms
          • [✔] MK: Using different Key IDs
          • [✔] ML: Additional tests with other algorithms and flags
        • [✔] MK: Modify some of the compliance tests to use SignClient with client-side for this . Code is added but uncommented as the key id flag is not implemented yet.
        • [ ✔ ] MK: Enable the uncommented test cases in the compliance tests (after pgp key id flag has been added)
        • [✔] ML: Additional test for other digest algorithms in compliance tests (after support for other digest algorithm has been added)
        • [-] Manual test steps (DSSQA) for signing (2h). Lets first add this to DSSINTER-358.
      • [] ML: Documentation (2h)
        • ClientCLI page update and/or client-side hashing page

        Attachments

          Activity

            People

            Assignee:
            marcus.lundblad@primekey.se Marcus Lundblad
            Reporter:
            markus Markus Kilås
            Verified by:
            Marcus Lundblad, Markus Kilås
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 week, 1 day, 3 hours
                1w 1d 3h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 10 minutes Time Not Required
                3d 10m