Opened 4 years ago

Closed 4 years ago

#18258 closed enhancement (fixed)

Code cleanup, aes.c/crypto.c

Reported by: malekbr Owned by:
Priority: Very Low Milestone: Tor: 0.2.8.x-final
Component: Core Tor/Tor Version:
Severity: Trivial Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Removed aes_crypt, left only aes_crypt_inplace. Removed should_use_openssl_CTR, was used for openssl 1.0.0 counter bug.

Child Tickets

Change History (6)

comment:1 Changed 4 years ago by malekbr

The repo:
https://github.com/malekbr/tor
The branch:
cleaned_aes_crypt

comment:2 Changed 4 years ago by malekbr

Status: newneeds_review

comment:3 Changed 4 years ago by nickm

Milestone: Tor: 0.2.8.x-final

comment:4 Changed 4 years ago by nickm

Status: needs_reviewneeds_revision
-  if (fast_memneq(output, encrypt_zero, 16)) {
-    /* Counter mode is buggy */
-    log_notice(LD_CRYPTO, "This OpenSSL has a buggy version of counter mode; "
-               "not using it.");
-  } else {
-    /* Counter mode is okay */
-    log_info(LD_CRYPTO, "This OpenSSL has a good implementation of counter "
-               "mode; using it.");
-    should_use_openssl_CTR = 1;
-  }

It might be cool to keep the check code, and instead of giving a log_notice() in the bug case, give a log_err() and exit.

Also, does anything still use aes_cnt_cipher.buf and aes_fill_buffer? If not, can we throw them out?

comment:5 Changed 4 years ago by malekbr

Status: needs_revisionneeds_review

It appears .buf is needed, aes_fill_buffer isn't.

comment:6 Changed 4 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

ok. I squashed those and added a changes file and merged. Thanks!

Note: See TracTickets for help on using tickets.