Discuss this help topic in SecureBlackbox Forum

Sign the OpenPGP key

To sign the OpenPGP key you should generate the signature by calling one of the TElPGPCustomSecretKey methods: Sign() or DirectSign(), and pass the newly created signature (Signature parameter of the method) to the TElPGPCustomPublicKey.AddSignature() method of the corresponding public key.

To produce different types of signatures, you should call Sign() or DirectSign() methods with the appropriate parameter sets.

To produce a direct key signature, call DirectSign() method and pass the key to be signed.

To generate user certification signature, call Sign() with the following 4 parameters:

  • PublicKey (the public key bound to the user),
  • User (the TElPGPUserID or TElPGPUserAttr object that specifies the owner of the PublicKey),
  • Signature (the newly generated signature),
  • CertType (specifies certification type: Generic, Personal, Casual, or Positive). By default user certifications use Generic type.

To produce a subkey/primary key binding signature, call Sign() method with the following parameters:

  • Key (a subkey or primary key to be bound),
  • Signature (binding signature will be placed here),
  • EmbeddedSignature (for signing a subkey binding signature, this parameter must contain corresponding primary key binding signature. In other cases it should be a null pointer)

To generate a timestamp signature, call Sign() method with only two parameters: Timestamp and Signature (the timestamp signature will be put here).

To make a third-party certification of the signature, call Sign() method and pass two parameters: SubjectSignature (a signature to be signed) and Signature (the newly generated signature will be put here).

How To articles about OpenPGP key management

Discuss this help topic in SecureBlackbox Forum