This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Secure version of BSD Library

Is there a version of the bsd library that was compiled and can run in a secure mode?

Parents
  • It does not seem like this is possible. As stated in the NCS documentation, the BSD library must be a part of the application. ("The BSD Socket library must be embedded in the application because BSD sockets are the primary interface to the LTE modem.").

    Also, one of the developers said the following: "the BSD Lib architecture requires a static and fixed area to operate on. And this area needs to be Non-Secure, because the BSD lib runs in the non-secure (application) domain."  (Link).

    Since the BSD library has to be a part of the application, it must run in the same domain, which is the non-secure. If you try to build any of the nrf9160 example as secure, you will get an error.

    If you look at the CONFIG_BSD_LIBRARY definition, you can see that the inclusion of the BSD library depends on the definition TRUSTED_EXECUTION_NONSECURE.

    config BSD_LIBRARY
    	bool
    	prompt "Use BSD Socket library for IP/TLS/DTLS"
    	select FLOAT
    	select FP_SHARING
    	select NET_OFFLOAD
    	select NET_SOCKETS_OFFLOAD
    	depends on TRUSTED_EXECUTION_NONSECURE
    	help
    	  Use Nordic BSD Socket library.
    
    if BSD_LIBRARY

    I am not sure why this is, but I can look into it if you would like to.

    Best regards,

    Simon

Reply
  • It does not seem like this is possible. As stated in the NCS documentation, the BSD library must be a part of the application. ("The BSD Socket library must be embedded in the application because BSD sockets are the primary interface to the LTE modem.").

    Also, one of the developers said the following: "the BSD Lib architecture requires a static and fixed area to operate on. And this area needs to be Non-Secure, because the BSD lib runs in the non-secure (application) domain."  (Link).

    Since the BSD library has to be a part of the application, it must run in the same domain, which is the non-secure. If you try to build any of the nrf9160 example as secure, you will get an error.

    If you look at the CONFIG_BSD_LIBRARY definition, you can see that the inclusion of the BSD library depends on the definition TRUSTED_EXECUTION_NONSECURE.

    config BSD_LIBRARY
    	bool
    	prompt "Use BSD Socket library for IP/TLS/DTLS"
    	select FLOAT
    	select FP_SHARING
    	select NET_OFFLOAD
    	select NET_SOCKETS_OFFLOAD
    	depends on TRUSTED_EXECUTION_NONSECURE
    	help
    	  Use Nordic BSD Socket library.
    
    if BSD_LIBRARY

    I am not sure why this is, but I can look into it if you would like to.

    Best regards,

    Simon

Children
Related