ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
keys.c File Reference

Go to the source code of this file.

Functions

asciichat_error_t parse_public_key (const char *input, public_key_t *key_out)
 Parse SSH/GPG public key from any format (returns first key only)
 
asciichat_error_t parse_private_key (const char *key_path, private_key_t *key_out)
 Parse SSH private key from file.
 
asciichat_error_t parse_public_keys (const char *input, public_key_t *keys_out, size_t *num_keys, size_t max_keys)
 Parse all SSH/GPG public keys from any format (returns all keys)
 
asciichat_error_t public_key_to_x25519 (const public_key_t *key, uint8_t x25519_pk[32])
 Convert public key to X25519 for Diffie-Hellman key exchange.
 
asciichat_error_t private_key_to_x25519 (const private_key_t *key, uint8_t x25519_sk[32])
 Convert private key to X25519 for Diffie-Hellman key exchange.
 
asciichat_error_t fetch_github_keys (const char *username, char ***keys_out, size_t *num_keys, bool use_gpg)
 Fetch SSH/GPG keys from GitHub using BearSSL.
 
asciichat_error_t fetch_gitlab_keys (const char *username, char ***keys_out, size_t *num_keys, bool use_gpg)
 Fetch SSH/GPG keys from GitLab using BearSSL.
 
asciichat_error_t parse_keys_from_file (const char *path, public_key_t *keys, size_t *num_keys, size_t max_keys)
 Parse SSH keys from file (supports authorized_keys and known_hosts formats)
 
void format_public_key (const public_key_t *key, char *output, size_t output_size)
 Convert public key to display format (ssh-ed25519 or x25519 hex)
 
asciichat_error_t hex_decode (const char *hex, uint8_t *output, size_t output_len)
 Decode hex string to binary (utility function for testing)