| /optee_os/core/lib/libtomcrypt/src/ciphers/aes/ |
| H A D | aesni.c | 49 ulong32 *rk, *K; in aesni_setup() local 70 rk = skey->rijndael.eK; in aesni_setup() 71 LOAD32L(rk[0], key); in aesni_setup() 72 LOAD32L(rk[1], key + 4); in aesni_setup() 73 LOAD32L(rk[2], key + 8); in aesni_setup() 74 LOAD32L(rk[3], key + 12); in aesni_setup() 78 rk[4] = rk[0] ^ setup_mix(temp, 3) ^ rcon[i]; in aesni_setup() 79 rk[5] = rk[1] ^ rk[4]; in aesni_setup() 80 rk[6] = rk[2] ^ rk[5]; in aesni_setup() 81 rk[7] = rk[3] ^ rk[6]; in aesni_setup() [all …]
|
| H A D | aes.c | 99 ulong32 temp, *rk, *K; in SETUP() local 122 rk = skey->rijndael.eK; in SETUP() 123 LOAD32H(rk[0], key ); in SETUP() 124 LOAD32H(rk[1], key + 4); in SETUP() 125 LOAD32H(rk[2], key + 8); in SETUP() 126 LOAD32H(rk[3], key + 12); in SETUP() 129 temp = rk[3]; in SETUP() 130 rk[4] = rk[0] ^ setup_mix(temp) ^ rcon[i]; in SETUP() 131 rk[5] = rk[1] ^ rk[4]; in SETUP() 132 rk[6] = rk[2] ^ rk[5]; in SETUP() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | aesni.c | 98 const __m128i *rk = (const __m128i *) (ctx->buf + ctx->rk_offset); in mbedtls_aesni_crypt_ecb() local 104 state = _mm_xor_si128(state, rk[0]); // state ^= *rk; in mbedtls_aesni_crypt_ecb() 105 ++rk; in mbedtls_aesni_crypt_ecb() 111 state = _mm_aesdec_si128(state, *rk); in mbedtls_aesni_crypt_ecb() 112 ++rk; in mbedtls_aesni_crypt_ecb() 115 state = _mm_aesdeclast_si128(state, *rk); in mbedtls_aesni_crypt_ecb() 122 state = _mm_aesenc_si128(state, *rk); in mbedtls_aesni_crypt_ecb() 123 ++rk; in mbedtls_aesni_crypt_ecb() 126 state = _mm_aesenclast_si128(state, *rk); in mbedtls_aesni_crypt_ecb() 281 __m128i *rk = (__m128i *) rk_bytes; in aesni_setkey_enc_128() local [all …]
|
| H A D | padlock.c | 63 uint32_t *rk; in mbedtls_padlock_xcryptecb() local 68 rk = ctx->buf + ctx->rk_offset; in mbedtls_padlock_xcryptecb() 70 if (((long) rk & 15) != 0) { in mbedtls_padlock_xcryptecb() 91 : "m" (ebx), "m" (ctrl), "m" (rk), "m" (blk) in mbedtls_padlock_xcryptecb() 112 uint32_t *rk; in mbedtls_padlock_xcryptcbc() local 117 rk = ctx->buf + ctx->rk_offset; in mbedtls_padlock_xcryptcbc() 121 ((long) rk & 15) != 0) { in mbedtls_padlock_xcryptcbc() 146 "m" (rk), "m" (input), "m" (output), "m" (iw) in mbedtls_padlock_xcryptcbc()
|
| H A D | aria.c | 392 aria_rot128(ctx->rk[i], w[i], w2, 128 - 19); in mbedtls_aria_setkey_enc() 393 aria_rot128(ctx->rk[i + 4], w[i], w2, 128 - 31); in mbedtls_aria_setkey_enc() 394 aria_rot128(ctx->rk[i + 8], w[i], w2, 61); in mbedtls_aria_setkey_enc() 395 aria_rot128(ctx->rk[i + 12], w[i], w2, 31); in mbedtls_aria_setkey_enc() 397 aria_rot128(ctx->rk[16], w[0], w[1], 19); in mbedtls_aria_setkey_enc() 422 uint32_t t = ctx->rk[i][k]; in mbedtls_aria_setkey_dec() 423 ctx->rk[i][k] = ctx->rk[j][k]; in mbedtls_aria_setkey_dec() 424 ctx->rk[j][k] = t; in mbedtls_aria_setkey_dec() 430 aria_a(&ctx->rk[i][0], &ctx->rk[i][1], in mbedtls_aria_setkey_dec() 431 &ctx->rk[i][2], &ctx->rk[i][3]); in mbedtls_aria_setkey_dec() [all …]
|
| H A D | aesce.c | 327 static void aesce_setkey_enc(unsigned char *rk, in aesce_setkey_enc() argument 342 const uint32_t *rko_end = (uint32_t *) rk + round_keys_len_in_words; in aesce_setkey_enc() 344 memcpy(rk, key, key_len_in_words * 4); in aesce_setkey_enc() 346 for (uint32_t *rki = (uint32_t *) rk; in aesce_setkey_enc() 350 size_t iteration = (size_t) (rki - (uint32_t *) rk) / key_len_in_words; in aesce_setkey_enc() 384 int mbedtls_aesce_setkey_enc(unsigned char *rk, in mbedtls_aesce_setkey_enc() argument 392 aesce_setkey_enc(rk, key, bits); in mbedtls_aesce_setkey_enc()
|
| H A D | aesce.h | 119 int mbedtls_aesce_setkey_enc(unsigned char *rk,
|
| H A D | aesni.h | 151 int mbedtls_aesni_setkey_enc(unsigned char *rk,
|
| H A D | camellia.c | 303 RK = ctx->rk; in mbedtls_camellia_setkey_enc() 306 memset(RK, 0, sizeof(ctx->rk)); in mbedtls_camellia_setkey_enc() 423 RK = ctx->rk; in mbedtls_camellia_setkey_dec() 424 SK = cty.rk + 24 * 2 + 8 * idx * 2; in mbedtls_camellia_setkey_dec() 467 RK = ctx->rk; in mbedtls_camellia_crypt_ecb()
|
| /optee_os/core/arch/arm/crypto/ |
| H A D | aes_armv8a_ce.h | 14 void ce_aes_ecb_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 16 void ce_aes_ecb_decrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 18 void ce_aes_cbc_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 20 void ce_aes_cbc_decrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 22 void ce_aes_ctr_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
|
| H A D | sm4_armv8a_neon.h | 14 void neon_sm4_ecb_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 16 void neon_sm4_cbc_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 18 void neon_sm4_cbc_decrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 20 void neon_sm4_ctr_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
|
| H A D | sm4_armv8a_ce.h | 14 void ce_sm4_ecb_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 16 void ce_sm4_cbc_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 18 void ce_sm4_cbc_decrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[], 20 void ce_sm4_ctr_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
|
| H A D | aes_modes_armv8a_ce_a64.S | 15 .macro load_round_keys, rounds, rk argument 19 ld1 {v17.16b-v18.16b}, [\rk], #32 20 1111: ld1 {v19.16b-v20.16b}, [\rk], #32 21 2222: ld1 {v21.16b-v24.16b}, [\rk], #64 22 ld1 {v25.16b-v28.16b}, [\rk], #64 23 ld1 {v29.16b-v31.16b}, [\rk] 27 .macro enc_prepare, rounds, rk, ignore 28 load_round_keys \rounds, \rk 32 .macro enc_switch_key, rounds, rk, ignore 33 load_round_keys \rounds, \rk [all …]
|
| H A D | ghash-ce-core_a64.S | 379 .macro load_round_keys, rounds, rk argument 383 ld1 {v17.4s-v18.4s}, [\rk], #32 384 1111: ld1 {v19.4s-v20.4s}, [\rk], #32 385 2222: ld1 {v21.4s-v24.4s}, [\rk], #64 386 ld1 {v25.4s-v28.4s}, [\rk], #64 387 ld1 {v29.4s-v31.4s}, [\rk]
|
| H A D | aes_modes_armv8a_ce_a32.S | 146 .macro prepare_key, rk, rounds 147 add ip, \rk, \rounds, lsl #4 148 vld1.8 {q8-q9}, [\rk] @ load first 2 round keys
|
| /optee_os/core/arch/arm/include/crypto/ |
| H A D | ghash-ce-core.h | 25 void pmull_gcm_load_round_keys(const uint64_t rk[30], int rounds); 30 uint64_t ctr[], const uint64_t rk[], int rounds, 37 uint64_t ctr[], const uint64_t rk[], int rounds);
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | camellia.h | 43 uint32_t MBEDTLS_PRIVATE(rk)[68]; /*!< CAMELLIA round keys */
|
| H A D | aria.h | 55 uint32_t MBEDTLS_PRIVATE(rk)[MBEDTLS_ARIA_MAX_ROUNDS + 1][MBEDTLS_ARIA_BLOCKSIZE / 4];
|
| /optee_os/core/crypto/ |
| H A D | sm4.c | 119 uint32_t rk) in sm4F() argument 121 return x0 ^ sm4Lt(x1 ^ x2 ^ x3 ^ rk); in sm4F()
|