ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
keys_validation.h
Go to the documentation of this file.
1#pragma once
2
25
26#include "../common.h"
27#include "key_types.h" // Include the key type definitions
28#include <stdint.h>
29#include <stddef.h>
30#include <stdbool.h>
31
36
61
90
110asciichat_error_t check_key_expiry(const public_key_t *key, bool *is_expired);
111
134asciichat_error_t validate_key_security(const char *key_path);
135
137
142
162asciichat_error_t validate_ssh_key_format(const char *key_text);
163
182asciichat_error_t validate_gpg_key_format(const char *key_text);
183
204
206
211
234asciichat_error_t check_key_strength(const public_key_t *key, bool *is_weak);
235
258asciichat_error_t check_key_patterns(const public_key_t *key, bool *has_weak_patterns);
259
261
266
291asciichat_error_t compare_public_keys(const public_key_t *key1, const public_key_t *key2, bool *are_equal);
292
316asciichat_error_t check_key_fingerprint(const public_key_t *key, const uint8_t *fingerprint, size_t fingerprint_len,
317 bool *matches);
318
343asciichat_error_t generate_key_fingerprint(const public_key_t *key, uint8_t *fingerprint_out, size_t fingerprint_size);
344
⚙️ Common definitions, error codes, macros, and types shared throughout the application
unsigned char uint8_t
Definition common.h:60
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
asciichat_error_t check_key_expiry(const public_key_t *key, bool *is_expired)
Check if a key is expired.
asciichat_error_t validate_gpg_key_format(const char *key_text)
Validate GPG key format.
asciichat_error_t validate_ssh_key_format(const char *key_text)
Validate SSH key format.
asciichat_error_t validate_key_security(const char *key_path)
Validate key permissions and security.
asciichat_error_t validate_private_key(const private_key_t *key)
Validate a private key structure.
asciichat_error_t validate_public_key(const public_key_t *key)
Validate a public key structure.
asciichat_error_t check_key_fingerprint(const public_key_t *key, const uint8_t *fingerprint, size_t fingerprint_len, bool *matches)
Check if key matches a fingerprint.
asciichat_error_t check_key_patterns(const public_key_t *key, bool *has_weak_patterns)
Check for key reuse or weak patterns.
asciichat_error_t check_key_strength(const public_key_t *key, bool *is_weak)
Check if key has weak parameters.
asciichat_error_t validate_x25519_key_format(const char *key_hex)
Validate X25519 key format.
asciichat_error_t compare_public_keys(const public_key_t *key1, const public_key_t *key2, bool *are_equal)
Compare two public keys for equality.
asciichat_error_t generate_key_fingerprint(const public_key_t *key, uint8_t *fingerprint_out, size_t fingerprint_size)
Generate key fingerprint.
Private identity-key material used for server authentication and signing.
Definition key_types.h:97
The normalized public identity used by ascii-chat's crypto and key-management code.
Definition key_types.h:72