| /optee_os/core/crypto/ |
| H A D | sm4_accel.c | 16 crypto_accel_sm4_setkey_enc(ctx->sk, key); in sm4_setkey_enc() 22 crypto_accel_sm4_setkey_dec(ctx->sk, key); in sm4_setkey_dec() 30 crypto_accel_sm4_ecb_enc(output, input, ctx->sk, length); in sm4_crypt_ecb() 39 crypto_accel_sm4_cbc_enc(output, input, ctx->sk, length, iv); in sm4_crypt_cbc() 42 crypto_accel_sm4_cbc_dec(output, input, ctx->sk, length, iv); in sm4_crypt_cbc() 50 crypto_accel_sm4_ctr_enc(output, input, ctx->sk, length, ctr); in sm4_crypt_ctr() 60 crypto_accel_sm4_xts_enc(output, input, ctx->sk, ctx_ek->sk, in sm4_crypt_xts() 63 crypto_accel_sm4_xts_dec(output, input, ctx->sk, ctx_ek->sk, in sm4_crypt_xts()
|
| H A D | sm4.c | 163 static void sm4_one_round(uint32_t sk[32], const uint8_t input[16], in sm4_one_round() 178 ulbuf[i + 3], sk[i]); in sm4_one_round() 189 sm4_setkey(ctx->sk, key); in sm4_setkey_enc() 197 sm4_setkey(ctx->sk, key); in sm4_setkey_dec() 200 SWAP(ctx->sk[i], ctx->sk[31 - i]); in sm4_setkey_dec() 209 sm4_one_round(ctx->sk, input, output); in sm4_crypt_ecb() 228 sm4_one_round(ctx->sk, output, output); in sm4_crypt_cbc() 238 sm4_one_round(ctx->sk, input, output); in sm4_crypt_cbc() 259 sm4_one_round(ctx->sk, ctr, ctr); in sm4_crypt_ctr() 306 sm4_one_round(ctx_ek->sk, iv, tweak); in sm4_crypt_xts() [all …]
|
| H A D | sm4.h | 16 uint32_t sk[32]; /* SM4 subkeys */ member
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | des.c | 466 mbedtls_des_setkey(ctx->sk, key); in mbedtls_des_setkey_enc() 478 mbedtls_des_setkey(ctx->sk, key); in mbedtls_des_setkey_dec() 481 SWAP(ctx->sk[i], ctx->sk[30 - i]); in mbedtls_des_setkey_dec() 482 SWAP(ctx->sk[i + 1], ctx->sk[31 - i]); in mbedtls_des_setkey_dec() 518 uint32_t sk[96]; in mbedtls_des3_set2key_enc() local 520 des3_set2key(ctx->sk, sk, key); in mbedtls_des3_set2key_enc() 521 mbedtls_platform_zeroize(sk, sizeof(sk)); in mbedtls_des3_set2key_enc() 532 uint32_t sk[96]; in mbedtls_des3_set2key_dec() local 534 des3_set2key(sk, ctx->sk, key); in mbedtls_des3_set2key_dec() 535 mbedtls_platform_zeroize(sk, sizeof(sk)); in mbedtls_des3_set2key_dec() [all …]
|
| /optee_os/core/arch/arm/crypto/ |
| H A D | sm4_armv8a_neon.c | 13 void crypto_accel_sm4_setkey_enc(uint32_t sk[32], const uint8_t key[16]) in crypto_accel_sm4_setkey_enc() 17 assert(sk && key); in crypto_accel_sm4_setkey_enc() 20 neon_sm4_setkey_enc(sk, key); in crypto_accel_sm4_setkey_enc() 24 void crypto_accel_sm4_setkey_dec(uint32_t sk[32], const uint8_t key[16]) in crypto_accel_sm4_setkey_dec() 28 assert(sk && key); in crypto_accel_sm4_setkey_dec() 31 neon_sm4_setkey_dec(sk, key); in crypto_accel_sm4_setkey_dec()
|
| H A D | sm4_armv8a_ce.c | 13 void crypto_accel_sm4_setkey_enc(uint32_t sk[32], const uint8_t key[16]) in crypto_accel_sm4_setkey_enc() 17 assert(sk && key); in crypto_accel_sm4_setkey_enc() 20 ce_sm4_setkey_enc(sk, key); in crypto_accel_sm4_setkey_enc() 24 void crypto_accel_sm4_setkey_dec(uint32_t sk[32], const uint8_t key[16]) in crypto_accel_sm4_setkey_dec() 28 assert(sk && key); in crypto_accel_sm4_setkey_dec() 31 ce_sm4_setkey_dec(sk, key); in crypto_accel_sm4_setkey_dec()
|
| H A D | sm4_armv8a_neon.h | 12 void neon_sm4_setkey_enc(uint32_t sk[32], uint8_t const key[16]); 13 void neon_sm4_setkey_dec(uint32_t sk[32], uint8_t const key[16]);
|
| H A D | sm4_armv8a_ce.h | 12 void ce_sm4_setkey_enc(uint32_t sk[32], uint8_t const key[16]); 13 void ce_sm4_setkey_dec(uint32_t sk[32], uint8_t const key[16]);
|
| /optee_os/core/lib/libtomcrypt/src/ciphers/ |
| H A D | multi2.c | 116 ulong32 sk[8], dk[2]; in multi2_setup() local 127 LOAD32H(sk[x], key + x*4); in multi2_setup() 131 s_setup(dk, sk, skey->multi2.uk); in multi2_setup() 133 zeromem(sk, sizeof(sk)); in multi2_setup()
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | des.h | 49 uint32_t MBEDTLS_PRIVATE(sk)[32]; /*!< DES subkeys */ 61 uint32_t MBEDTLS_PRIVATE(sk)[96]; /*!< 3DES subkeys */
|
| /optee_os/core/include/crypto/ |
| H A D | crypto_accel.h | 55 void crypto_accel_sm4_setkey_enc(uint32_t sk[32], const uint8_t key[16]); 56 void crypto_accel_sm4_setkey_dec(uint32_t sk[32], const uint8_t key[16]);
|
| /optee_os/core/lib/libtomcrypt/src/pk/ec25519/ |
| H A D | tweetnacl.c | 310 int tweetnacl_crypto_sk_to_pk(u8 *pk, const u8 *sk) in tweetnacl_crypto_sk_to_pk() argument 314 tweetnacl_crypto_hash(d, sk, 32); in tweetnacl_crypto_sk_to_pk() 325 int tweetnacl_crypto_sign_keypair(prng_state *prng, int wprng, u8 *pk, u8 *sk) in tweetnacl_crypto_sign_keypair() argument 334 if (prng_descriptor[wprng]->read(sk,32, prng) != 32) { in tweetnacl_crypto_sign_keypair() 338 if ((err = tweetnacl_crypto_sk_to_pk(pk, sk)) != CRYPT_OK) { in tweetnacl_crypto_sign_keypair() 384 int tweetnacl_crypto_sign(u8 *sm,u64 *smlen,const u8 *m,u64 mlen,const u8 *sk,const u8 *pk, const u… in tweetnacl_crypto_sign() argument 390 tweetnacl_crypto_hash(d, sk, 32); in tweetnacl_crypto_sign()
|
| /optee_os/core/lib/libtomcrypt/src/headers/ |
| H A D | tomcrypt_private.h | 390 const unsigned char *sk,const unsigned char *pk, 398 int tweetnacl_crypto_sign_keypair(prng_state *prng, int wprng, unsigned char *pk,unsigned char *sk); 399 int tweetnacl_crypto_sk_to_pk(unsigned char *pk, const unsigned char *sk); 404 typedef int (*sk_to_pk)(unsigned char *pk ,const unsigned char *sk);
|
| /optee_os/core/tee/ |
| H A D | tee_svc_cryp.c | 3694 struct tee_cryp_obj_secret *sk = NULL; in syscall_cryp_derive_key() local 3723 sk = so->attr; in syscall_cryp_derive_key() 3763 sk->key_size = crypto_bignum_num_bytes(ss); in syscall_cryp_derive_key() 3764 crypto_bignum_bn2bin(ss, (uint8_t *)(sk + 1)); in syscall_cryp_derive_key() 3835 pt_secret = (uint8_t *)(sk + 1); in syscall_cryp_derive_key() 3836 pt_secret_len = sk->alloc_size; in syscall_cryp_derive_key() 3842 sk->key_size = pt_secret_len; in syscall_cryp_derive_key() 3871 info, info_len, (uint8_t *)(sk + 1), in syscall_cryp_derive_key() 3874 sk->key_size = okm_len; in syscall_cryp_derive_key() 3900 info, info_len, (uint8_t *)(sk + 1), in syscall_cryp_derive_key() [all …]
|