Giter Site home page Giter Site logo

Comments (5)

ozanoner avatar ozanoner commented on May 30, 2024

@ayushev I appreciate if you can check this issue.

from optiga-trust-x.

ayushev avatar ayushev commented on May 30, 2024

This is a device error returned from the device, the base for all the device erros is here

https://github.com/Infineon/optiga-trust-x/wiki/Device-Error-Codes

Which parameters are you using for this command, so that the device error is returned? Can you provide a code snippet?

from optiga-trust-x.

ozanoner avatar ozanoner commented on May 30, 2024

It is one of NordicSemi SDK examples. I shared here:
https://gist.github.com/ozanoner/29cdbc72539f0fba39f21dd4fb0e07f0

This function makes a call to optiga_crypt_tls_prf_sha256 at line#43 and in this function, there is a call for CmdLib_DeriveKey. It is the line in which that function returns the value of 0x80010001

return_value = CmdLib_DeriveKey(&derivekey_options, &derivekey_output_buffer);

from optiga-trust-x.

ayushev avatar ayushev commented on May 30, 2024

I guess you had a look on this example where the shared secret is written directly to the data object.
There are two nuances

  1. It should be 32 bytes non 0x00 bytes long if you use NISTP256 key (by default) -> try using like in example a smaller array of non zero bytes
  2. This wiki entry is a short reminder on how to use the function, if you want to see more or less full (and more secure) way to derive a shared secret you can refer to this file

from optiga-trust-x.

ozanoner avatar ozanoner commented on May 30, 2024

Thanks for your reply! I will check those examples.
I double-checked the documentation that you shared above and found that there is a comment for the value of CMD_DEV_ERROR and an example value of 0x80010001.

///Device error, the device error(last error code) is available in the least significant byte e.g. for Invalid OID 0x80010001 is returned.

So I got it now how it works :)

Thanks for your time & the help!
Best regards.

from optiga-trust-x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.