mirror of
https://github.com/Jimmy-Z/bfCL.git
synced 2025-06-18 11:05:49 -04:00
tivial
This commit is contained in:
parent
b0adfd3df1
commit
5c56c3fdb7
@ -10,3 +10,4 @@ Only tested with [mingw-w64-x86_64](https://mingw-w64.org/)
|
||||
AES and SHA1 code from [mbed TLS](https://github.com/ARMmbed/mbedtls/) which is Apache 2.0 license,
|
||||
so I guess this project becomes Apache 2.0 licensed automatically?
|
||||
or only related files are Apache 2.0? I'm not sure.
|
||||
|
||||
|
@ -232,3 +232,4 @@ void aes_encrypt_128( const uint32_t rk[RK_LEN],
|
||||
PUT_UINT32_LE( X2, output, 8 );
|
||||
PUT_UINT32_LE( X3, output, 12 );
|
||||
}
|
||||
|
||||
|
@ -93,3 +93,4 @@ void aes_encrypt_128(const uint32_t rk[RK_LEN], uint32_t *io) {
|
||||
io[2] = X2;
|
||||
io[3] = X3;
|
||||
}
|
||||
|
||||
|
@ -138,3 +138,4 @@ __constant static const uint32_t RCON[10] =
|
||||
0x00000010, 0x00000020, 0x00000040, 0x00000080,
|
||||
0x0000001B, 0x00000036
|
||||
};
|
||||
|
||||
|
@ -74,4 +74,5 @@ inline void dsi_make_ctr(u8 *ctr, u8 *emmc_cid, u64 offset) {
|
||||
PUT_UINT32_BE(buf[3], emmc_cid, 12);
|
||||
add_128_64((u64*)emmc_cid, offset);
|
||||
byte_reverse_16(ctr, emmc_cid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,3 +43,4 @@ __kernel void test_console_id(
|
||||
*out = console_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,4 +30,5 @@ __kernel void test_emmc_cid(
|
||||
if (xor_l == *(u64*)ctr && xor_h == *(u64*)(ctr + 8)) {
|
||||
*out = get_global_id(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ __kernel void sha1_16_test(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#define AES_BLOCK_SIZE 16
|
||||
|
||||
__kernel void aes_128_ecb_test(
|
||||
@ -47,3 +47,4 @@ __kernel void aes_128_ecb_test(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
1
crypto.h
1
crypto.h
@ -15,3 +15,4 @@ void aes_gen_tables(void);
|
||||
void aes_set_key_enc_128(unsigned int rk[RK_LEN], const unsigned char *key);
|
||||
|
||||
void aes_encrypt_128(const unsigned int rk[8], const unsigned char input[16], unsigned char output[16]);
|
||||
|
||||
|
3
dsi.h
3
dsi.h
@ -117,4 +117,5 @@ static inline void dsi_make_xor(u8 *xor, const u8 *src, const u8 *ver) {
|
||||
u8 target_xor[16];
|
||||
xor_128((u64*)target_xor, (u64*)src, (u64*)ver);
|
||||
byte_reverse_16(xor, target_xor);
|
||||
}
|
||||
}
|
||||
|
||||
|
1
ocl.h
1
ocl.h
@ -50,3 +50,4 @@ void ocl_get_device(cl_platform_id *p_platform_id, cl_device_id *p_device_id);
|
||||
cl_program ocl_build_from_sources(
|
||||
unsigned num_sources, const char *source_names[],
|
||||
cl_context context, cl_device_id device_id, const char * options);
|
||||
|
||||
|
@ -287,3 +287,4 @@ int ocl_brute_emmc_cid(const cl_uchar *console_id, cl_uchar *emmc_cid,
|
||||
clReleaseContext(context);
|
||||
return !out;
|
||||
}
|
||||
|
||||
|
@ -196,3 +196,4 @@ int ocl_test() {
|
||||
|
||||
return succeed;
|
||||
}
|
||||
|
||||
|
@ -237,3 +237,4 @@ cl_program ocl_build_from_sources(
|
||||
free(source_sizes);
|
||||
return program;
|
||||
}
|
||||
|
||||
|
3
utils.c
3
utils.c
@ -175,4 +175,5 @@ char * trim(char *in) {
|
||||
*last_non_ws = '\0';
|
||||
}
|
||||
return first_non_ws;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user