https://gitee.com/kingmaster0317/dream-studio-assessment
这个链接点进去,看看需不需要注册
最好可以加个微信交流一下
点进去有一个解压文件
我开出来是这样样子,但我感觉这个用aes没法解
反正我是没整开
大家看看呢?
这个应该能解出一个什么东西
https://gitee.com/kingmaster0317/dream-studio-assessment
这个链接点进去,看看需不需要注册
最好可以加个微信交流一下
c语言aes加解密参考:
【精选】C语言 AES加解密_c语言实现aes加密解密-CSDN博客
AES加解密_c语言实现aes加密解密
https://blog.csdn.net/nanfeibuyi/article/details/125474445
以下引自强大而免费的微信小程序:皆我百晓生。
以下是使用C语言编写的AES解密算法:
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <openssl/aes.h>
#define AES_KEY_LENGTH 256
int decryptAES(const unsigned char *ciphertext, int ciphertext_len, const unsigned char *key, unsigned char *plaintext) {
AES_KEY aes_key;
if (AES_set_decrypt_key(key, AES_KEY_LENGTH, &aes_key) < 0) {
fprintf(stderr, "Failed to set AES decryption key.\n");
return -1;
}
int num_blocks = ciphertext_len / AES_BLOCK_SIZE;
uint8_t block[AES_BLOCK_SIZE];
for (int i = 0; i < num_blocks; i++) {
AES_decrypt(ciphertext + (i * AES_BLOCK_SIZE), block, &aes_key);
memcpy(plaintext + (i * AES_BLOCK_SIZE), block, AES_BLOCK_SIZE);
}
int padding = plaintext[ciphertext_len - 1];
int plaintext_len = ciphertext_len - padding;
plaintext[plaintext_len] = '\0';
return plaintext_len;
}
int main() {
const char *ciphertext_str = "U2FsdGVkX18tf7PGMZuBWVg7da0y99qIgWt0vOshd+tlJZkKWvJ9JztjLSmKZy8j";
const char *key_str = "Dream Studio";
unsigned char ciphertext[1024];
unsigned char key[AES_KEY_LENGTH / 8];
unsigned char plaintext[1024];
int ciphertext_len = strlen(ciphertext_str);
int key_len = strlen(key_str);
if (ciphertext_len % AES_BLOCK_SIZE != 0) {
fprintf(stderr, "Invalid ciphertext length.\n");
return -1;
}
if (key_len != AES_KEY_LENGTH / 8) {
fprintf(stderr, "Invalid key length.\n");
return -1;
}
memcpy(ciphertext, ciphertext_str, ciphertext_len);
memcpy(key, key_str, key_len);
int plaintext_len = decryptAES(ciphertext, ciphertext_len, key, plaintext);
if (plaintext_len < 0) {
fprintf(stderr, "Failed to decrypt.\n");
return -1;
}
printf("Decrypted plaintext: %s\n", plaintext);
return 0;
}
请确保你已经安装了OpenSSL库,并使用编译器链接该库。运行程序后,将打印出解密后的明文。