CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
fingerprint.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5
6namespace cdc::mod_gpg {
7
17bool calculateFingerprintV4(uint8_t curve,
18 const uint8_t* pubkey, size_t pubkey_len,
19 uint32_t created_at,
20 uint8_t out_fp[20]);
21
29bool calculateFingerprintV5(uint8_t curve,
30 const uint8_t* pubkey, size_t pubkey_len,
31 uint32_t created_at,
32 uint8_t out_fp[32]);
33
41bool gpgCrossSignDigest(const uint8_t fp_v4[20],
42 const char* user_id,
43 uint8_t out_hash[32]);
44
45} // namespace cdc::mod_gpg
uint8_t curve
uint8_t user_id[FIDO2_USER_ID_MAX_LEN]
bool calculateFingerprintV4(uint8_t curve, const uint8_t *pubkey, size_t pubkey_len, uint32_t created_at, uint8_t out_fp[20])
Compute the RFC 4880 V4 OpenPGP fingerprint (SHA-1, 20 bytes).
bool gpgCrossSignDigest(const uint8_t fp_v4[20], const char *user_id, uint8_t out_hash[32])
Build the digest input for a cross-signature.
bool calculateFingerprintV5(uint8_t curve, const uint8_t *pubkey, size_t pubkey_len, uint32_t created_at, uint8_t out_fp[32])
Compute the V5 / RFC 9580 OpenPGP fingerprint (SHA-256, 32 bytes).