diff --git a/src/crypto-nettle.c b/src/crypto-nettle.c index 5df00c4..15d490f 100644 --- a/src/crypto-nettle.c +++ b/src/crypto-nettle.c @@ -664,7 +664,6 @@ void crypto_rsa_pub_key_exponent(const struct crypto_rsa_pub_key* key, uint8_t* dst, size_t dst_size) { char* str = mpz_get_str(NULL, 16, key->key.e); - nvnc_trace("e: %s", str); free(str); crypto_export(dst, dst_size, key->key.e); diff --git a/src/server.c b/src/server.c index da40ca3..ed72e5e 100644 --- a/src/server.c +++ b/src/server.c @@ -537,8 +537,6 @@ static int rsa_aes_send_challenge(struct nvnc_client* client, client->rsa.challenge, client->rsa.challenge_len); msg->length = htons(len); - nvnc_trace("Challenge length is %zd", len); - stream_write(client->net_stream, buffer, sizeof(*msg) + len, NULL, NULL); return 0; } @@ -558,14 +556,9 @@ static int on_rsa_aes_public_key(struct nvnc_client* client) sizeof(*msg) + byte_length * 2) return 0; - nvnc_trace("Got public key with bit size %d", bit_length); - const uint8_t* modulus = msg->modulus_and_exponent; const uint8_t* exponent = msg->modulus_and_exponent + byte_length; - crypto_dump_base16("Got public key modulus", modulus, byte_length); - crypto_dump_base16("Got public key exponent", exponent, byte_length); - client->rsa.pub = crypto_rsa_pub_key_import(modulus, exponent, byte_length); assert(client->rsa.pub); @@ -599,14 +592,8 @@ static int on_rsa_aes_challenge(struct nvnc_client* client) if (client->buffer_len - client->buffer_index < sizeof(*msg) + length) return 0; - crypto_dump_base16("client buffer", client->msg_buffer + - client->buffer_index, client->buffer_len - - client->buffer_index); - struct nvnc* server = client->server; - nvnc_trace("Encrypted challenge has length: %d", length); - uint8_t client_random[32] = {}; ssize_t len = crypto_rsa_decrypt(server->rsa_priv, client_random, client->rsa.challenge_len, msg->challenge, length);