ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
openpgp_secret_key_t Struct Reference

The parsed public and private material from an OpenPGP secret-key packet. More...

#include <include/ascii-chat/crypto/gpg/openpgp.h>

Data Fields

uint8_t version
 Packet version (should be 4).
uint32_t created
 Creation timestamp (Unix epoch).
uint8_t algorithm
 Public key algorithm (22 = EdDSA).
uint8_t pubkey [32]
 Ed25519 public key (32 bytes).
uint8_t seckey [32]
 Ed25519 secret key (32 bytes).
uint64_t keyid
 OpenPGP Key ID (last 8 bytes of fingerprint).
bool is_encrypted
 True if secret key material is encrypted.

Detailed Description

The parsed public and private material from an OpenPGP secret-key packet.

Represents the parsed data from a Secret Key Packet (tag 5), The public half mirrors openpgp_public_key_t; seckey contains the Ed25519 seed and is_encrypted records whether the packet used protected secret-key material. The current parser accepts only unencrypted version-4 EdDSA packets, and callers must treat seckey as sensitive memory.

Definition at line 124 of file openpgp.h.

Field Documentation

◆ algorithm

uint8_t openpgp_secret_key_t::algorithm

Public key algorithm (22 = EdDSA).

Definition at line 127 of file openpgp.h.

Referenced by openpgp_parse_secret_key_packet().

◆ created

uint32_t openpgp_secret_key_t::created

Creation timestamp (Unix epoch).

Definition at line 126 of file openpgp.h.

Referenced by openpgp_parse_secret_key_packet().

◆ is_encrypted

bool openpgp_secret_key_t::is_encrypted

True if secret key material is encrypted.

Definition at line 131 of file openpgp.h.

Referenced by openpgp_parse_armored_seckey(), openpgp_parse_binary_seckey(), and openpgp_parse_secret_key_packet().

◆ keyid

uint64_t openpgp_secret_key_t::keyid

OpenPGP Key ID (last 8 bytes of fingerprint).

Definition at line 130 of file openpgp.h.

◆ pubkey

uint8_t openpgp_secret_key_t::pubkey[32]

Ed25519 public key (32 bytes).

Definition at line 128 of file openpgp.h.

Referenced by openpgp_parse_armored_seckey(), openpgp_parse_binary_seckey(), and openpgp_parse_secret_key_packet().

◆ seckey

uint8_t openpgp_secret_key_t::seckey[32]

Ed25519 secret key (32 bytes).

Definition at line 129 of file openpgp.h.

Referenced by openpgp_parse_armored_seckey(), openpgp_parse_binary_seckey(), and openpgp_parse_secret_key_packet().

◆ version

uint8_t openpgp_secret_key_t::version

Packet version (should be 4).

Definition at line 125 of file openpgp.h.

Referenced by openpgp_parse_secret_key_packet().


The documentation for this struct was generated from the following file: