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

Stub implementations for crypto-related functions in WASM build. More...

Go to the source code of this file.

Functions

asciichat_error_t ed25519_verify_signature (const uint8_t public_key[32], const uint8_t *message, size_t message_len, const uint8_t signature[64], const char *gpg_key_id)
 Verify an Ed25519 signature.
 
asciichat_error_t ed25519_sign_message (const private_key_t *key, const uint8_t *message, size_t message_len, uint8_t signature[64])
 Sign a message with Ed25519 (uses SSH agent if available, otherwise in-memory key)
 
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 check_known_host (const char *server_ip, uint16_t port, const uint8_t server_key[32])
 Check if server key is in known_hosts.
 
asciichat_error_t check_known_host_no_identity (const char *server_ip, uint16_t port)
 Check known_hosts for servers without identity key (no-identity entries)
 
bool display_mitm_warning (const char *server_ip, uint16_t port, const uint8_t expected_key[32], const uint8_t received_key[32])
 Display MITM warning with key comparison and prompt user for confirmation.
 
bool prompt_unknown_host (const char *server_ip, uint16_t port, const uint8_t server_key[32])
 Interactive prompt for unknown host - returns true if user wants to add, false to abort.
 
bool prompt_unknown_host_no_identity (const char *server_ip, uint16_t port)
 Interactive prompt for unknown host without identity key - returns true if user wants to continue, false to abort.
 
asciichat_error_t add_known_host (const char *server_ip, uint16_t port, const uint8_t server_key[32])
 Add server to known_hosts.
 
const char * get_known_hosts_path (void)
 
asciichat_error_t prompt_password (const char *prompt_text, char *password_out, size_t password_max_len)
 Prompt the user for a password with secure input.
 

Detailed Description

Stub implementations for crypto-related functions in WASM build.

Definition in file lib/platform/wasm/stubs/crypto.c.

Function Documentation

◆ get_known_hosts_path()

const char * get_known_hosts_path ( void  )

Definition at line 66 of file lib/platform/wasm/stubs/crypto.c.

66 {
67 // No filesystem in WASM
68 return NULL;
69}