|
9 | 9 | #include <gmp.h> |
10 | 10 | #include <time.h> |
11 | 11 |
|
| 12 | +#include <openssl/modes.h> |
12 | 13 | #include <openssl/sha.h> |
13 | 14 | #include <openssl/aes.h> |
14 | 15 | #include "zlib.h" |
@@ -259,7 +260,7 @@ void enumerate_segments() { |
259 | 260 | AES_set_encrypt_key(segment_ptr->crypt_segment.erk, 128, &aes_key); |
260 | 261 | memcpy(iv, segment_ptr->crypt_segment.riv, 16); |
261 | 262 | #ifndef NO_CRYPT |
262 | | - AES_ctr128_encrypt(segment_ptr->data, segment_ptr->data, segment_ptr->len, &aes_key, iv, ecount_buf, &num); |
| 263 | + CRYPTO_ctr128_encrypt(segment_ptr->data, segment_ptr->data, segment_ptr->len, &aes_key, iv, ecount_buf, &num, (block128_f)AES_encrypt); |
263 | 264 | #endif |
264 | 265 | } |
265 | 266 |
|
@@ -559,7 +560,7 @@ int main(int argc, char* argv[]) { |
559 | 560 | memset(ecount_buf, 0, 16); num=0; |
560 | 561 | AES_set_encrypt_key(&output_self_data[metadata_offset], 128, &aes_key); |
561 | 562 | memcpy(iv, &output_self_data[metadata_offset+0x20], 16); |
562 | | - AES_ctr128_encrypt(&output_self_data[0x40+metadata_offset], &output_self_data[0x40+metadata_offset], get_u64(&(output_self_header.s_shsize))-metadata_offset-0x40, &aes_key, iv, ecount_buf, &num); |
| 563 | + CRYPTO_ctr128_encrypt(&output_self_data[0x40+metadata_offset], &output_self_data[0x40+metadata_offset], get_u64(&(output_self_header.s_shsize))-metadata_offset-0x40, &aes_key, iv, ecount_buf, &num, (block128_f)AES_encrypt); |
563 | 564 | memcpy(&output_self_data[metadata_offset], KEY(keypair_e), sizeof(md_header)); |
564 | 565 | /*AES_set_encrypt_key(KEY(erk), 256, &aes_key); |
565 | 566 | AES_cbc_encrypt(&output_self_data[metadata_offset], &output_self_data[metadata_offset], 0x40, &aes_key, iv, AES_ENCRYPT);*/ |
|
0 commit comments