Skip to content

Considering adding support for CKM_CONCATENATE_DATA_AND_BASE #308

@nwalfield

Description

@nwalfield

In order to implement OpenPGP's X25519 decryption completely on the token, we need CKM_CONCATENATE_DATA_AND_BASE. RFC 9580 says:

See Section 6.1 of [RFC7748] for more details on the computation of the ephemeral public key and the shared secret. The HMAC-based Key Derivation Function (HKDF) [RFC5869] is then used with SHA256 [RFC6234] and an info parameter of "OpenPGP X25519" and no salt. The input of HKDF is the concatenation of the following three values:

  • 32 octets of the ephemeral X25519 public key from this packet.

  • 32 octets of the recipient public key material.

  • 32 octets of the shared secret.

Right now, we extract the shared secret, prepend the public keys and load the result back onto the token. Using CKM_CONCATENATE_DATA_AND_BASE, this could be done entirely on token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions