/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/safer/ |
A D | safer.c | 174 int safer_k64_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in safer_k64_setup() argument 179 if (num_rounds != 0 && (num_rounds < 6 || num_rounds > LTC_SAFER_MAX_NOF_ROUNDS)) { in safer_k64_setup() 187 …safer_expand_userkey(key, key, (unsigned int)(num_rounds != 0 ?num_rounds:LTC_SAFER_K64_DEFAULT_NO… in safer_k64_setup() 191 int safer_sk64_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in safer_sk64_setup() argument 196 if (num_rounds != 0 && (num_rounds < 6 || num_rounds > LTC_SAFER_MAX_NOF_ROUNDS)) { in safer_sk64_setup() 204 …safer_expand_userkey(key, key, (unsigned int)(num_rounds != 0 ?num_rounds:LTC_SAFER_SK64_DEFAULT_N… in safer_sk64_setup() 208 int safer_k128_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in safer_k128_setup() argument 213 if (num_rounds != 0 && (num_rounds < 6 || num_rounds > LTC_SAFER_MAX_NOF_ROUNDS)) { in safer_k128_setup() 221 …safer_expand_userkey(key, key+8, (unsigned int)(num_rounds != 0 ?num_rounds:LTC_SAFER_K128_DEFAULT… in safer_k128_setup() 230 if (num_rounds != 0 && (num_rounds < 6 || num_rounds > LTC_SAFER_MAX_NOF_ROUNDS)) { in safer_sk128_setup() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_cipher.h | 634 int rc5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey); 644 int rc6_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey); 654 int rc2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey); 877 int keylen, int num_rounds, symmetric_ECB *ecb); 885 int keylen, int num_rounds, symmetric_CFB *cfb); 895 int keylen, int num_rounds, symmetric_OFB *ofb); 905 int keylen, int num_rounds, symmetric_CBC *cbc); 922 int num_rounds, int ctr_mode, 941 int num_rounds, 958 int num_rounds, symmetric_F8 *f8); [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/xts/ |
A D | xts_init.c | 20 …cipher, const unsigned char *key1, const unsigned char *key2, unsigned long keylen, int num_rounds, in xts_start() argument 40 if ((err = cipher_descriptor[cipher]->setup(key1, keylen, num_rounds, &xts->key1)) != CRYPT_OK) { in xts_start() 43 if ((err = cipher_descriptor[cipher]->setup(key2, keylen, num_rounds, &xts->key2)) != CRYPT_OK) { in xts_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/ |
A D | rc5.c | 46 static int s_rc5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_rc5_setup() argument 48 int rc5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_rc5_setup() 57 if (num_rounds == 0) { in s_rc5_setup() 58 num_rounds = rc5_desc.default_rounds; in s_rc5_setup() 61 if (num_rounds < 12 || num_rounds > 24) { in s_rc5_setup() 70 skey->rc5.rounds = num_rounds; in s_rc5_setup() 88 t = (ulong32)(2 * (num_rounds + 1)); in s_rc5_setup() 104 int rc5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in rc5_setup() argument 107 x = s_rc5_setup(key, keylen, num_rounds, skey); in rc5_setup()
|
A D | rc6.c | 43 static int s_rc6_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_rc6_setup() argument 45 int rc6_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_rc6_setup() 54 if (num_rounds != 0 && num_rounds != 20) { in s_rc6_setup() 99 int rc6_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in rc6_setup() argument 102 x = s_rc6_setup(key, keylen, num_rounds, skey); in rc6_setup()
|
A D | anubis.c | 879 static int s_anubis_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_anubis_setup() argument 881 int anubis_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_anubis_setup() 909 if (num_rounds != 0 && num_rounds != skey->anubis.R) { in s_anubis_setup() 1013 int anubis_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in anubis_setup() argument 1016 err = s_anubis_setup(key, keylen, num_rounds, skey); in anubis_setup()
|
A D | rc2.c | 63 int rc2_setup_ex(const unsigned char *key, int keylen, int bits, int num_rounds, symmetric_key *ske… in rc2_setup_ex() argument 80 if (num_rounds != 0 && num_rounds != 16) { in rc2_setup_ex() 126 int rc2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in rc2_setup() argument 128 return rc2_setup_ex(key, keylen, keylen * 8, num_rounds, skey); in rc2_setup()
|
A D | multi2.c | 114 int multi2_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in multi2_setup() argument 123 if (num_rounds == 0) num_rounds = 128; in multi2_setup() 125 skey->multi2.N = num_rounds; in multi2_setup()
|
A D | kseed.c | 194 int kseed_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in kseed_setup() argument 203 if (num_rounds != 16 && num_rounds != 0) { in kseed_setup()
|
A D | tea.c | 29 int tea_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in tea_setup() argument 39 if (num_rounds != 0 && num_rounds != 32) { in tea_setup()
|
A D | xtea.c | 26 int xtea_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in xtea_setup() argument 38 if (num_rounds != 0 && num_rounds != 32) { in xtea_setup()
|
A D | cast5.c | 401 static int s_cast5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_cast5_setup() argument 403 int cast5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in s_cast5_setup() 413 if (num_rounds != 12 && num_rounds != 16 && num_rounds != 0) { in s_cast5_setup() 417 if (num_rounds == 12 && keylen > 10) { in s_cast5_setup() 485 int cast5_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in cast5_setup() argument 488 z = s_cast5_setup(key, keylen, num_rounds, skey); in cast5_setup()
|
A D | idea.c | 141 int idea_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in idea_setup() argument 146 if (num_rounds != 0 && num_rounds != 8) return CRYPT_INVALID_ROUNDS; in idea_setup()
|
A D | kasumi.c | 187 int kasumi_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in kasumi_setup() argument 200 if (num_rounds != 0 && num_rounds != 8) { in kasumi_setup()
|
A D | skipjack.c | 59 int skipjack_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey) in skipjack_setup() argument 70 if (num_rounds != 32 && num_rounds != 0) { in skipjack_setup()
|
A D | blowfish.c | 432 int blowfish_setup(const unsigned char *key, int keylen, int num_rounds, in blowfish_setup() argument 440 if (num_rounds != 0 && num_rounds != 16) { in blowfish_setup()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/ecb/ |
A D | ecb_start.c | 22 int ecb_start(int cipher, const unsigned char *key, int keylen, int num_rounds, symmetric_ECB *ecb) in ecb_start() argument 33 return cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &ecb->key); in ecb_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/cbc/ |
A D | cbc_start.c | 23 int keylen, int num_rounds, symmetric_CBC *cbc) in cbc_start() argument 37 if ((err = cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &cbc->key)) != CRYPT_OK) { in cbc_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/ofb/ |
A D | ofb_start.c | 24 int keylen, int num_rounds, symmetric_OFB *ofb) in ofb_start() argument 45 return cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &ofb->key); in ofb_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/f8/ |
A D | f8_start.c | 28 int num_rounds, symmetric_F8 *f8) in f8_start() argument 67 if ((err = cipher_descriptor[cipher]->setup(tkey, keylen, num_rounds, &f8->key)) != CRYPT_OK) { in f8_start() 83 return cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &f8->key); in f8_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/cfb/ |
A D | cfb_start.c | 24 int keylen, int num_rounds, symmetric_CFB *cfb) in cfb_start() argument 45 if ((err = cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &cfb->key)) != CRYPT_OK) { in cfb_start()
|
/optee_os-3.20.0/core/arch/arm/crypto/ |
A D | aes_armv8a_ce.c | 125 unsigned int num_rounds = 0; in crypto_accel_aes_expand_keys() local 136 num_rounds = 10 + ((key_len / 8) - 2) * 2; in crypto_accel_aes_expand_keys() 138 if (expanded_key_len < (num_rounds + 1) * sizeof(struct aes_block)) in crypto_accel_aes_expand_keys() 141 *round_count = num_rounds; in crypto_accel_aes_expand_keys() 149 make_dec_key(num_rounds, enc_key, dec_key); in crypto_accel_aes_expand_keys()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/lrw/ |
A D | lrw_start.c | 27 int num_rounds, in lrw_start() argument 56 if ((err = cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &lrw->key)) != CRYPT_OK) { in lrw_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/ctr/ |
A D | ctr_start.c | 27 int num_rounds, int ctr_mode, in ctr_start() argument 52 if ((err = cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &ctr->key)) != CRYPT_OK) { in ctr_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | aes_accel.c | 52 int rijndael_setup(const unsigned char *key, int keylen, int num_rounds, in rijndael_setup() argument 69 if (num_rounds && (unsigned int)num_rounds != round_count) in rijndael_setup()
|