| /OK3568_Linux_fs/external/security/librkcrypto/include/ |
| H A D | rkcrypto_core.h | 11 RK_RES rk_crypto_init(void); 13 RK_RES rk_cipher_init(const rk_cipher_config *config, rk_handle *handle); 14 RK_RES rk_cipher_crypt(rk_handle handle, int in_fd, int out_fd, uint32_t len); 15 RK_RES rk_cipher_crypt_virt(rk_handle handle, const uint8_t *in, uint8_t *out, uint32_t len); 16 RK_RES rk_cipher_final(rk_handle handle); 18 RK_RES rk_ae_init(const rk_ae_config *config, rk_handle *handle); 19 RK_RES rk_ae_set_aad(rk_handle handle, int aad_fd); 20 RK_RES rk_ae_set_aad_virt(rk_handle handle, uint8_t *aad_virt); 21 RK_RES rk_ae_crypt(rk_handle handle, int in_fd, int out_fd, uint32_t len, uint8_t *tag); 22 RK_RES rk_ae_crypt_virt(rk_handle handle, const uint8_t *in, uint8_t *out, uint32_t len, [all …]
|
| H A D | rkcrypto_otp_key.h | 9 RK_RES rk_write_oem_otp_key(enum RK_OEM_OTP_KEYID key_id, uint8_t *key, uint32_t key_len); 10 RK_RES rk_oem_otp_key_is_written(enum RK_OEM_OTP_KEYID key_id, uint8_t *is_written); 11 RK_RES rk_set_oem_hr_otp_read_lock(enum RK_OEM_OTP_KEYID key_id); 12 RK_RES rk_oem_otp_key_cipher_virt(enum RK_OEM_OTP_KEYID key_id, rk_cipher_config *config, 14 RK_RES rk_oem_otp_key_cipher(enum RK_OEM_OTP_KEYID key_id, rk_cipher_config *config,
|
| /OK3568_Linux_fs/external/security/librkcrypto/demo/ |
| H A D | rkcrypto_demo.h | 9 RK_RES demo_otpkey(void); 10 RK_RES demo_otpkey_virt(void); 12 RK_RES demo_cipher(void); 13 RK_RES demo_cipher_virt(void); 15 RK_RES demo_hash(void); 16 RK_RES demo_hash_virt(void); 18 RK_RES demo_hmac(void); 19 RK_RES demo_hmac_virt(void); 21 RK_RES demo_rsa(void); 23 RK_RES demo_ae(void); [all …]
|
| H A D | demo_rsa.c | 123 static RK_RES demo_rsa_pub_enc(void) in demo_rsa_pub_enc() 125 RK_RES res = RK_CRYPTO_SUCCESS; in demo_rsa_pub_enc() 199 RK_RES demo_rsa_priv_enc(void) in demo_rsa_priv_enc() 201 RK_RES res = RK_CRYPTO_SUCCESS; in demo_rsa_priv_enc() 274 static RK_RES demo_rsa_sign_data(void) in demo_rsa_sign_data() 276 RK_RES res = RK_CRYPTO_SUCCESS; in demo_rsa_sign_data() 332 static RK_RES demo_rsa_sign_digest(void) in demo_rsa_sign_digest() 334 RK_RES res = RK_CRYPTO_SUCCESS; in demo_rsa_sign_digest() 390 RK_RES demo_rsa(void) in demo_rsa() 392 RK_RES res; in demo_rsa()
|
| H A D | demo_hash.c | 40 RK_RES demo_hash(void) in demo_hash() 42 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_hash() 99 RK_RES demo_hash_virt(void) in demo_hash_virt() 101 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_hash_virt() 164 RK_RES demo_hmac(void) in demo_hmac() 166 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_hmac() 224 RK_RES demo_hmac_virt(void) in demo_hmac_virt() 226 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_hmac_virt()
|
| H A D | demo_otpkey.c | 32 RK_RES demo_otpkey(void) in demo_otpkey() 34 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_otpkey() 116 RK_RES demo_otpkey_virt(void) in demo_otpkey_virt() 118 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_otpkey_virt()
|
| H A D | demo_ae.c | 43 static RK_RES set_ae_config(rk_ae_config *config, uint32_t algo, uint32_t mode, uint32_t operation, in set_ae_config() 64 RK_RES demo_ae(void) in demo_ae() 66 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_ae() 194 RK_RES demo_ae_virt(void) in demo_ae_virt() 196 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_ae_virt()
|
| H A D | demo_cipher.c | 29 RK_RES demo_cipher(void) in demo_cipher() 31 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_cipher() 126 RK_RES demo_cipher_virt(void) in demo_cipher_virt() 128 RK_RES res = RK_CRYPTO_ERR_GENERIC; in demo_cipher_virt()
|
| /OK3568_Linux_fs/external/security/librkcrypto/src/ |
| H A D | rkcrypto_core.c | 101 static RK_RES kernel_to_crypto_code(uint32_t tee_code) in kernel_to_crypto_code() 195 static RK_RES xioctl(int fd, unsigned long int request, void *arg) in xioctl() 200 static RK_RES rk_get_crypto_id(uint32_t algo, uint32_t mode, uint32_t *crypto_id) in rk_get_crypto_id() 214 static RK_RES rk_add_sess_node(uint32_t sess_id, uint32_t config_type, const void *config, void *pr… in rk_add_sess_node() 281 static RK_RES rk_del_sess_node(uint32_t sess_id) in rk_del_sess_node() 284 RK_RES res = RK_CRYPTO_ERR_GENERIC; in rk_del_sess_node() 306 static RK_RES rk_create_session(struct session_op *sess, uint32_t config_type, in rk_create_session() 309 RK_RES res; in rk_create_session() 330 static RK_RES rk_destroy_session(rk_handle handle) in rk_destroy_session() 332 RK_RES res; in rk_destroy_session() [all …]
|
| H A D | rkcrypto_rsa_helper.h | 20 RK_RES rk_rsa_pubkey_encode(rk_rsa_pub_key_pack *pub, 38 RK_RES rk_rsa_privkey_encode(rk_rsa_priv_key_pack *priv, 41 RK_RES rk_rsa_crypt_do_padding(enum RK_RSA_CRYPT_PADDING padding, 46 RK_RES rk_rsa_crypt_undo_padding(enum RK_RSA_CRYPT_PADDING padding, 51 RK_RES rk_rsa_sign_do_padding(enum RK_RSA_SIGN_PADDING padding, uint16_t key_len, uint16_t n_bits, 55 RK_RES rk_rsa_sign_undo_padding(enum RK_RSA_SIGN_PADDING padding, uint16_t key_len, uint16_t n_bits,
|
| H A D | rkcrypto_rsa_helper.c | 60 static RK_RES get_oid_by_md(uint32_t hash_algo, const uint8_t **oid, uint32_t *old_len) in get_oid_by_md() 75 static RK_RES asn1_compose_len(uint32_t len, uint8_t *field, uint32_t *field_len) in asn1_compose_len() 109 static RK_RES asn1_set_object(const uint8_t *in, uint32_t in_len, uint8_t tag, uint8_t need_plus, in asn1_set_object() 112 RK_RES res; in asn1_set_object() 185 static RK_RES rsa_padding_add_pkcs1_type(uint16_t key_len, uint8_t bt, in rsa_padding_add_pkcs1_type() 222 RK_RES res; in rsa_padding_add_pkcs1_type() 261 static RK_RES rsa_padding_check_pkcs1_type(uint32_t key_len, uint8_t bt, in rsa_padding_check_pkcs1_type() 338 RK_RES rsa_padding_add_pkcs15_type(uint16_t key_len, bool is_priv_key, in rsa_padding_add_pkcs15_type() 342 RK_RES res; in rsa_padding_add_pkcs15_type() 389 static RK_RES rsa_padding_check_pkcs15_type(uint16_t key_len, bool is_priv_key, in rsa_padding_check_pkcs15_type() [all …]
|
| H A D | rkcrypto_otp_key.c | 34 static RK_RES tee_to_crypto_code(uint32_t tee_code) in tee_to_crypto_code() 63 RK_RES rk_write_oem_otp_key(enum RK_OEM_OTP_KEYID key_id, uint8_t *key, in rk_write_oem_otp_key() 66 RK_RES res; in rk_write_oem_otp_key() 121 RK_RES rk_oem_otp_key_is_written(enum RK_OEM_OTP_KEYID key_id, uint8_t *is_written) in rk_oem_otp_key_is_written() 123 RK_RES res; in rk_oem_otp_key_is_written() 176 RK_RES rk_set_oem_hr_otp_read_lock(enum RK_OEM_OTP_KEYID key_id) in rk_set_oem_hr_otp_read_lock() 178 RK_RES res; in rk_set_oem_hr_otp_read_lock() 224 RK_RES rk_oem_otp_key_cipher_virt(enum RK_OEM_OTP_KEYID key_id, rk_cipher_config *config, in rk_oem_otp_key_cipher_virt() 227 RK_RES res; in rk_oem_otp_key_cipher_virt() 325 RK_RES rk_oem_otp_key_cipher(enum RK_OEM_OTP_KEYID key_id, rk_cipher_config *config, in rk_oem_otp_key_cipher() [all …]
|
| H A D | rkcrypto_random.c | 16 RK_RES rk_get_random(uint8_t *data, uint32_t len) in rk_get_random() 18 RK_RES res = RK_CRYPTO_SUCCESS; in rk_get_random()
|
| /OK3568_Linux_fs/external/security/librkcrypto/test/ |
| H A D | test_rsa.c | 32 typedef RK_RES (*test_rsa_one)(uint32_t padding, const char *padding_name, 42 static RK_RES test_rsa_pub_enc(uint32_t padding, const char *padding_name, 44 static RK_RES test_rsa_priv_enc(uint32_t padding, const char *padding_name, 46 static RK_RES test_rsa_sign(uint32_t padding, const char *padding_name, 99 static RK_RES rk2ssl_padding(uint32_t rk_padding, int *ssl_padding, const EVP_MD **digest_md) in rk2ssl_padding() 258 static RK_RES openssl_encrypt(const uint8_t *in, uint32_t in_len, uint8_t *out, uint32_t *out_len, in openssl_encrypt() 262 RK_RES res = RK_CRYPTO_ERR_GENERIC; in openssl_encrypt() 321 static RK_RES openssl_decrypt(const uint8_t *in, uint32_t in_len, uint8_t *out, uint32_t *out_len, in openssl_decrypt() 325 RK_RES res = RK_CRYPTO_ERR_GENERIC; in openssl_decrypt() 386 static RK_RES openssl_sign(const uint8_t *in, uint32_t in_len, uint8_t *out, uint32_t *out_len, in openssl_sign() [all …]
|
| H A D | test_multi.c | 18 static RK_RES test_support_multi(void) in test_support_multi() 29 static RK_RES test_nosupport_multi(void) in test_nosupport_multi() 31 RK_RES res; in test_nosupport_multi() 140 RK_RES test_multi(void) in test_multi() 143 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_multi()
|
| H A D | cmode_adapter.h | 9 RK_RES soft_cipher(uint32_t algo, uint32_t mode, uint32_t operation, 13 RK_RES soft_ae(uint32_t algo, uint32_t mode, uint32_t operation, 18 RK_RES soft_hash(uint32_t algo, const uint8_t *in, uint32_t in_len, 21 RK_RES soft_hmac(uint32_t algo, const uint8_t *key, uint32_t key_len,
|
| H A D | test_hash.c | 42 static RK_RES test_hash_item_virt(const struct test_hash_item *item, in test_hash_item_virt() 45 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_hash_item_virt() 136 static RK_RES test_hash_item_fd(const struct test_hash_item *item, in test_hash_item_fd() 139 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_hash_item_fd() 221 RK_RES test_hash(int verbose) in test_hash() 223 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_hash() 264 RK_RES test_hmac(int verbose) in test_hmac() 266 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_hmac()
|
| H A D | test_cipher.c | 87 static RK_RES test_cipher_item_virt(const struct test_cipher_item *item, int verbose) in test_cipher_item_virt() 89 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_cipher_item_virt() 242 static RK_RES test_cipher_item_fd(const struct test_cipher_item *item, int verbose) in test_cipher_item_fd() 244 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_cipher_item_fd() 374 RK_RES test_cipher(int verbose) in test_cipher() 376 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_cipher()
|
| H A D | test_hash.h | 9 RK_RES test_hash(int verbose); 10 RK_RES test_hmac(int verbose);
|
| H A D | rsa_key_data.h | 9 RK_RES test_init_pubkey(rk_rsa_pub_key_pack *pub, uint32_t nbits); 10 RK_RES test_init_privkey(rk_rsa_priv_key_pack *piv, uint32_t nbits);
|
| H A D | test_ae.c | 39 static RK_RES test_ae_item_virt(const struct test_ae_item *item, int verbose) in test_ae_item_virt() 41 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_ae_item_virt() 256 static RK_RES test_ae_item_fd(const struct test_ae_item *item, int verbose) in test_ae_item_fd() 258 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_ae_item_fd() 473 RK_RES test_ae(int verbose) in test_ae() 475 RK_RES res = RK_CRYPTO_ERR_GENERIC; in test_ae()
|
| H A D | test_stress.c | 14 typedef RK_RES (*test_func)(int verbose); 38 RK_RES res; in stress_test()
|
| H A D | cmode_adapter.c | 8 RK_RES soft_cipher(uint32_t algo, uint32_t mode, uint32_t operation, in soft_cipher() 92 RK_RES soft_ae(uint32_t algo, uint32_t mode, uint32_t operation, in soft_ae() 150 RK_RES soft_hash(uint32_t algo, const uint8_t *in, uint32_t in_len, uint8_t *out, uint32_t *out_len) in soft_hash() 189 RK_RES soft_hmac(uint32_t algo, const uint8_t *key, uint32_t key_len, in soft_hmac()
|
| H A D | rsa_key_data.c | 369 RK_RES test_init_pubkey(rk_rsa_pub_key_pack *pub, uint32_t nbits) in test_init_pubkey() 403 RK_RES test_init_privkey(rk_rsa_priv_key_pack *priv, uint32_t nbits) in test_init_privkey()
|
| H A D | test_random.h | 9 RK_RES test_random(void);
|