IPWorks Encrypt 2020 .NET Edition

Questions / Feedback?

SubkeyList Event

Fires once for each subkey listed when ListSubkeys is called.

Syntax

public event OnSubkeyListHandler OnSubkeyList;

public delegate void OnSubkeyListHandler(object sender, KeymgrSubkeyListEventArgs e);

public class KeymgrSubkeyListEventArgs : EventArgs {
  public string KeyId { get; }
  public string Fingerprint { get; }
  public string PublicKeyAlgorithm { get; }
  public int PublicKeyLength { get; }
  public string Curve { get; }
  public int UsageFlags { get; }
  public string Usage { get; }
  public string EffectiveDate { get; }
  public string ExpirationDate { get; }
  public bool Revoked { get; }
}
Public Event OnSubkeyList As OnSubkeyListHandler

Public Delegate Sub OnSubkeyListHandler(sender As Object, e As KeymgrSubkeyListEventArgs)

Public Class KeymgrSubkeyListEventArgs Inherits EventArgs
  Public ReadOnly Property KeyId As String
  Public ReadOnly Property Fingerprint As String
  Public ReadOnly Property PublicKeyAlgorithm As String
  Public ReadOnly Property PublicKeyLength As Integer
  Public ReadOnly Property Curve As String
  Public ReadOnly Property UsageFlags As Integer
  Public ReadOnly Property Usage As String
  Public ReadOnly Property EffectiveDate As String
  Public ReadOnly Property ExpirationDate As String
  Public ReadOnly Property Revoked As Boolean
End Class

Remarks

This event fires once for each subkey when ListSubkeys is called.

KeyId is the hex-encoded, 4- or 8-byte Id of the key. It is the same as the last 4 or 8 bytes of the Fingerprint. For instance:

BF52A0AB

Fingerprint holds the hex-encoded, 20-byte fingerprint of the key. This is in the form:

5E70662EA810E768391A2FE8F7B7D49C89C9D7B1

PublicKeyAlgorithm is the public key algorithm. Possible values are:

  • RSA
  • Elgamal
  • ECDH (Only used with ECDSA and EdDSA keys)

PublicKeyLength is the length of the public key. Common values are 512, 1024, and 2048.

Curve is the curve used by the key when PublicKeyAlgorithm is ECDH. Possible values are:

ValueDescription
secp256r1 NIST curve P-256
secp384r1 NIST curve P-384
secp521r1 NIST curve P-521
Curve25519 Curve25519
Ed25519 Ed25519

Usage is the textual description of UsageFlags.

The value will be of one or more of the following strings, separated by commas:

  • Certifying Other Certificates
  • Signing Emails and Files
  • Encrypting Emails and Files
  • Split Key
  • Authenticate Against Servers
  • Group Key

UsageFlags is an integer flag that shows the intended use for the key. The value is a combination of the following flags:

0x01This key may be used to certify other keys.
0x02This key may be used to sign data.
0x0CThis key may be used to encrypt communications and encrypt storage.
0x10The private component of this key may have been split by a secret-sharing mechanism.
0x20This key may be used for authentication.
0x80The private component of this key may be in the possession of more than one person.

EffectiveDate is the date when this key became valid. The following example illustrates the format of an encoded date:

23-Jan-2000 15:00:00. 

ExpirationDate is the date the key expires. After this date the key will no longer be valid. The following example illustrates the format of an encoded date:

23-Jan-2000 15:00:00. 
If the ExpirationDate is not populated this indicates that the key never expires.

Revoked Indicates whether the subkey is revoked or not.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 .NET Edition - Version 20.0 [Build 8286]