mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
changing {} style to match majority of previous style
This commit is contained in:
parent
da6cdf014b
commit
961d929f4d
320 changed files with 5502 additions and 10485 deletions
|
@ -304,8 +304,7 @@ static const signed char transposes[2][20] = {
|
|||
}
|
||||
|
||||
static void camellia_feistel(const uint32_t x[2], const uint32_t k[2],
|
||||
uint32_t z[2])
|
||||
{
|
||||
uint32_t z[2]) {
|
||||
uint32_t I0, I1;
|
||||
I0 = x[0] ^ k[0];
|
||||
I1 = x[1] ^ k[1];
|
||||
|
@ -328,13 +327,11 @@ static void camellia_feistel(const uint32_t x[2], const uint32_t k[2],
|
|||
z[1] ^= I0;
|
||||
}
|
||||
|
||||
void mbedtls_camellia_init(mbedtls_camellia_context *ctx)
|
||||
{
|
||||
void mbedtls_camellia_init(mbedtls_camellia_context *ctx) {
|
||||
memset(ctx, 0, sizeof(mbedtls_camellia_context));
|
||||
}
|
||||
|
||||
void mbedtls_camellia_free(mbedtls_camellia_context *ctx)
|
||||
{
|
||||
void mbedtls_camellia_free(mbedtls_camellia_context *ctx) {
|
||||
if (ctx == NULL)
|
||||
return;
|
||||
|
||||
|
@ -345,8 +342,7 @@ void mbedtls_camellia_free(mbedtls_camellia_context *ctx)
|
|||
* Camellia key schedule (encryption)
|
||||
*/
|
||||
int mbedtls_camellia_setkey_enc(mbedtls_camellia_context *ctx, const unsigned char *key,
|
||||
unsigned int keybits)
|
||||
{
|
||||
unsigned int keybits) {
|
||||
int idx;
|
||||
size_t i;
|
||||
uint32_t *RK;
|
||||
|
@ -456,8 +452,7 @@ int mbedtls_camellia_setkey_enc(mbedtls_camellia_context *ctx, const unsigned ch
|
|||
* Camellia key schedule (decryption)
|
||||
*/
|
||||
int mbedtls_camellia_setkey_dec(mbedtls_camellia_context *ctx, const unsigned char *key,
|
||||
unsigned int keybits)
|
||||
{
|
||||
unsigned int keybits) {
|
||||
int idx, ret;
|
||||
size_t i;
|
||||
mbedtls_camellia_context cty;
|
||||
|
@ -505,8 +500,7 @@ exit:
|
|||
int mbedtls_camellia_crypt_ecb(mbedtls_camellia_context *ctx,
|
||||
int mode,
|
||||
const unsigned char input[16],
|
||||
unsigned char output[16])
|
||||
{
|
||||
unsigned char output[16]) {
|
||||
int NR;
|
||||
uint32_t *RK, X[4];
|
||||
|
||||
|
@ -570,8 +564,7 @@ int mbedtls_camellia_crypt_cbc(mbedtls_camellia_context *ctx,
|
|||
size_t length,
|
||||
unsigned char iv[16],
|
||||
const unsigned char *input,
|
||||
unsigned char *output)
|
||||
{
|
||||
unsigned char *output) {
|
||||
int i;
|
||||
unsigned char temp[16];
|
||||
|
||||
|
@ -620,8 +613,7 @@ int mbedtls_camellia_crypt_cfb128(mbedtls_camellia_context *ctx,
|
|||
size_t *iv_off,
|
||||
unsigned char iv[16],
|
||||
const unsigned char *input,
|
||||
unsigned char *output)
|
||||
{
|
||||
unsigned char *output) {
|
||||
int c;
|
||||
size_t n = *iv_off;
|
||||
|
||||
|
@ -663,8 +655,7 @@ int mbedtls_camellia_crypt_ctr(mbedtls_camellia_context *ctx,
|
|||
unsigned char nonce_counter[16],
|
||||
unsigned char stream_block[16],
|
||||
const unsigned char *input,
|
||||
unsigned char *output)
|
||||
{
|
||||
unsigned char *output) {
|
||||
int c, i;
|
||||
size_t n = *nc_off;
|
||||
|
||||
|
@ -964,8 +955,7 @@ static const int camellia_test_ctr_len[3] =
|
|||
/*
|
||||
* Checkup routine
|
||||
*/
|
||||
int mbedtls_camellia_self_test(int verbose)
|
||||
{
|
||||
int mbedtls_camellia_self_test(int verbose) {
|
||||
int i, j, u, v;
|
||||
unsigned char key[32];
|
||||
unsigned char buf[64];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue