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

Add support for some IBM specific mechanisms supported by OpenCryptoki for the RPC protocol #415

Merged
merged 11 commits into from
May 16, 2022

Commits on May 16, 2022

  1. Add IBM specific mechanism and attributes

    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    c098cd0 View commit details
    Browse the repository at this point in the history
  2. Add support for serializing CK_ECDH1_DERIVE_PARAMS mech param

    Used by CKM_ECDH1_DERIVE, CKM_IBM_EC_X25519 and CKM_IBM_EC_X448.
    
    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    f1286c2 View commit details
    Browse the repository at this point in the history
  3. client: Allow zero part length at C_SignUpdate

    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    8ce0974 View commit details
    Browse the repository at this point in the history
  4. Fix support of CKA_DERIVE_TEMPLATE

    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    a8aa314 View commit details
    Browse the repository at this point in the history
  5. Add other SHA variants, also for RSA and EC signatures

    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    960a307 View commit details
    Browse the repository at this point in the history
  6. Add support for missing AES and DES/DES3 mechanisms

    They take a 16 byte (AES) or 8 byte (DES/DES3) IV as mechanism parameter.
    
    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    4e1a915 View commit details
    Browse the repository at this point in the history
  7. Add support for MAC and HMAC general mechanisms

    The take a mechanism parameter of type CK_MAC_GENERAL_PARAMS which
    is a CK_ULONG.
    
    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    43f1edd View commit details
    Browse the repository at this point in the history
  8. Add support for CKM_DH_PKCS_DERIVE

    It takes the the public value of the other party as mechanism parameter.
    
    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    8dd7efc View commit details
    Browse the repository at this point in the history
  9. rpc: Handle special cases for buffer and length

    When the buffer is not NULL, but the length is zero then treat this as an
    empty message. Serialize this in a special way so that the server can
    restore the same situation.
    
    Example: Terminate an operation via C_XxxFinal, but there is no more
    data for the final part. A call to C_XxxFinal with buffer=NULL and length=0
    would be treated as a size query, and would not terminate the operation.
    So the way to terminate the operation without more data is to specify
    buffer!=NULL but length=0.
    
    When sending a byte array, and the buffer is NULL, and the length is
    zero, don't treat this is invalid, but as empty message.
    
    Example: C_XxxUpdate with an empty message.
    
    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    8d5e2f5 View commit details
    Browse the repository at this point in the history
  10. Add support for CKM_AES_CTR

    It takes a CK_AES_CTR_PARAMS structure as mechanism parameter.
    
    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    5d84fd4 View commit details
    Browse the repository at this point in the history
  11. Add support for CKM_AES_GCM

    It takes a CK_GCM_PARAMS structure as mechanism parameter.
    
    Signed-off-by: Ingo Franzki <[email protected]>
    ifranzki committed May 16, 2022
    Configuration menu
    Copy the full SHA
    6c07b98 View commit details
    Browse the repository at this point in the history