Question: `*_no_throw` functions
pcaversaccio opened this issue · 1 comments
Hi, I'm currently going down the rabbit hole on how Ledger apps are built. I actually wanted to start a discussion in this GitHub repository, however, you didn't enable it and thus I opened an issue accordingly. I was reading through the lcx_ecfp.h
developer docs this morning as well as the associated app code of this repository. I realised that you don't use the recommended *_no_throw
functions throughout the code base, but you encourage to use it in the docs (example of cx_ecfp_init_private_key()
:
Warning
It is recommended to use cx_ecfp_init_private_key_no_throw rather than this function.
I also read about incidents here where this could be an issue since it doesn't protect the private key in case some system call throws.
I wanted to properly understand why non of the *_no_throw
functions are essentially implemented? This might be a trivial question for you since I'm just really at the beginning of my exploration journey :).
Hello,
The simple answer would be legacy, this app is one of the oldest ones from our catalog and it predates the *_no_throw
functions. There is no technical reason, and this will be addressed very soon though. 👍