Skip to content

Commit

Permalink
Export cx_cipher_reset and CMAC functions to the crypto library
Browse files Browse the repository at this point in the history
  • Loading branch information
srasoamiaramanana-ledger committed May 14, 2024
1 parent 5cf15f5 commit 4e31bc4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/cx_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,7 @@
#define _NR_cx_eddsa_verify_init_hash 0x89
#define _NR_cx_eddsa_verify_hash 0x8a
#define _NR_cx_aes_siv_update_mac 0x8b
#define _NR_cx_cipher_reset 0x8c
#define _NR_cx_cmac_start 0x8d
#define _NR_cx_cmac_update 0x8e
#define _NR_cx_cmac_finish 0x8f
4 changes: 4 additions & 0 deletions lib_cxng/cx.export
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,7 @@ cx_eddsa_update_hash
cx_eddsa_verify_init_hash
cx_eddsa_verify_hash
cx_aes_siv_update_mac
cx_cipher_reset
cx_cmac_start
cx_cmac_update
cx_cmac_finish
4 changes: 4 additions & 0 deletions lib_cxng/src/cx_exported_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,8 @@ unsigned long __attribute((section("._cx_exported_functions"))) cx_exported_func
[_NR_cx_eddsa_verify_init_hash] = (unsigned long) cx_eddsa_verify_init_hash,
[_NR_cx_eddsa_verify_hash] = (unsigned long) cx_eddsa_verify_hash,
[_NR_cx_aes_siv_update_mac] = (unsigned long) cx_aes_siv_update_mac,
[_NR_cx_cipher_reset] = (unsigned long) cx_cipher_reset,
[_NR_cx_cmac_start] = (unsigned long) cx_cmac_start,
[_NR_cx_cmac_update] = (unsigned long) cx_cmac_update,
[_NR_cx_cmac_finish] = (unsigned long) cx_cmac_finish,
};
4 changes: 4 additions & 0 deletions src/cx_stubs.S
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ CX_TRAMPOLINE _NR_cx_eddsa_update_hash cx_eddsa_update_hash
CX_TRAMPOLINE _NR_cx_eddsa_verify_init_hash cx_eddsa_verify_init_hash
CX_TRAMPOLINE _NR_cx_eddsa_verify_hash cx_eddsa_verify_hash
CX_TRAMPOLINE _NR_cx_aes_siv_update_mac cx_aes_siv_update_mac
CX_TRAMPOLINE _NR_cx_cipher_reset cx_cipher_reset
CX_TRAMPOLINE _NR_cx_cmac_start cx_cmac_start
CX_TRAMPOLINE _NR_cx_cmac_update cx_cmac_update
CX_TRAMPOLINE _NR_cx_cmac_finish cx_cmac_finish

.thumb_func
cx_trampoline_helper:
Expand Down

0 comments on commit 4e31bc4

Please sign in to comment.